Skip to content

feat(themes): add Dracula, Nord and Vesper and state the theme rule - #1256

Merged
devswha merged 40 commits into
mainfrom
theme-table/4-dark-only
Oct 17, 2026
Merged

devswha merged 40 commits into
mainfrom
theme-table/4-dark-only

Conversation

@devswha

@devswha devswha commented Oct 17, 2026

Copy link
Copy Markdown
Owner

Part 4 of 4 for #1121 (stacked: based on part 3; review in order). Closes #1121.

Change

  • Adds herdr's dark-only Dracula, Nord and Vesper (selectable on either side, no sibling).
  • CONTRIBUTING: themes follow herdr's built-ins through the theme table, replacing the three-palette rule; DESIGN.md and docs/guide.md describe the two pickers.
  • Control edges stay visible in every added theme (--border differs from the surfaces it outlines); Solarized Light shows its selected segment. Tests guard both over every entry.
  • "palette" finds the Appearance page in every language again.
  • The generator parses the stylesheet once per run (about 28x faster), and the remaining DESIGN.md theme tables (terminal, syntax, notice) are generated too, so a color has exactly one edit point.

Validation

  • bun run check fast green; legacy parity oracle unchanged.
  • Every theme checked on the demo build at 1280x800 and 390x844 (Appearance and chat), System switching, either-side picks and migration from two pre-change saved settings; the six legacy looks are pixel-identical to main.
  • Edge and segment guards fail on a reverted temp copy.

…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.
@coderabbitai

coderabbitai Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

📝 Summary

Summary by CodeRabbit

  • New Features
    • Added Dracula, Nord, and Vesper themes to the dark and light theme selectors.
    • Appearance settings can now be found by searching for “palette” or its localized equivalent.
  • Bug Fixes
    • Improved border and text contrast across several themes, including clearer distinctions between surfaces and borders.

This change adds Dracula, Nord, and Vesper themes, adjusts colors in existing themes, and updates theme selection coverage. It also expands generated theme documentation and documents theme contribution requirements.

Changes: Built-in themes and reviewed colors

Layer / File(s) Summary
Theme palettes and reviewed colors
src/styles.css, scripts/herdr-theme-overrides.ts, src/lib/settings.test.ts, CONTRIBUTING.md, DESIGN.md, THIRD_PARTY_NOTICES.md, changelog.d/herdr-themes.md
Adds Dracula, Nord, and Vesper palette blocks and records color overrides. Updates borders and strong text in existing themes. Adds contrast and surface-distinction checks, attribution, and theme contribution requirements.

Theme selection and generated documentation

Layer / File(s) Summary
Theme selection and settings coverage
src/components/SettingsDialog.tsx, src/lib/i18n.*.ts, src/lib/paletteSettings.ts, src/lib/themeCss.ts, src/lib/themeFor.test.ts, src/lib/settings.test.ts, scripts/settings-pages-demo-regression.ts, docs/guide.md, DESIGN.md, changelog.d/herdr-themes.md
Updates theme names, translations, search aliases, and descriptions. Adds coverage for selecting themes on either side, rendering a dark theme in Light mode, and falling back to amber for an unknown theme ID.
Generated theme documentation
scripts/generate-themes.ts, scripts/generate-themes.test.ts, DESIGN.md
Adds generated terminal, syntax, and alert token rows. The generator shares parsed theme blocks and resolved amber entries across output renderers. Tests check generated values and detect stale documentation.

Priority: ➖ Normal

Estimated code review effort: 4 (Complex) | ~45 minutes

Change: Feature

Suggested reviewers: haeminway1, kratam

Merge Risk: ⚪ Minimal · up to 4066b

No substantiated issue currently blocks merging. The borders remain subtle, but the available evidence does not establish that they violate the theme requirements.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 41.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 12 functions across 15 files. (6 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely identifies the three added themes and the documented theme-selection rule.
Description check Passed The description includes the required Change and Validation sections. It explains the behavior, references issue #1121, and lists relevant checks and results.
Linked Issues check Passed Issue #1121 requires the built-in theme set, Dark/Light/System mode, separate dark and light selections, paired-theme behavior, migration, translated names, and color checks. The whole-PR summary reco…
Out of Scope Changes check Passed The changes remain within issue #1121. Theme-table generation, CSS overrides, generated documentation, contribution guidance, attribution notices, localization, settings search, and regression tests s…
Full details: Linked Issues check

Explanation

Issue #1121 requires the built-in theme set, Dark/Light/System mode, separate dark and light selections, paired-theme behavior, migration, translated names, and color checks. The whole-PR summary records the picker, migration, and sync implementation, the three remaining dark-only themes, paired-selection tests, and localization updates. The CSS and settings tests cover surface and border separation, selected-control contrast, and theme resolution. The reported validation also covers status and code colors. The issue's later herdr API integration is explicitly out of scope for the planned steps.

Full details: Out of Scope Changes check

Explanation

The changes remain within issue #1121. Theme-table generation, CSS overrides, generated documentation, contribution guidance, attribution notices, localization, settings search, and regression tests support theme implementation, validation, or documentation. No unrelated product behavior or later herdr-following integration is identified.

Full details: Docstring Coverage

Explanation

Docstring coverage is 41.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 12 functions across 15 files. (6 skipped: 6 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

…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.
Base automatically changed from theme-table/3-settings to main October 17, 2026 13:06
@devswha devswha closed this Oct 17, 2026
@devswha devswha reopened this Oct 17, 2026
@devswha

devswha commented Oct 17, 2026

Copy link
Copy Markdown
Owner Author

Reopened: it was closed automatically when its base branch theme-table/3-settings was deleted on merging #1255. main is merged in (4066b5e).

@devswha

devswha commented Oct 17, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@devswha

devswha commented Oct 17, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔇 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-input and --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
📥 Commits

Reviewing files that changed from the base of the PR and between e50d923 and 4066b5e.

⛔ Files ignored due to path filters: 1
  • src/lib/themes.generated.ts is excluded by !**/*.generated.*
📒 Files selected for processing: 21
  • CONTRIBUTING.md
  • DESIGN.md
  • THIRD_PARTY_NOTICES.md
  • changelog.d/herdr-themes.md
  • docs/guide.md
  • scripts/generate-themes.test.ts
  • scripts/generate-themes.ts
  • scripts/herdr-theme-overrides.ts
  • scripts/settings-pages-demo-regression.ts
  • src/components/SettingsDialog.tsx
  • src/lib/i18n.ja.ts
  • src/lib/i18n.ko.ts
  • src/lib/i18n.test.ts
  • src/lib/i18n.zh.ts
  • src/lib/paletteSettings.test.ts
  • src/lib/paletteSettings.ts
  • src/lib/settings.test.ts
  • src/lib/themeCss.test.ts
  • src/lib/themeCss.ts
  • src/lib/themeFor.test.ts
  • src/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.

@devswha
devswha merged commit d87711b into main Oct 17, 2026
9 checks passed
@devswha
devswha deleted the theme-table/4-dark-only branch October 17, 2026 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Theme: offer herdr's built-in themes (on hold)

1 participant