Skip to content

feat(ui): fix theme architecture, semantic color tokens, Geist fonts - #316

Merged
ajianaz merged 1 commit into
developfrom
feat/theme-tokens-fonts
Sep 3, 2026
Merged

feat(ui): fix theme architecture, semantic color tokens, Geist fonts#316
ajianaz merged 1 commit into
developfrom
feat/theme-tokens-fonts

Conversation

@ajianaz

@ajianaz ajianaz commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

What

  • Theme architecture fix: the old app.css put literal dark values in @theme inline, so every Tailwind color utility hardcoded dark-mode values and the :root:not(.dark) override only affected body inheritance. Users with a light system preference got a dark shell with near-black inherited text: headings, issue titles, and button labels were literally invisible (verified: --color-foreground resolved to oklch(0.145) while containers rendered inlined dark backgrounds). Restructured to the canonical pattern — semantic vars on :root/.dark, @theme inline mapping utilities to var() so mode-watcher toggling works in both modes
  • New --success/--warning/--info semantic tokens for both modes; replaced ~30 raw palette classes (text-green-600 dark:text-green-400 etc.) in utils.ts helpers and pages with token classes that adapt to mode automatically
  • Light-mode primary is now near-black (monochrome zinc system) instead of a one-off purple accent
  • Self-hosted Geist Variable + Geist Mono Variable (Fontsource, bundled offline); font-mono utilities now render Geist Mono
  • Span waterfall colors follow Sentry convention (db=amber, http=blue) via semantic tokens

Why

Light-scheme users saw a broken app (invisible text). The raw-palette helper classes had no dark variants on a dark-first theme, causing constant contrast bugs. Fonts were unstyled system-ui with no token.

Testing

  • npm run check (0 errors), npm test (10/10), npm run build pass
  • Full Playwright suite: 16/16 pass against a live server
  • Visually validated dark AND light modes at 1440px on issues list, issue detail, release health, and transaction waterfall (screenshots verified: all text visible, semantic colors correct in both modes)

Theme architecture fix (root cause):
- The old app.css put literal dark values in @theme inline, so Tailwind
  utilities hardcoded dark colors and ignored the :root:not(.dark)
  override entirely; users with a light system preference got a dark
  shell with near-black inherited text (invisible headings, titles,
  button labels). Restructure to canonical pattern: semantic vars on
  :root/.dark, @theme inline maps utilities to var() so mode-watcher
  class toggling works in both modes.

Tokens:
- Add --success/--warning/--info semantic tokens (both modes)
- Light-mode primary is near-black (monochrome zinc system), dropping
  the one-off purple accent
- Replace ~30 raw palette classes (text-green-600 dark:text-green-400
  etc.) in utils.ts helpers and pages with semantic token classes

Typography:
- Self-host Geist Variable + Geist Mono Variable via Fontsource
- Map --font-sans/--font-mono so font-mono utilities pick up Geist Mono
@ajianaz
ajianaz merged commit fffd6e9 into develop Sep 3, 2026
17 checks passed
@ajianaz
ajianaz deleted the feat/theme-tokens-fonts branch September 3, 2026 06:55
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