Skip to content

feat(ui): light / dark / auto theme — Daybreak + Midnight + toggle#355

Merged
luokerenx4 merged 2 commits into
masterfrom
UI-issue
Jun 16, 2026
Merged

feat(ui): light / dark / auto theme — Daybreak + Midnight + toggle#355
luokerenx4 merged 2 commits into
masterfrom
UI-issue

Conversation

@luokerenx4

Copy link
Copy Markdown
Contributor

Summary

  • The shell was dark-only (the feat(ui): Linear dark shell — palette + density pass (re-traced from #302) #353 Linear palette). This adds a real light / dark / auto color mode + a toggle, so the all-black structure isn't the only option.
  • Two palettes, one identity — alice-blue (her dress, from the character card) is the brand accent in both. Daybreak (light): cream paper · engraved-navy ink · alice-blue · gold. Midnight (dark): TradingView-ward terminal — charcoal canvas, layered panels, brightened alice-blue, teal up / coral down (the feat(ui): Linear dark shell — palette + density pass (re-traced from #302) #353 contributor's teal is reused as the positive color, not discarded).
  • Mechanism: index.css @theme = Daybreak default; :root[data-theme="dark"] + @media (prefers-color-scheme:dark) flip the same --color-* tokens → every utility follows, zero component churn. auto follows the OS.
  • Wiring: a theme store mirroring the locale store (ui/src/theme, persisted) applies <html data-theme>; an inline script in index.html mirrors it pre-paint (no flash). ThemeToggle in the ActivityBar footer cycles auto → light → dark.
  • De-hardcoded the chrome that assumed dark: ActivityBar/TabStrip/ChatLanding overlays → two theme-aware overlay tokens; avatar/empty-editor/form-focus glows → --color-accent-dim (were stale GitHub-blue literals).
  • Kept the living color card as a dev artifact: ui/design/theme-study.html (the source of truth for both palettes).

Deferred — ANG-110

The Workspaces surface keeps its own local dark palette (its ~40 semantic chips — agent badges, status pills, terminal traffic-lights — would wash out illegibly on cream without a dedicated pass), plus a few data-viz colors (chart, react-flow, session status). A dark terminal-ish surface in a light app is acceptable interim (VS Code does it). Tracked: ANG-110.

Test plan

  • cd ui && npx tsc -b clean
  • vite build clean — overlay utilities + data-theme / prefers-color-scheme blocks emitted in built CSS
  • vitest --project ui green (42)
  • Verified live (demo): light → cream/navy/alice-blue applied to <body> + tokens; dark → full TradingView set; toggle cycles auto→light→dark and persists to localStorage

Boundary touch

None — UI only. No trading / auth / broker credentials / migrations.

🤖 Generated with Claude Code

…toggle

The shell was dark-only (the #353 Linear palette). Add a real adaptive
color mode so the all-black structure isn't the only option.

Two palettes, one identity — alice-blue (her dress, from the character
card) is the brand accent in BOTH modes:
- Daybreak (light): cream paper + engraved-navy ink + alice-blue + gold.
- Midnight (dark): TradingView-ward trading terminal — charcoal canvas,
  layered panels, brightened alice-blue, teal up / coral down (the #353
  contributor's teal is reused as the up/positive color).

How it works:
- index.css `@theme` holds Daybreak (light) as the DEFAULT; a
  `:root[data-theme="dark"]` block + a `@media (prefers-color-scheme:dark)`
  block flip the same `--color-*` token names, so every bg-bg / text-accent
  / border-border utility follows the active theme with zero component
  changes. `auto` follows the OS.
- theme store (ui/src/theme, mirrors the locale store): light|dark|auto,
  persisted; side-effect module applies `<html data-theme>`. An inline
  script in index.html mirrors the persisted value pre-paint (no flash).
- ThemeToggle in the ActivityBar footer cycles auto → light → dark.

De-hardcoded the chrome that assumed a dark bg: ActivityBar / TabStrip
hover + active overlays and the ChatLanding backdrop now use two
theme-aware overlay tokens (--color-overlay / -strong); the avatar /
empty-editor / form-focus accent glows now use --color-accent-dim instead
of stale GitHub-blue rgba literals.

Deferred (ANG-110): the Workspaces surface keeps its own local dark
palette (its ~40 semantic chips would wash out illegibly on cream without
a dedicated pass), and a few data-viz colors (chart, react-flow, session
status). A dark terminal-ish surface in a light app is acceptable interim.

Living color card kept as a dev artifact: ui/design/theme-study.html.

Test plan:
- cd ui && npx tsc -b clean; vite build clean (overlay utilities +
  data-theme/prefers-color-scheme blocks emitted)
- ui vitest project green (42)
- Verified live (demo): light applies cream/navy/alice-blue, dark applies
  the TradingView set, toggle cycles auto→light→dark and persists

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
openalice-demo Ready Ready Preview, Comment Jun 16, 2026 1:10pm

Request Review

The TradingView-ward dark (#131722 navy-charcoal panels) read as "too blue"
once the full shell — activity rail + sidebar + tabs — was on screen: a large
navy-tinted surface is fatiguing. Revert the dark backgrounds / panels / border
/ text to the #353 neutral-black palette (#0b0c0e / #0e0f12 / #1a1b21 / #24262c
/ #dfe1e6 / #8f929b), which stays calm at shell scale.

Alice-blue survives ONLY as small brand highlights — the accent (active
tab / nav indicator / buttons) and the user's own message bubble — so the
large-area blue tint is gone while the brand stays consistent with Daybreak.
Green/red/purple semantics also revert to the #353 values. Daybreak (light)
is unchanged. Color card (ui/design/theme-study.html) synced to match.

Verified: vite build emits --color-bg:#0b0c0e under [data-theme=dark],
--color-accent stays #3b82f6.
@luokerenx4 luokerenx4 merged commit ed3ecca into master Jun 16, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant