You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`src/schema.ts` — TypeScript types for change reports, tasks, design spec, viewport, interaction history, element context
@@ -94,8 +108,9 @@ Use `/annotask-apply` to fetch and apply pending visual changes to source code.
94
108
`App.vue` is the shell orchestrator — it wires composables together and handles bridge events. **Do not add business logic directly to App.vue.** Extract new concerns into composables under `src/shell/composables/`.
When adding new shell features, create a new composable that accepts its dependencies via constructor params and returns refs + methods. App.vue should only orchestrate (init composables, wire bridge events, pass props to components).
107
122
123
+
## Shell Theme System
124
+
125
+
The shell has a VS Code-style theme system with 18 built-in themes and custom theme support. Themes control every color in the UI via 63 CSS custom properties.
-`src/shell/themes/builtin.ts` — 18 built-in theme definitions with `deriveDefaults()` helper
131
+
-`src/shell/composables/useShellTheme.ts` — Core composable: applies themes at runtime via `style.setProperty()`, handles localStorage persistence, system preference detection, custom theme CRUD, and a one-shot migration from the legacy `annotask:themeMode` key
132
+
-`src/shell/components/ShellThemeEditor.vue` — Full-screen custom theme creator with grouped color pickers and live preview
133
+
134
+
### How themes are applied
135
+
136
+
Themes are applied at runtime via `document.documentElement.style.setProperty()` for each of the 63 CSS variables. The `:root` block in App.vue provides dark fallback values, and `:root.light` provides light fallback values — these are safety nets for first paint before JS runs. Once `useShellTheme` initializes, it overrides all variables via inline styles.
Then add it to the `BUILTIN_THEMES` array. The `deriveDefaults()` helper automatically derives status, severity, mode, layout, role, syntax, and annotation colors from core colors — override only what needs to differ.
181
+
182
+
**Important:** Each theme's 6 annotation colors must be visually distinct from each other (no overlapping shades). Use colors from the theme's native palette.
183
+
184
+
### Using rgba/transparent variants in CSS
185
+
186
+
Never hardcode `rgba()` with theme-dependent colors. Use `color-mix()`:
|`annotask:shellTheme`| Active theme ID (e.g. `'monokai'`, `'system'`) |
198
+
|`annotask:shellSystemThemes`| JSON `[darkId, lightId]` pair for system preference |
199
+
|`annotask:shellCustomThemes`| JSON array of user-created `ShellTheme` objects |
200
+
201
+
### Custom themes
202
+
203
+
Users create custom themes via Settings > Appearance > "+ Create Custom Theme". Custom themes are stored in localStorage with IDs prefixed `custom:`. The editor provides live preview — changes apply to the shell immediately. Missing keys inherit from the base theme.
204
+
108
205
## Key Shell Features
109
206
110
207
-**Viewport preview** — Device presets + custom dimensions, viewport info included in tasks/reports
@@ -96,7 +108,7 @@ Use `/annotask-apply` to fetch and apply pending visual changes to source code.
96
108
`App.vue` is the shell orchestrator — it wires composables together and handles bridge events. **Do not add business logic directly to App.vue.** Extract new concerns into composables under `src/shell/composables/`.
-`useAnnotationRects` — rAF loop keeping annotation overlays positioned during scroll/resize
@@ -110,20 +122,20 @@ When adding new shell features, create a new composable that accepts its depende
110
122
111
123
## Shell Theme System
112
124
113
-
The shell has a VS Code-style theme system with 18 built-in themes and custom theme support. Themes control every color in the UI via 62 CSS custom properties.
125
+
The shell has a VS Code-style theme system with 18 built-in themes and custom theme support. Themes control every color in the UI via 63 CSS custom properties.
-`src/shell/themes/builtin.ts` — 18 built-in theme definitions with `deriveDefaults()` helper
119
131
-`src/shell/composables/useShellTheme.ts` — Core composable: applies themes at runtime via `style.setProperty()`, handles localStorage persistence, system preference detection, custom theme CRUD, and a one-shot migration from the legacy `annotask:themeMode` key
120
132
-`src/shell/components/ShellThemeEditor.vue` — Full-screen custom theme creator with grouped color pickers and live preview
121
133
122
134
### How themes are applied
123
135
124
-
Themes are applied at runtime via `document.documentElement.style.setProperty()` for each of the 62 CSS variables. The `:root` block in App.vue provides dark fallback values, and `:root.light` provides light fallback values — these are safety nets for first paint before JS runs. Once `useShellTheme` initializes, it overrides all variables via inline styles.
136
+
Themes are applied at runtime via `document.documentElement.style.setProperty()` for each of the 63 CSS variables. The `:root` block in App.vue provides dark fallback values, and `:root.light` provides light fallback values — these are safety nets for first paint before JS runs. Once `useShellTheme` initializes, it overrides all variables via inline styles.
0 commit comments