Add Haar, Abyss and Understory atmosphere themes - #456
Closed
parsakhaz wants to merge 1 commit into
Closed
Conversation
Three low-saturation themes drawn from natural light: Haar (pre-dawn sea fog, light base), Abyss (deep ocean, dark), Understory (moss and bark, dark). Full token coverage in colors.css plus effects/spacing/index.css shells and Monaco overrides, high-contrast blocks, and registration in every theme list (provider, bootstrap scripts, config types). Also: a shared THEME_OPTIONS list with picker descriptions feeding both theme pickers, an isLightTheme helper replacing hard-coded light checks, scripts/check-theme-contrast.mjs (pnpm check:theme-contrast), an opt-in Playwright screenshot generator, and screenshots/themes/ evidence.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
React Doctor found 2 new issues in 1 file · 2 warnings · score 68 / 100 (Needs work) · 3 fixed · vs 2 warnings
Reviewed by React Doctor for commit |
6 tasks
parsakhaz
added a commit
that referenced
this pull request
Aug 18, 2026
…families (#459) Consolidates #451, #453, #454, #456 and themes-a11y into one batch: synthwave, acid, tokyo-rain, folio, newsprint, walnut, amber-crt, teletype, dot-matrix, haar, abyss, understory, colorblind-safe, low-fatigue, high-legibility. Pickers read one grouped THEME_OPTIONS list; pnpm theme:contrast gates all 15; pnpm theme:screenshots regenerates screenshots/themes/batch/.
Member
Author
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.
Three new themes in the Atmosphere & Natural Light direction — each drawn from a real light condition, low-saturation and tonal rather than neon. One of five parallel theme batches; compare and cherry-pick. No new dependencies.
Try them: check out the branch,
pnpm dev, Settings → Appearance → Theme (or the Theme dropdown on the Home page).Lane: light: simple-plan → prepare-pr.
For cherry-picking: besides the three themes and their registration, this PR carries theme-agnostic scaffolding — a contrast checker, a single
THEME_OPTIONSsource for both pickers, anisLightTheme()helper (Haar depends on it), and a screenshot generator. Details under Shared changes.The themes
haar#eceff3·#f5f7f9·#252d36·#4f6d8a·#e6ebefabyss#07111c·#0b1826·#dbeaf1·#4db8ab·#04090funderstory#131911·#192117·#e4e9d9·#a6b56d·#0d110cAppearance picker (all three, with their one-line descriptions):
Design notes:
lightbase; Abyss and Understory ondark. All three use the islanded-shell layout (like Dusk/Forge/Light-rounded) with theme-specific depth borders.Contrast
Each of
haar,abyss,understory: 44/44 token pairs pass, plus 4/4 high-contrast pairs.Those numbers come from a new script. No contrast tooling existed (PR #362 fixed tokens by hand), so this adds
scripts/check-theme-contrast.mjs(pnpm check:theme-contrast, no dependencies). It resolvesvar()chains per theme class list the way the cascade does, composites alpha colors, and checks 44 token pairs per theme — body/secondary/tertiary/muted text on backgrounds, sidebar text, button text on button fills (all states), input text and placeholder, status + focus ring at ≥3:1, terminal fg + cursor + all 15 ANSI colors against the terminal background — plus 4 more with the additive.high-contrastclass (muted family ≥7:1).Run with no arguments it also checks the 12 existing themes and surfaces pre-existing debt. I did not touch those tokens (out of scope); listed below so it's not mistaken for a regression from this PR. Because of that debt the script is a standalone command, not part of
pnpm lint.Pre-existing contrast debt in the 12 existing themes (not changed here)
--color-input-placeholderunder 4.5:1 — dark, dusk, dusk-oled, forge, night-owl, night-owl-oled, terracottaShared changes (not theme-specific)
frontend/src/styles/tokens/colors.css(:root.<id>block +:root.high-contrast.<id>block),effects.css,spacing.css,frontend/src/index.css(body background, islanded shells, depth borders, tab underline, Monaco vars),frontend/src/styles/monaco-overrides.css(note: that file isn't imported anywhere — the live Monaco overrides are the copy inindex.css; updated both for parity, deleting the dead file is a separate cleanup).themeContextValue.ts,ThemeProvider.tsx, bothindex.htmlbootstrap scripts,frontend/src/types/config.ts,main/src/types/config.ts.frontend/src/utils/themeOptions.ts— singleTHEME_OPTIONSlist (id · label · description) now feeds both pickers (Appearance settingsSelectand the HomePage dropdown); the HomePage label map is gone, and a missing entry for anyThemeid is a typecheck error.SelectItemgained an optionaldescriptionline rendered outsideItemText, so the trigger still shows just the label. New themes are grouped after the two Light entries; existing relative order unchanged. Side effect: the HomePage dropdown now uses the same order as Settings (it previously listed Light (sharp)/Dark/OLED at the end).isLightTheme()inthemeContextValue.tsreplaces four hard-codedtheme === 'light' || theme === 'light-rounded'checks (DiffViewer, FileEditor, LogsView, usePaneLogo) — otherwise Haar would have gotten dark Monaco/diff colors and the dark logo.tests/theme-screenshots.spec.ts— opt-in (THEME_SCREENSHOTS=1) generator forscreenshots/themes/; skipped in normal runs. Drives the mocked app (terminal dock with a restored ANSI sample + Review/diff panel) at 1440×900. Screenshots are of the real renderer via the existing Playwright mock, not the Electron shell.tests/accessibility.spec.ts(theme-name regex; Night Owl menu item matched by label prefix now that items carry a description in their accessible name),tests/settings.spec.ts(same for the Select option),tests/dropdown-keyboard-nav.spec.ts(arrow-key expectations follow the new item order — second item is Light (sharp), selection test now picks Haar).Testing
pnpm typecheck,pnpm lint(oxlint, eslint, advisory, knip) — clean.pnpm check:theme-contrast haar abyss understory— pass.pnpm --filter frontend test— 165 passed.tests/accessibility.spec.ts,tests/settings.spec.ts,tests/dropdown-keyboard-nav.spec.ts,tests/review-availability.spec.ts— all pass exceptsettings.spec.ts:282(“discards remote subview drafts…”), which also fails on a clean stash of these changes (environmental, unrelated).THEME_SCREENSHOTS=1 PLAYWRIGHT_PORT=4587 pnpm exec playwright test tests/theme-screenshots.spec.ts.Manual checks worth doing in the app: toggle High contrast on each of the three; open a Monaco editor tab and a Logs tab under Haar (light detection); check the terminal palette with a real CLI (Claude Code / Codex) under Abyss and Understory.