Repository navigation
feat(themes): add Dracula, Nord and Vesper and state the theme rule - #1256
Conversation
…r-theme hex in DESIGN.md
…he other herdr themes The herdr mapping fills --bg-elevated, --bg-input and --border from one token (surface0), so in every added theme the select wells, outlines and row dividers merged into the settings card. --border now takes the theme's herdr surface1; Solarized takes active_row_bg / selection_bg because surface1 is already --border-strong, Rose Pine takes selection_bg because surface1 is 1.09:1 against the card, and Rose Pine Dawn takes active_row_bg because surface1 is lighter than the panel. --border-strong moves to overlay0 wherever it would otherwise equal the new --border. Every moved role has an override record with dE and reason, DESIGN.md notes the moves above dE 5, and the legacy amber, charcoal and catppuccin values are untouched. Dracula, Nord and Vesper (todo 14) already part --border from the surfaces but set --border-strong equal to it; --border-strong now takes each theme's herdr overlay1 so it stays one step above --border, with records and notes. A settings test now asserts that --border differs from --bg-elevated, --bg-input and --border-strong for every supported entry. "palette" is again an Appearance search keyword (dropped with the new theme keywords), in ko, ja and zh as well.
…uage The Appearance search aliases are translated as one phrase, so the English word "palette" reached the palette only in English: Korean, Japanese and Chinese users typing it found nothing. The three translations now keep the literal word next to their own, as they keep openai, ssh, claude, codex and herdr, and the search test runs the real dictionaries through translate() for the literal word and for each language's own word.
Settings -> Appearance replaces the palette selects with a Dark theme and a Light theme picker, always shown, each listing every supported theme in two groups by kind with the side's own kind first. Picking one of the seven known pairs fills the other side with its sibling while that side is still the default or the previous pick's sibling (pickTheme); a side chosen by hand is kept. Any theme fits either side, so a dark theme chosen for light mode draws dark, as in herdr. The theme names are a label map the i18n test reads; the brand names stay as their projects write them, the color words Amber and Charcoal stay translated. The stale Colors, Light colors, Dark colors and System-mode strings leave the three dictionaries, and the Appearance search aliases drop "palette". Settings selects grow to a finger-sized target on touch screens. The settings-pages demo regression drives the new pickers for the six legacy combos, then Tokyo Night with its pre-filled Tokyo Night Day across the mode toggle, a dark theme on the light side under Light mode, and a hand-chosen side that is not refilled; the composer-fit regression iterates the real theme rows of each mode; the telemetry regression picks on the dark side.
In solarized-light the pressed segment fill --bg-hover equals the track (--bg-elevated and --bg-input, #eee8d5) and the AA repair left --text-strong 1.01:1 from --text-dim, so no Appearance segmented control showed its chosen option. --text-strong becomes herdr solarized surface0 (base02, #073642): 2.30:1 beside quiet labels and 10.6:1 on the track, with its override record (dE 26.00) and DESIGN pair note. A darker fill cannot pass both the AA gate and a visible-fill floor without darkening body text too, and a lighter one would hide the sidebar's selected row. A guard in src/lib/settings.test.ts checks every supported entry: the pressed fill parts from its track by 1.05:1 or the pressed label from --text-dim by 1.25:1. Legacy amber, charcoal and catppuccin values are untouched.
📝 Summary
Merge Risk: ⚪ Minimal · up to
|
…ne side A shared document an older server wrote holds only "palette". When a new client picked a theme for one side, the writer filled the other side with amber and mirrored amber into "palette", so fresh and older clients lost the user's synced look. Move the stored palette to the side it was drawn on before merging the change.
|
@coderabbitai review |
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
🔇 Additional comments: 10
scripts/generate-themes.test.ts: 1
170-185: LGTM!scripts/generate-themes.ts: 8
14-14: LGTM!
79-111: LGTM!
128-128: LGTM!
147-147: LGTM!
156-156: LGTM!
173-174: LGTM!
223-224: LGTM!
248-254: LGTM!src/lib/settings.test.ts-740-741: 1
740-741: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
⚠️ Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.Check border contrast, not only color equality.
The new assertion passes One Light even though its
--border(#e5e5e6) has only about 1.1:1 contrast against--bg-inputand--bg-elevated(#f0f0f1). Rosé Pine Dawn has a similarly faint edge. These control outlines can still be difficult to distinguish. Set a measurable contrast floor, then adjust the affected theme borders and their recorded overrides to meet it.
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository: devswha/herdr-web-ui/.coderabbit.yaml
- Review profile: CHILL
- Plan: Advanced
- Run ID:
3ec88ad6-99f4-45de-90ee-997f14d0da0d
⛔ Files ignored due to path filters: 1
src/lib/themes.generated.tsis excluded by!**/*.generated.*
📒 Files selected for processing: 21
CONTRIBUTING.mdDESIGN.mdTHIRD_PARTY_NOTICES.mdchangelog.d/herdr-themes.mddocs/guide.mdscripts/generate-themes.test.tsscripts/generate-themes.tsscripts/herdr-theme-overrides.tsscripts/settings-pages-demo-regression.tssrc/components/SettingsDialog.tsxsrc/lib/i18n.ja.tssrc/lib/i18n.ko.tssrc/lib/i18n.test.tssrc/lib/i18n.zh.tssrc/lib/paletteSettings.test.tssrc/lib/paletteSettings.tssrc/lib/settings.test.tssrc/lib/themeCss.test.tssrc/lib/themeCss.tssrc/lib/themeFor.test.tssrc/styles.css
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 0 remain after this review.
Part 4 of 4 for #1121 (stacked: based on part 3; review in order). Closes #1121.
Change
--borderdiffers from the surfaces it outlines); Solarized Light shows its selected segment. Tests guard both over every entry.Validation
bun run check fastgreen; legacy parity oracle unchanged.