Skip to content

Use browser theme validation and an offline appearance bootstrap - #639

Open
parsakhaz wants to merge 1 commit into
mainfrom
codex/audit-themes
Open

parsakhaz wants to merge 1 commit into
mainfrom
codex/audit-themes

Conversation

@parsakhaz

Copy link
Copy Markdown
Member

The theme tests and CLI each modeled CSS parsing and cascade rules, while the first-paint bootstrap maintained another copy of the theme map. Both color parsers accepted mixed RGB syntax that Chromium rejects. Validation also exposed a runtime Google Fonts import that can reject Vite's CSS preload and prevent the desktop renderer from starting offline.

This PR uses Chromium computed styles with one contrast/report engine, preserving the union of every existing theme threshold, editorial surface/button checks, high-contrast requirements, and CVD separation. Vite now embeds the canonical theme map and defaults directly into the synchronous bootstrap in development and production. It also fixes the invalid color declarations and uses existing local/system font fallbacks without a runtime font CDN.

The duplicate parser and source-regex suites are removed. CI runs the unified contrast gate and appearance browser journeys. The latter now verifies all 27 themes before React can load, authoritative snapshot precedence over conflicting cached settings, startup with Google Fonts blocked, live window/terminal/diff theme updates, and Fixed appearance behavior. Its obsolete combined-diff fixture is updated to the current manifest/file API.

Validation:

  • pnpm lint and pnpm typecheck with pinned pnpm 10.19.0.
  • pnpm build:frontend, including xterm request-mode and production React Scan verifiers.
  • 2,619/2,619 enforced contrast checks and 24/24 CVD checks; Markdown/CVD report flags exercised.
  • Negative checks confirm failures for original-theme muted text, editorial-only surface contrast, and CVD separation; --all retains report-only behavior.
  • All 8 appearance journeys verified against the production build (including a targeted rerun after repairing the stale diff locator); all 27 pre-React theme cases also verified in Vite development mode.

No dependencies or supply-chain exceptions are added.

Closes #625
Closes #626
Closes #631
Closes #635

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 14, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-14T07:42:33.805815Z c661d41 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown

React Doctor found no new issues. 🎉

Reviewed by React Doctor for commit c661d41.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant