Frontend design system: feature screens bypass the OKLCH tokens + ui/* kit (inconsistent visual language) #49
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Severity: High. From a frontend UX audit. A coherent design foundation exists; almost no feature screen uses it — "a coherent kit wrapped around an incoherent app."
Problems
ui/.web/src/index.css:31-72defines a full semantic OKLCH token set (--foreground,--muted-foreground,--primary,--destructive,--border,--radius, light +.dark). A grep for token utilities (text-foreground,text-muted-foreground,bg-primary,text-destructive…) outsidecomponents/ui/returns zero hits, while ~70 hardcoded palette utilities appear across the feature screens.text-neutral-400/-500/-600(three shades, one role); danger istext-red-600everywhere — not the--destructivetoken (a different red).bg-indigo-50,text-indigo-600,bg-indigo-600, comboboxdata-[highlighted]:bg-indigo-50), but--primaryand the primaryButtonare near-black, and the publish stepper / active filter chips usebg-neutral-800. No single recognizable accent.visibility-badge.tsx:9-11hardcodesamber/green-100/800(no dark variant);highlight.tsx:34hardcodesbg-yellow-200.rounded(0.25rem) used ~20× vs the kit's token-derivedrounded-md/lg(--radius: 0.625rem).ui/card.tsxexists but has zero usages — panels are hand-rolled with ad-hoc borders/radii.Suggested fixes
text-muted-foreground,text-destructive,bg-accent/bg-muted,text-primary); pick one accent and route nav/active/combobox-highlight/links/filter-chips through it.--success/--warning/--highlighttokens (+ dark) and giveBadgesuccess/warningvariants soVisibilityBadgeselects a variant instead of patching classes.rounded-md/rounded-lg; useCardfor panel containers; extract one.label-captionutility.components/ui/.Source: frontend UX/design audit, 2026-06-06.
Done — merged to
main(48edb03).Every feature screen now routes through the OKLCH design tokens:
--primary/--ringset to indigo (light +.dark); primary buttons, selected rows, links, and chips share it.--success/--warning/--highlight(+ foregrounds) added in:rootand.dark, exposed via@theme inline.VisibilityBadgeselects new Badgesuccess/warningvariants; search highlight usesbg-highlight.rounded→rounded-md(radius token); the 5 ad-hoc uppercase-caption recipes collapsed to a single.label-captionutility.web/scripts/check-no-raw-colors.mjsguard (pnpm check:colors) bans raw palette utilities outsidecomponents/ui/, wired into the CI web job aftercheck:size. Passes (107 files, 0 offenses).Pure styling refactor — no behavior/layout/API/data change. Gate green: typecheck, lint, 169 tests, build, check:size (183.4 KB gz), check:colors. CssCheck story re-pinned.
The
.darktoken set is now coherent, which unblocks #59 (dark-mode toggle). Two minor items deferred to #59: dark--primarylabel contrast (3.21:1 — AA for UI/large text, tunable for normal text) and optionally widening the guard toaccent-/caret-/shadow-color prefixes.