Skip to content

fix(ui): clear the UI guard failures on main - #86

Open
zereight wants to merge 1 commit into
mainfrom
fix/ui-guard-violations
Open

zereight wants to merge 1 commit into
mainfrom
fix/ui-guard-violations

Conversation

@zereight

@zereight zereight commented Dec 2, 2026

Copy link
Copy Markdown
Owner

What changed

Four components now use tokens the UI guard tests accept. No guard test changes, 7 lines in 4 files.

file before after guard
src/components/BitwardenConnection.tsx:85 border border-border bg-surface-muted/40 border border-hairline/40 bg-inset color-utilities
src/components/DigestChip.tsx:59, 62, 76 text-ink-secondary/80, /70, /80 text-ink-tertiary faded-text
src/components/ThreadBoard.tsx:67 text-ink-secondary/80 text-ink-tertiary faded-text
src/components/ThreadBoard.tsx:72 action group shows on group-hover/card and focus-within only adds touch:opacity-100 touch-actions
src/components/workflows/WorkflowCanvas.tsx:151 edges text-ink-secondary/60 text-ink-tertiary faded-text

Why

Three guard tests fail on main (8c67e9d), and each failure is a real bug in the component, not in the guard:

How it was verified

macOS, Node v24.22.1 (the CI version), same commands on main 8c67e9d and on this branch.

Before shows three guard failures naming these lines; after shows them pass, with the same colours measured in the page.

check Before (main 8c67e9d) After (this branch)
pnpm exec vitest run src/lib/color-utilities.test.ts src/lib/faded-text.test.ts src/components/touch-actions.test.ts Test Files 3 failed (3), Tests 3 failed | 23 passed (26) Test Files 3 passed (3), Tests 26 passed (26)
color-utilities received components/BitwardenConnection.tsx:85 bg-surface-muted/40 []
faded-text received DigestChip.tsx:59 /80, :62 /70, :76 /80, ThreadBoard.tsx:67 /80, WorkflowCanvas.tsx:151 /60 []
touch-actions received components/ThreadBoard.tsx:72 needs touch:opacity-100 []
pnpm exec vitest run src/components/ThreadBoard src/components/DigestChip src/components/VaultSettings src/components/workflows — Test Files 3 passed (3), Tests 56 passed (56)
pnpm typecheck — exit 0
pnpm exec oxlint on the 4 files — exit 0
node scripts/check-skin-contrast.mjs — exit 0

In the page

None of these four views can be reached in the control-omb ui launch fixture without seeding data it has no API for (a memory journal, board links, a workflow graph, a Bitwarden status). So the screenshots come from a one-off page that mounts the real components through scripts/testing/preview-fixture.ts (mountPreview, the same Vite config as the app), served once from main and once from this branch. The page file was never committed. Chrome for Testing 158, headless, 1200×1500 at 2×, touch via CDP Emulation.setTouchEmulationEnabled.

Computed styles read from the page (Atelier):

element Before After
memory delta +2/-1, +3 more, board +2 oklab(0.509 0.002 0.020 / 0.8) rgb(109, 104, 92)
memory Undone oklab(… / 0.7) rgb(109, 104, 92)
workflow edge stroke oklab(… / 0.6) rgb(109, 104, 92)
Bitwarden steps box background rgba(0, 0, 0, 0), border rgb(26, 26, 24) background rgb(245, 241, 235), border hairline / 0.4
board card actions with touch emulation ((hover: none), (pointer: coarse) matches) opacity: 0 opacity: 1

WCAG contrast from the skin tokens, alpha blended over the surface each element sits on (the canvas has no background of its own, so the edge is measured on app):

use Atelier before → after Midnight before → after
memory delta / +N more (/80 on panel) 3.58 → 5.23 5.43 → 6.15
memory Undone (/70 on panel) 2.95 → 5.23 4.41 → 6.15
board +N link count (/80 on card) 3.73 → 5.55 5.15 → 5.76
workflow edge (/60 on app) 2.40 → 4.93 3.55 → 6.10

Screenshots

Bitwarden steps box, Atelier. Before: no background, full-ink border. After: inset background, hairline border.

Before After
before after

Bitwarden steps box, Midnight. Before: a bright full-ink border. After: the Settings edge, like the other insets.

Before After
before after

Board card on a touch screen, Atelier. Before: no archive/delete buttons. After: both buttons show.

before
after

Memory receipt, Atelier (+2/-1, Undone, +3 more). Before then after; the change is the contrast in the tables above.

before
after

Workflow edges, Atelier. Before then after.

Before After
before after

Not covered

  • The real app screens (chat digest, Team map board, Workflows page, Settings → Vault) were not opened with real data; the components were mounted alone with fixed props.
  • Only Atelier and Midnight were captured. The tertiary ink on the other skins is what check-skin-contrast already measures.
  • A real touch device was not used; touch was CDP emulation.
  • This PR's CI result: see the checks below. Other jobs failing on main (behavior evals, package + smoke, the Windows-only vitest failures, BotThreads) are separate.

Checklist

  • No guard test changed
  • No new comments or tests
  • Before/After from the same commands on main and this branch

Three guard tests have failed on main since the components below landed:

- color-utilities: BitwardenConnection's steps box used `bg-surface-muted/40`
  and `border-border`, neither defined in @theme, so the box had no
  background and a full-ink border. It now uses `border-hairline/40 bg-inset`
  like the other inset boxes in Settings.
- faded-text: four quiet labels in DigestChip and ThreadBoard and the
  WorkflowCanvas edges faded `text-ink-secondary` with opacity, which drops
  below 4.5:1 on the light skins. They now use `text-ink-tertiary`.
- touch-actions: ThreadBoard's archive/delete group only appeared on hover,
  which never happens on a touch screen. It now also shows with `touch:`.
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