Add Amber CRT, Teletype and Dot Matrix retro themes - #454
Closed
parsakhaz wants to merge 3 commits into
Closed
Conversation
Three retro-computing themes with full token coverage: amber-crt (dark, amber-phosphor on black-brown glass), teletype (light, brown ink on warm paper with burnt-orange/olive accents) and dot-matrix (dark, 4-step LCD green with one hot accent for errors). Each gets colors/effects/spacing tokens, shell chrome, monaco and terminal palettes, high-contrast blocks, and picker entries with one-line descriptions. Light/dark detection for Monaco, the diff view, log rendering and the logo now derives from the theme's base class (isLightTheme) instead of comparing against the two original light ids, so teletype renders as a light theme. Adds scripts/check-theme-contrast.mjs (pnpm theme:contrast) as a WCAG gate over the token pairs, an opt-in Playwright spec (pnpm theme:screenshots) that regenerates screenshots/themes/*.png, and the resulting evidence captures.
- Fail the gate on unresolved tokens instead of silently skipping them, and composite navigation pairs over the navigation surface rather than bg-primary. - Drop the parity edits to monaco-overrides.css (nothing imports it; the live overrides are in index.css). - Use a real hunk from this change in the screenshot fixture, fix the teletype muted-text annotation, and refresh the stale THEME_CLASSES pointer.
|
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 67 / 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.
Summary
Three new colour themes in the retro computing & hardware direction:
amber-crt(amber-phosphor CRT, dark),teletype(1970s beige-and-brown "terminal on paper", light) anddot-matrix(monochrome-green early LCD, dark). Retro is the palette and hierarchy only — no scanlines, no filters, no new dependencies.Complete: every theme overrides the full token set (chrome, shells, buttons, inputs, focus rings, status, scrollbars, terminal palette, Monaco), works with the additive high-contrast mode, and passes a new WCAG contrast gate (61/61 pairs each, with and without high contrast).
Beyond the three themes, this PR also carries small shared changes a cherry-picker should know about — a
isLightTheme()helper replacing four hard-coded light-id checks (only teletype needs it; it is what gives a new light id the light diff/editor/log palettes),THEME_CLASSESmoved fromThemeProvider.tsxintothemeContextValue.ts, an optionaldescriptionprop onui/Select'sSelectItem, apnpm theme:contrastscript and an opt-inpnpm theme:screenshotsPlaywright spec. Existing themes are not gated by the script and their behaviour is unchanged. Details under What changed.Lane: light: simple-plan → prepare-pr. Batch context: one of five parallel panes, each adding three themes in a different direction.
The themes
amber-crt#140f08·#1b140a·#f0d9a8·#ffb000·#0c0905teletype#f5efe2·#fbf8f1·#2b2116·#b5451b·#f3ecdcdot-matrix#10150c·#161d10·#dcecb0·#8bac0f·#0a0d08Shell patterns: teletype uses the light-rounded pattern (islanded, rounded shells on a beige frame); amber-crt and dot-matrix use the dusk/terracotta two-tone pattern (chrome on
bg-primary, editor and terminal sunken to the near-black-950step), so an OLED variant would only need to drop those two steps to pure black.Try them: check out the branch,
pnpm dev, Settings → Appearance → Theme (or the Home page Preferences dropdown).Amber CRT
Teletype
Dot Matrix
Appearance picker (descriptions render under the label)
Every capture shows the sidebar, a pane with the Review diff open, and the bottom terminal printing the 16 ANSI colours. They were driven through the existing Playwright +
electronApiMocktooling — a mocked session, not a live agent — and are committed underscreenshots/themes/(the inline images above are the same files pinned to commitd95941b).What changed
Per theme (tokens and CSS)
colors.css: primitives (--crt-*,--tty-*,--lcd-*), full:root.<theme>blocks (same token set asterracottafor the dark pair, aslightfor teletype), and:root.high-contrast.<theme>blocks at ~7:1.effects.css/spacing.css: per-theme radii, shadows, density.index.css: structural shell selectors, tab underline, xterm radius, body backgrounds, Monaco--vscode-*overrides (teletype's block sits after:root.lightso it wins the cascade).frontend/src/styles/monaco-overrides.cssis untouched — nothing imports it; the live Monaco overrides are the ones inindex.css.Shared registration (all three ids added to the same lists)
themeContextValue.ts(Themeunion,THEME_CLASSESmoved here fromThemeProvider.tsx, newisLightTheme()),ThemeProvider.tsx, the two pre-React bootstrap scripts infrontend/index.html,frontend/src/types/config.ts,main/src/types/config.ts.AppearanceSettingsTHEMES entries with a one-line description, rendered through a new optionaldescriptionprop onui/Select'sSelectItem(outsideItemText, so the trigger still shows only the label).HomePagedropdown entries use the Dropdown's existingdescription.Touches existing code paths
DiffViewer,FileEditor(Monacovs-dark/light),LogsView(ANSI converter) andusePaneLogocomparedthemeagainst the two original light ids; they now useisLightTheme(theme), so teletype gets the light diff/editor/log palettes. No change for existing themes.New tooling
scripts/check-theme-contrast.mjs(pnpm theme:contrast [--high-contrast] [theme…]). PR fix: restore contrast correction for themes and CLI output, add high-contrast mode #362 fixed contrast by hand; there was no script to extend, so this is new. It is a manual/pre-PR check — not wired intopnpm lintor CI.colors.css, resolvesvar(), compositesrgba()over the surface it sits on (bg-primary, or the navigation surface for sidebar pairs), and checks 61 pairs per theme: text tiers on bg/surface/card/modal, buttons (all states), inputs, nav, status + text-on-status, focus ring, terminal fg/cursor/16 ANSI colours.--color-text-disabled(WCAG 1.4.3 exempts disabled controls, per the note incolors.css) and 1px borders.tests/theme-screenshots.spec.ts, opt-in viapnpm theme:screenshots(PANE_THEME_SCREENSHOTS=1); skipped in the normal suite.tests/accessibility.spec.tstheme-trigger regex extended.Verification
pnpm lint,pnpm typecheck— clean.pnpm theme:contrast amber-crt teletype dot-matrixand--high-contrast— 61/61 pairs each.pnpm theme:screenshots— 4/4 pass, output committed.tests/settings.spec.ts+tests/accessibility.spec.ts— 27 pass; the one failure (discards remote subview drafts…) also fails on a clean checkout ofmain, unrelated.Pre-merge testing
Notes for the batch aggregation
amber-crt,teletype,dot-matrix.2ff2a58 Tighten theme contrast gate and screenshot fixture after review). The Codex lane was unavailable (usage limit).THEME_CLASSESis mirrored by hand inindex.htmland the contrast script with no sync test.