Skip to content

feat(ui): add light theme#6570

Merged
otavio merged 1 commit into
masterfrom
feature/light-theme
Jun 29, 2026
Merged

feat(ui): add light theme#6570
otavio merged 1 commit into
masterfrom
feature/light-theme

Conversation

@gustavosbarreto

Copy link
Copy Markdown
Member

The console UI was dark only. This adds a light theme and a way to switch between the two.

How it works

The design-system semantic tokens (background, surface, card, border, text-*, hover overlays) now resolve through CSS variables instead of literal colors. Dark values live in :root (the default), light values under html.light. Every component that already uses bg-background / text-text-primary / etc. picks up the right value with no change.

A small Zustand store (themeStore) toggles the light class on <html> and persists the choice to localStorage. It applies the saved theme as the module loads, before first paint, so there is no flash on reload. The switch is a sun/moon entry inside the user account menu.

Chrome stays dark

The top bar is pinned to the dark token set via a .theme-dark utility that re-declares the variables locally, while the sidebar follows the active theme. In light mode the page header gains a soft drop shadow so it reads as a raised sheet against the lighter canvas.

Known rough edges

These are calibrated for the dark background and look washed on light. Left as follow-ups so the foundation can land first:

  • Accent colors (green/orange/blue/cyan/red) need a slightly darker light variant.
  • Cards are low-contrast on the light canvas and want a stronger border or shadow.
  • ~99 text-white / bg-white spots can end up white-on-light.

@gustavosbarreto gustavosbarreto requested a review from a team as a code owner June 29, 2026 19:22
@github-actions

github-actions Bot commented Jun 29, 2026

Copy link
Copy Markdown

Claude finished @gustavosbarreto's task in 10m 57s —— View job


Code Review Complete

Reviewed 9 files across code quality, security, testing, TypeScript/React patterns, and architecture — 1 inline issue posted (medium severity).

The theming approach is clean: CSS variable indirection through Tailwind tokens, a .theme-dark utility for dark-pinned chrome, and a lightweight Zustand store with localStorage persistence. The security surface is minimal (localStorage values are validated against an allowlist before use), no existing tests break, and no cross-repo consumers are affected since the design-system's base.css defines the required CSS variables alongside the preset that references them.

The one issue is a missing color-scheme: light declaration in html.light — see the inline comment for details and a committable suggestion.


To request another review round, comment /review.

Drive the design-system semantic tokens (background, surface, card,
border, text, hover overlays) through CSS variables so the whole UI can
switch between dark (default) and light. Light values live under
`html.light`; a Zustand store toggles the class and persists the choice
to localStorage, applied before first paint to avoid a flash. A sun/moon
entry in the user account menu flips the theme.

The app chrome stays dark in light mode: the top bar is pinned to the
dark token set via a `.theme-dark` utility that re-declares the
variables, while the sidebar follows the theme. The page header gains a
soft drop shadow in light so it reads as a raised sheet.

Known rough edges (follow-up): accent colors and ~99 text-white/bg-white
spots were calibrated for the dark background and look washed on light.
Comment thread ui/packages/design-system/css/base.css
@gustavosbarreto

Copy link
Copy Markdown
Member Author

/review

@github-actions

github-actions Bot commented Jun 29, 2026

Copy link
Copy Markdown

Claude finished @gustavosbarreto's task in 5m 10s —— View job


Code Review Complete

Reviewed 10 files across code quality, security, testing, TypeScript/React patterns, and architecture — no new issues found. The code looks good as-is.


@otavio otavio merged commit 6b899fe into master Jun 29, 2026
17 checks passed
@otavio otavio deleted the feature/light-theme branch June 29, 2026 19:49
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.

2 participants