Skip to content

fix(ui): close token-gate escapes in themeComponents + narrow the gate (S5) - #425

Merged
krisarmstrong merged 1 commit into
mainfrom
fix/token-gate-styles-escape
Jun 14, 2026
Merged

fix(ui): close token-gate escapes in themeComponents + narrow the gate (S5)#425
krisarmstrong merged 1 commit into
mainfrom
fix/token-gate-styles-escape

Conversation

@krisarmstrong

Copy link
Copy Markdown
Collaborator

What

  • --color-on-success new semantic token (dark #1a2520, ~6.2:1 AA on status-success #4caf50; white fails ~2.7:1) mirroring on-brand/on-danger. Success button: text-zinc-900text-on-success.
  • Modal backdrop: bare bg-black/50bg-scrim/50 (established scrim token).
  • Narrowed the token gate (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

  • Gate clean on this tree; injecting a raw text-zinc-900 back into themeComponents.ts is now caught (proved locally). Zero false positives.
  • tsc --noEmit clean; biome check clean.

Out of scope (owner decision)

S7: module-certify #16a34a vs status-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 nudge module-certify.

…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
krisarmstrong enabled auto-merge (squash) June 14, 2026 23:32
@github-actions

Copy link
Copy Markdown
Contributor

License Compliance Report

All dependencies pass license compliance checks

Go Dependencies

  • Unknown: 31 package(s)
  • MIT: 26 package(s)
  • BSD-3-Clause: 16 package(s)
  • Apache-2.0: 11 package(s)
  • BSD-2-Clause: 1 package(s)

npm Dependencies

See full report in workflow artifacts

Allowed Licenses: MIT, Apache-2.0, BSD-*, ISC, CC0-1.0, MPL-2.0
Forbidden: GPL, AGPL, SSPL (strong copyleft)

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.

1 participant