Add Folio, Newsprint and Walnut editorial themes - #453
Closed
parsakhaz wants to merge 1 commit into
Closed
Conversation
Three print-and-paper themes: Folio (cream paper & ink, light), Newsprint (cool grey stock, graphite, ink-blue accent, light) and Walnut (warm brown-black, parchment, brass accent, dark). Full token coverage incl. high-contrast blocks, terminal palettes and Monaco vars. - Export THEME_CLASSES and derive isLightTheme from it; DiffViewer, FileEditor and usePaneLogo no longer hardcode the two light ids - LogsView reads the theme's terminal palette instead of a fixed one - ThemeProvider stamps classes in a layout effect so descendants' effects read fresh tokens - SelectItem gains an optional description line; pickers describe the three new themes - Add vitest contrast gate (themeContrast.test.ts), index.html sync test and a Playwright screenshot spec; commit screenshots/themes/*.png
|
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) · 2 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.
Lane: light: simple-plan → prepare-pr
Direction: editorial / print & material — the calm lane of the five-PR theme batch. Three print-and-paper themes: Folio (cream paper & ink, light), Newsprint (cool grey stock, light), Walnut (vellum on walnut, dark). Low saturation, generous tonal steps, one accent used only for links, the active-tab rule, the primary button and the focus ring. Meant to be the calmest, most readable themes in the batch.
The themes
folio#f6f0e4·#fbf7ee·#1f1b17·#b3321c·#fbf7eenewsprint#f1f2f0·#f8f8f6·#24272b·#1f4e8c·#f8f8f6walnut#1a1512·#221c18·#ede1cd·#c9a24d·#120e0bEach screenshot is the same mocked session: sidebar, Review (diff) panel open, terminal dock replaying an ANSI sample so all 16 palette slots are visible.
Folio
Newsprint
Walnut
Appearance picker
The three carry a one-line description under the name (the other twelve don't yet — see "Two calls for you" below).

Regenerate:
THEME_SCREENSHOT_DIR=screenshots/themes pnpm test -- tests/theme-screenshots.spec.ts(tests/theme-screenshots.spec.ts, Playwright + the mocked Electron API).Before you cherry-pick
Two kinds of change in this PR. Only the first is per-theme; full file list under "What changed".
colors.css,effects.css,index.css,monaco-overrides.css, the theme registrations, and the two picker lists. Every lane touches these files, so expect merge conflicts here across the five PRs.isLightThemereplaces the hardcodedtheme === 'light' || 'light-rounded'checks in the diff viewer, editor and logo. Needed by Folio and Newsprint (light-based) — without it, any new light-based theme (these two, or another lane's) gets a dark diff view and dark editor.SelectItemgains an optionaldescription— this is what puts the one-liners in the picker. Only needed if the picker descriptions stay (second call below).LogsViewnow reads the theme's terminal palette instead of its own hardcoded one. Applies to every theme, not just these three — existing themes' logs change to their own terminal palettes too.ThemeProviderstamps theme classes inuseLayoutEffect, so the terminal and logs no longer see the previous theme's classes on a switch. Independent fix, not specific to the three themes.Two calls for you:
effects.css/index.cssrecord this so it isn't read as an omission.Contrast (measured, WCAG ratios)
Targets: text ≥ 4.5, UI/ANSI ≥ 3, high-contrast muted ≥ 7 — every cell above clears its target. The ratios are enforced by a new vitest, not measured by hand (see "Tests").
What changed
Theme-only (the merge-conflict zone):
frontend/src/styles/tokens/colors.css— primitive ramps + full:root.folio/:root.newsprint/:root.walnutblocks covering the union of every variablelightandterracottaoverride (118 in each block: backgrounds, surfaces, text, borders, interactive/focus, status, buttons, cards, forms, modal, navigation, scrollbar, tab indicator, terminal palette + selection), plus:root.high-contrast.<theme>blocks at the end so they win over the base light/dark high-contrast blocks.effects.css(print-like radii, no drop shadows),index.css(underline tab indicator, Monaco editor vars),monaco-overrides.csskept in sync.Themeunion +THEME_CLASSES(themeContextValue.ts), bothindex.htmlbootstrap scripts,frontend/src/types/config.ts,main/src/types/config.ts(two unions).AppearanceSettings.tsxandHomePage.tsxentries.Cross-cutting (the detail behind the bullets above):
THEME_CLASSESis now exported fromthemeContextValue.tsand is the single source forThemeProvider's valid-theme set and class removal list;isLightTheme(theme)is derived from it.DiffViewer,FileEditor(Monacovs/vs-dark) andusePaneLogohardcodedtheme === 'light' || 'light-rounded'. They now useisLightTheme. Without this, any new light-based theme gets a dark diff view and dark editor.LogsViewhad its own hardcoded GitHub/Tailwind 16-colour ANSI palette. It now reads the theme's--color-terminal-*tokens viagetTerminalTheme(), so log colours match the terminal in every theme (existing themes' logs change to their own terminal palettes too).ThemeProviderstamps theme classes inuseLayoutEffectinstead ofuseEffect. React runs child passive effects before the parent's, soTerminalPanel'suseEffect(() => getTerminalTheme(), [theme])— and the new LogsView read — saw the previous theme's classes (the same trap PR fix: restore contrast correction for themes and CLI output, add high-contrast mode #362 hit for high-contrast). Layout effects run before any passive effect and before paint.SelectItem(ui/Select.tsx) gains an optionaldescriptionrendered under the label, outsideItemTextso the trigger still shows just the name. Items without a description render exactly as before.Tests:
frontend/src/styles/themeContrast.test.ts(vitest, already in CI viapnpm --filter frontend test) parsescolors.css, resolves each theme's cascade (same-specificity source order, alpha compositing,var()chains) and asserts: all 15 themes — muted text ≥ 4.5 on--color-bg-primary, ≥ 7 with.high-contrast; the three new themes — text on 16 surfaces, links/status/focus/accent, button label vs bg in every state, all 16 ANSI colours vs terminal bg, and a token-coverage check (no half-theme fallbacks). It also assertscolors.cssblock order matchesTHEME_CLASSESso the cascade model can't silently drift.frontend/src/contexts/themeClasses.test.tspins bothindex.htmlbootstrap copies toTHEME_CLASSES(PR fix: restore contrast correction for themes and CLI output, add high-contrast mode #362 found that copy had drifted).tests/theme-screenshots.spec.tsproduces the four PNGs above.Checks
pnpm typecheck✓ ·pnpm lint✓ (exit 0) ·pnpm --filter frontend test214/214 ✓theme-screenshots,dropdown-keyboard-nav,settings,accessibility,sidebar-compact✓. One pre-existing failure insettings.spec.ts("discards remote subview drafts…") also fails on a clean checkout and is unrelated (Remote Access host-setup flow).Review
Claude implementation-reviewer, against the plan. Its blocker — Walnut's 700→600 ramp step had collapsed to 1.02:1, making secondary-button hover and active rows invisible — is fixed, as are its smaller items (LogsView palette, layout-effect ordering, cascade-order assertion,
index.htmlsync test, "flat shell is intentional" comments). The Codex review lane could not run: the Codex account is at its usage limit until Aug 19.Manual testing
index.htmlis synced).