Skip to content

Windows: guard the light theme in CI - #337

Merged
vinzdg merged 1 commit into
vinzdg:mainfrom
abrahaofv:ci/windows-theme-guards
Sep 24, 2026
Merged

vinzdg merged 1 commit into
vinzdg:mainfrom
abrahaofv:ci/windows-theme-guards

Conversation

@abrahaofv

Copy link
Copy Markdown
Contributor

Follow-up to #333 after #320 landed the broader implementation.

  • runs test-light-surface.cjs in the Windows workflow;
  • updates the guard for the current theme / data-theme contract, including Settings, dropzones, palette parity and SVG redraws;
  • preserves a configuration's other choices when theme is missing or malformed, including JSON objects and arrays.

Tests:

  • node scripts/check-ui-scripts.mjs
  • node --test test-light-surface.cjs
  • node scripts/test-claude-auth-ui.cjs
  • node --test scripts/test-ko-i18n.cjs
  • node --test test-codex-headline.cjs
  • cargo test --locked

Co-authored-by: Codex <322868195+abrahaofvcodex@users.noreply.github.com>
@abrahaofv
abrahaofv requested a review from vinzdg as a code owner September 23, 2026 04:18
@vinzdg
vinzdg merged commit 37d9dd2 into vinzdg:main Sep 24, 2026
4 checks passed
@vinzdg

vinzdg commented Sep 24, 2026

Copy link
Copy Markdown
Owner

Merged as 3d9f7c2. Thanks @abrahaofv — this is the follow-up I asked for when closing #333, and it's better than what I asked for.

I mutated four things independently to check it actually fails: forcing applyTheme to always write 'dark', deleting --ink-dim from the light palette, stripping the initialization_script from settings_window.rs, and making light --pill equal dark's. All four turn it red. That's exactly the #333 failure class, and it runs in 43ms.

The deserialize_theme_or_system addition is a real fix beyond CI, and I'd have missed it: a malformed theme previously aborted the whole parse and discarded the user's other settings. Your test at config.rs:402-436 pins notch_visible surviving true/[]/{}/null/"Light".

One thing for later: the test asserts exact hex values and exact source text, so it's a change-detector — a legitimate palette tweak will turn CI red for no real reason. If it starts nagging, loosen it to "light differs from dark, and every dark token exists in light".

That's three of yours merged today (#318, #319, #322, #337 — four, counting the watchdog). Thanks for taking the EVENT_SYSTEM_FOREGROUND note on that one.

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.

2 participants