fix(ui): close token-gate escapes in themeComponents + narrow the gate (S5) - #425
Merged
Conversation
…e (S5) themeComponents.ts used raw `text-zinc-900` (success button) and `bg-black/50` (modal backdrop) — both slipped through because the token gate blanket-excluded all of styles/. - Add a semantic `--color-on-success` token (dark #1a2520, ~6.2:1 AA on status-success #4caf50; white fails ~2.7:1), mirroring on-brand/on-danger; success button now uses `text-on-success`. - Modal backdrop uses `bg-scrim/50` (the established scrim token) instead of bare `bg-black/50`. - Narrow the gate's styles/ exclusion: keep the design-primitive definition files excluded (theme/themeColors/themeLayout/themeSpacing/themeTypography) but GATE themeComponents.ts, which composes utility classes. Verified zero false positives on the current tree and that an injected raw class is now caught. S7 (module-certify vs status-success green contrast = ~1.19:1) is left as an owner decision — analysis only, no hue change here.
krisarmstrong
enabled auto-merge (squash)
June 14, 2026 23:32
Contributor
License Compliance ReportAll dependencies pass license compliance checksGo Dependencies
npm DependenciesSee full report in workflow artifacts Allowed Licenses: MIT, Apache-2.0, BSD-*, ISC, CC0-1.0, MPL-2.0 |
This was referenced Jul 8, 2026
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.
What
--color-on-successnew semantic token (dark#1a2520, ~6.2:1 AA onstatus-success#4caf50; white fails ~2.7:1) mirroringon-brand/on-danger. Success button:text-zinc-900→text-on-success.bg-black/50→bg-scrim/50(established scrim token).check-token-discipline.sh): the old blanket/styles/exclusion hid both escapes above. Now only the design-primitive definition files (theme/themeColors/themeLayout/themeSpacing/themeTypography) stay excluded;themeComponents.ts(which composes utility classes) is gated.Why
S5 of the fleet UI plan. Two raw-color escapes lived in an unscanned file. Fixing the gate as well as the code means future escapes there fail CI.
Verification
text-zinc-900back into themeComponents.ts is now caught (proved locally). Zero false positives.tsc --noEmitclean;biome checkclean.Out of scope (owner decision)
S7:
module-certify#16a34a vsstatus-success#4caf50 measure ~1.19:1 — effectively the same green; they'd be indistinguishable if co-located (e.g. badges). No hue change made here — flagging for your call on whether to nudgemodule-certify.