# UI unification work

Web App (`apps/web/`), CLI and TUI (`apps/cli/`), docs site (`scripts/docs_site/`), marketing page (`website/index.html`) and Desktop chrome (`apps/desktop/main.js`) grew separately.

## Open work

| Item, priority | Now | Next |
| --- | --- | --- |
| Web token fallback high | `:root` fallback in `themes/fallback.css` has beige-dark surfaces; `design/color.css` gives `--accent-orange: #6ea8fe`, neutral blue | Pick beige or neutral and reconcile |
| CLI and TUI medium | TUI primary is `#d97757` whatever the Web theme (`apps/cli/src/theme/themes.ts`). The Rich banner uses `bright_blue` (`openprogram/interfaces/cli/repl/banner.py`). | Read the Web preference, or document a separate brand |
| Buttons low | `button.tsx` is the official radix-nova Button; manage-page tabs still size themselves from `--ui-button-h` and `--ui-button-radius` | Move hand-sized tabs onto Button sizes |
| Naming low | `--accent-orange` also carries blue and teal; shadcn `--accent` is the ink at 9%, not the primary colour | Rename, for example `--accent-primary` |
| Kits and hard-coded colours low | `@base-ui-components/react` is still a dependency though no source imports it. `lib/effort/effort-color.ts` computes its own HSL. `--browser-glyph-secondary` is `#8b5cf6`. | Remove the dependency; bring these onto theme tokens. Tailwind is v4 only, themed in `@theme`. |

Order: Web fallback, CLI and TUI, buttons and naming, kits. The marketing page uses the App's light and dark tokens, panels, buttons and composer. The docs site is independent: blue on white (`--acc: #2f5fd0`, dark `#86a8f5`), own key `op-docs-theme`, light and dark only.

## Settings Appearance

Settings opens on General. Everything about the look is on Appearance (`appearance-section.tsx`): colours and theme, text, conversation view and width, tab drag effects, the browser's bookmarks bar, custom CSS. Pack, accent and overlay contract: [Theme system](https://fzkuji.github.io/OpenProgram/docs/reference/design/ui/visual-system/theme-system.html).

| Control | Behaviour |
| --- | --- |
| Mode | Auto follows the system; it is a mode, not a theme |
| Vivid strip colour | Every Vivid surface, text tier and default accent is an `oklch(from var(--tabrow-seed) …)` tone, like Chrome's colour themes |
| Accent | Colour input, presets from each pack's default `--accent-orange`, Reset to theme default |
| Overlay | Enable custom CSS; Insert template writes a starter for `html` and the current `data-theme`; Clear empties it |

**Migration of the combined `agentic_theme`**

| Stored | Becomes |
| --- | --- |
| `auto` | beige + auto |
| `beige-dark` `beige-light` | beige + dark or light |
| `dark` `light` (schema 2) | neutral + dark or light |
| `aurora` `aurora-light` | aurora + dark or light |
| `vivid` `vivid-light` | vivid + dark or light |
| `custom` `custom-light` | beige + the saved mode; overlay on when custom CSS is saved |

## Desktop chrome

The Electron window's first pixel matches the resolved web theme: `BrowserWindow` starts with that theme's `--bg-primary`.

| Aspect | Behaviour |
| --- | --- |
| Resolution | Schema-3 keys plus legacy `agentic_theme`. See [which source wins](https://fzkuji.github.io/OpenProgram/docs/reference/design/ui/visual-system/theme-system.html#diagnostics). `auto` follows `nativeTheme.shouldUseDarkColors`. |
| Colour map | `apps/desktop/main/windows/theme-chrome.js` copies the values from the theme CSS. `custom` ids resolve to the beige pair. |
| Error and listing pages | Same chrome tokens |
| Theme change | The renderer calls `theme.setChrome`, updating every `BrowserWindow` background so the next show or reload does not flash |
| Window state | Unaffected; see [window state](https://fzkuji.github.io/OpenProgram/docs/reference/design/ui/desktop/window-state.html) |
