restore the code editor screen, drop the dead theme picker, unshadow AppRegistry

Three unrelated type errors that each pointed at something actually broken:

- Dashboard.CodeEditor was deleted in ab03b17 ("Projects") while the
  /code-editor route and the dock's Editor item kept pointing at it, so the
  route rendered undefined. Screen restored.

- Appearance.tsx imported 'themes', a workspace deleted in 0746844. Nothing
  reads settings.appearance.colorTheme and no theme CSS survives, so the picker
  was writing a value with no consumer. Removed it and the setting; colorMode
  stays, it is live.

- officerdev exported both a component and a type named AppRegistry, so
  `import { AppRegistry }` resolved to the type and <AppRegistry /> failed to
  typecheck. Renamed the Record type to AppRegistryMap.

Also declares "*.css" so side-effect stylesheet imports resolve.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
brunorezio
2026-07-25 23:30:20 +01:00
co-authored by Claude Opus 5
parent 78130f21ce
commit 1fa3a659bc
14 changed files with 33 additions and 51 deletions
@@ -0,0 +1,10 @@
import { CodeEditorView } from 'officerdev';
import { Widget } from 'widgets/Widget';
export const CodeEditor = () => (
<div className="h-full w-full flex items-center justify-center">
<Widget title="Code Editor" className="h-[70vh] w-[70vw] overflow-hidden" resizable moveable>
<CodeEditorView className="h-full w-full" />
</Widget>
</div>
);
@@ -1,31 +0,0 @@
import { useSettings } from 'state/useSettings';
import { themes } from 'themes';
export const Appearance = () => {
const { settings, saveSettings } = useSettings();
const handleColorThemeChange = (colorTheme: string) => {
saveSettings({ ...settings, appearance: { ...settings.appearance, colorTheme } });
};
const activeColorTheme = settings.appearance.colorTheme ?? 'DuckPond';
return (
<div className="grid grid-cols-2 sm:grid-cols-3 gap-2 pt-2">
{themes.map((t) => (
<button
key={t.id}
type="button"
onClick={() => handleColorThemeChange(t.id)}
className={`rounded-md px-3 py-2.5 text-sm font-medium cursor-pointer transition-colors ${
activeColorTheme === t.id
? 'bg-duck-teal text-white ring-2 ring-duck-teal/50'
: 'bg-secondary text-secondary-foreground hover:bg-secondary/80'
}`}
>
{t.name}
</button>
))}
</div>
);
};
@@ -11,6 +11,7 @@ export * from './TaskLogs';
export * from './Tasks';
export * from './Files';
export * from './CodeEditor';
export * from './ChatHistory';
export * from './Dashboards';
export * from './Projects';