feat(frontend): light/dark theme toggle#8
Open
DerekfromMadison wants to merge 4 commits into
Open
Conversation
added 4 commits
April 23, 2026 07:46
Double-click the session name in the drawer or tab bar to rename in place; the gear menu's Rename item and the mux session pencil button use the same inline input. Replaces the window.prompt flow with a single keystroke-friendly editor (Enter to commit, Escape to cancel, blur to save).
Single-click on the name span was being swallowed by the dblclick handler, breaking session selection. Move dblclick from the name span to the row, and use a drawer-local inline-rename helper that swaps the name node for an input (Enter commits, Escape cancels, blur saves).
Captures the CSS-var-based approach, mobile.css acceptance criterion, xterm hot-swap, persistence + reconciliation, and explicit out-of-scope list. rev4 — Codex APPROVE-WITH-NITS round 3, nits patched.
Adds App Settings → Display → Appearance with Dark/Light/System radio. Applied instantly without reload; persisted per-user to ~/.codeman/settings.json via existing /api/settings plus localStorage for flash-of-wrong-theme prevention. Implementation: - Theme-adaptive CSS vars on :root with html[data-theme="light"] override block. All literal hex/rgba color values in styles.css and mobile.css converted to var(--...) references (~900 hex replacements, 86 rgba replacements). - rgba(var(--text-rgb), X) pattern for alpha borders/bgs/text that auto-flip between white-on-dark and dark-on-white without per-rule overrides. - --text-on-accent invariant-white var for text on saturated accent/status buttons that kept white text in both modes (~49 button rules auto-migrated). - Status color family (--green/--yellow/--red/--purple) uses darker shades in light mode so status text meets WCAG AA on white bg. - XTERM_THEME_DARK / XTERM_THEME_LIGHT palettes with live hot-swap via terminal.refresh() for the main and all teammate terminals. - Theme-boot inline <script> in <head> writes data-theme before any stylesheet loads to avoid flash-of-wrong-theme. Mirrored in upload.html. - Two <meta name="theme-color"> tags with prefers-color-scheme media queries for iOS chrome. - matchMedia listener installed only when mode === 'system'; proper cleanup and Safari <14 fallback to legacy addListener API. - Server reconciliation via monotonic _themeActionVersion — last user action wins when server settings arrive after a local toggle. - --border-light text-color misuse (50+ spots) replaced with --text-dim so dim labels stay readable in light mode. - Welcome/run buttons with surface-2→accent gradients: solid accent bg in light mode so white text stays readable over the full button. - upload.html themed via its own compact --u-* palette (kept standalone). Schema: adds themeMode: z.enum(['dark','light','system']) to SettingsUpdateSchema.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It's light mode. You know, like that button every app has had since 2014.
Flip it on in Settings → Display → Appearance. Dark is still the default because we're not monsters. System mode follows your OS. xterm re-themes live so your terminal stops glowing at you in a coffee shop.
Also snuck in the inline session-rename commits from the other branch so they ship together.