Repository navigation
feat(ui): one light and one dark theme, modelled on Pendant - #14
Conversation
Light (warm paper) and Dark (charcoal) with a muted blue accent replace the fourteen themes; System stays the default. A stored retired theme reads as Light or Dark by its side. Send is a round button in the text colour, the desktop frame is a shade lighter than the cards, and the fonts only the retired themes used are no longer shipped.
Toggle theme flips what is shown; the pre-paint script ignores inherited keys and a test runs it against the hook for every stored value; the command palette lists the switcher's localized Light/Dark/System; status colours, the settings toggle and the providers badge hold contrast; dead dark-block tokens and Midnight fallbacks go.
…e parity test's ids
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Summary
tau ships one light and one dark theme, modelled on Pendant, plus System (the default), which picks one by the operating system. The colours were sampled from Pendant's public screenshots; the CSS is tau's own.
#F8F5EF, sidebar#F1F0EA) with a muted blue accent (#3A5C8C).#1A1C1E, sidebar#232526) with a lifted blue (#8EA8DA).app/globals.css. The light status colours (git letters, chart series) were darkened to hold AA on selected rows.Screenshots
Before (main, light and dark):
After (light, dark, phone light, phone dark):
Headless Chromium against a throwaway home with sample sessions; the fonts are the container's fallbacks.
Test plan
tsc --noEmit, eslint (0 errors), full test suite (4265 pass, 0 fail) at3b55e067e;hooks/useTheme.test.mjsandtscagain at the head.bun scripts/build-client.ts, plus the screenshots above at 1600×1000 and 390×844.Review
Review round 1 (full): adversarial
Scope:
087061f6b..ff075a970(whole change). Tool: adversarial-review.app/index.htmlmidnight, still passed.vmfor every stored value × OS; red for both mutations)hooks/useTheme.tsnextThemePreferenceapp/index.htmlconstructorpainted light, the hook resolved dark.CHANGELOG.mdcomponents/CommandPalette.tsx.settings-toggle, providers badge--accent-strong(5.99:1) in 3b55e06; toggle knob in the page colour (7:1) in 6b591bacomponents/MessageView.tsxvar(--accent, #EC5BAB)keeps Midnight's pink as a fallback.--font-mono'JetBrains Mono'.Not checked: a real browser's first frame and view-transition wipe; screen readers.
Review round 1 (full): code review
Scope:
087061f6b..ff075a970(whole change). Tool: code-review-and-quality.hooks/useTheme.tsapp/index.htmlapp/index.html,hooks/useTheme.tshooks/useTheme.tsapplyDomThemehtml.midnight.components/MessageView.tsx--status-*--bg-selected(predates this PR).components/CommandPalette.tsxNot checked: a browser run.
Review round 1 (full): simplification
Scope:
087061f6b..ff075a970(whole change). Tool: code-simplification.app/globals.cssdark blockhtml.darkrule;--on-accent/--overlay-backdroprepeat:root.useTheme.ts,index.html.dark,theme-*anddata-thememark one bit.useTheme.tstheme tableLIGHT_THEMES/DARK_THEMESand an unusedThemeDefinition.mode.THEME_PANEL; the palette maps the switcher's options)isDarkThemetheme === "dark".useTheme.tseffectsuseTheme.tscommentglobals.cssframevar(--bg-frame, var(--bg-panel))fallback can no longer trigger.MessageView.tsxappShell.switchToSystemTheme/systemThemeunused (predates this PR).Not checked: behaviour; this pass reads only.
Review round 2 (light): code review
Scope:
ff075a970..3b55e067e(the round 1 fixes). Tool: code-review-and-quality..settings-toggle--accent-strongthe dark on-track is 2.57:1 against the panel, so on and off differ mainly by knob position.--accent, knob in the page colour: 7:1)hooks/useTheme.test.mjscomponents/MessageView.tsx#7CA8FF…) remain.Round 2 reviewed head
3b55e067e;6b591baf6fixes only its Low findings and nits. Rounds used: 1 of 3 after the first full review. No next round is due.Summary by CodeRabbit
New Features
Bug Fixes