Add light theme with sidebar toggle#29
Conversation
Adds a complete light theme toggled via a sun/moon button in the sidebar header. Theme choice persists in localStorage and applies before render to prevent flash. This is a practical demonstration of the semantic token system: the entire light theme is CSS variable overrides with zero component changes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Use prefers-color-scheme to pick the initial theme instead of hardcoding dark. A manual toggle still overrides via localStorage. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
93f0fdc to
368aa57
Compare
Address PR feedback on light mode contrast issues: - Sidebar: stronger text colors, visible active nav state, tab icons - Restart banner: darker border and text for contrast - Links/modals: solid accent-link color, override hardcoded cyan inline styles - Badges: override faint cyan/blue/indigo/purple for light backgrounds - Onboarding: add theme toggle, replace hardcoded colors with CSS variables - Theme toggle: default to OS preference, simple dark/light switch - Setup step: fix invisible text-white on light backgrounds Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Addressed the feedback from the review:
Also did a broader pass on the onboarding flow to catch other light-mode issues (progress bars, segmented control, "Required" badge, setup step spinner/error text). |
Resolve conflicts: - sidebar.js: keep both ThemeToggle import and new session-keys imports - storage-keys.js: keep both theme key and chat key - tailwind.generated.css, app.bundle.js: removed from tracking (now gitignored upstream) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Nice! Getting really close. Last few things I noticed:
- the protected file bar text / bg here is a little illegible
- there should be a way to return to the "system" setting (perhaps on hover, it can show a dropdown menu, use computer icon for system)
- default should always be dark mode
Great work, excited to ship this after these few changes!
- Rewrite theme toggle from simple dark/light button to hover dropdown with dark, light, and system options (using computer icon for system) - Default to dark mode for first-time visitors (not OS preference) - Add "system" preference that follows OS and listens for changes - Fix protected file banner legibility in light mode (amber, red, blue variants) - Update login.html and setup.html early scripts to handle "system" preference Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Addressed the three review items:
All 481 tests passing |
chrysb
left a comment
There was a problem hiding this comment.
Thanks for the big light-theme feature here. I made a few maintainer tweaks on top for the theme menu interaction and light-mode logo polish, and this looks good from my side.



Depends on #27. Diff will shrink to 6 file changes if merged.
What this does
Adds a light theme to alphaclaw, toggled via a sun/moon button in the sidebar header. The theme choice persists in localStorage.
This is a practical demonstration of the semantic token system from #27. The entire light theme is defined in CSS variable overrides. No component files were touched.
Changes
[data-theme="light"]block overriding all CSS variables, plus light-mode overrides for hardcoded dark patterns (buttons, toggles, cards, grid texture, scrollbars)<script>to apply saved theme before render (prevents flash)Verification