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
feat(ui): add dark mode support for server dashboard (#450)
* feat(ui): add dark mode support with slate palette
- Add Tailwind CSS 4 dark variant (class-based via .dark toggle)
- Add system preference detection + localStorage persistence
- Add 🌙/☀️ toggle button in nav bar
- Apply dark: variants to all 14 components/pages
- Configure Recharts theme for dark mode (axis stroke, tooltip style)
- Use slate palette: slate-950 bg, slate-900 cards, slate-800 borders
Lint, typecheck, build, and all 11 tests pass.
* fix: dark mode a11y and visual polish
- Fix invisible checkmark in All Caught Up (add text-green-600/dark:text-green-400)
- Fix login page missing dark mode (add ThemeInitializer to App.tsx)
- Replace unicode toggle with animated switch + icon labels
* fix: address CodeRabbit review — deduplicate, simplify init, fix Recharts colors
- Extract confidenceColor to shared utils.ts, remove duplicate from KnowledgeUnitModal and ReviewCard
- Remove first useEffect in Layout; use lazy useState initializer for dark mode
- Make Recharts colors (axis, tooltip, legend) respond to current theme
* fix: address PR review feedback — useLayoutEffect, localStorage guard, a11y, cleanup
* fix: eliminate race condition — ThemeInitializer handles init, Layout handles toggle only
* fix(ReviewCard): add missing dark-mode text variant to neutral action-badge style
* fix(Layout): guard localStorage.setItem in toggle handler against blocked-storage contexts
* refactor(DashboardPage): extract useIsDark to shared hook under hooks/
* style(frontend): apply Biome formatting to satisfy CI lint
Biome reformats these files (import ordering and JSX line wrapping); the
committed versions were unformatted, which fails the CI lint check
(scripts/lint-frontend.sh runs git diff --exit-code under CI). No behavior
change.
* fix(Layout): seed dark-mode toggle state from the applied theme
Layout initialised its dark state to false regardless of the theme the
ThemeInitializer had already applied from localStorage or the system
preference. For users defaulting to dark, the toggle rendered the light
state and the first click only re-applied the already-present class, so it
appeared to do nothing. Seed the state from the document element's dark
class so the control reflects the active theme on first paint.
* feat(Layout): replace emoji toggle with icon button and add user menu
Swap the emoji-and-pill dark-mode switch for a single Heroicons sun/moon
icon button, and move the username and Logout into a dropdown menu so the
top-right controls read as two clear elements rather than a loose cluster.
The menu closes on outside click and Escape. Focus rings use focus-visible
so they appear on keyboard navigation but not after a mouse click.
---------
Co-authored-by: Peter Wilson <peter@mozilla.ai>
0 commit comments