refactor(ui): design system audit — score 12→19/20#93
Open
paulovitin wants to merge 2 commits into
Open
Conversation
Systematic pass across 5 audit dimensions: accessibility, performance,
theming, anti-patterns, and design-system alignment. Addresses all P0/P1
issues and most P2/P3 items identified by the impeccable audit tool.
## Side-stripe borders eliminated (DESIGN.md absolute ban)
- Settings navItem.active: inset box-shadow → accent-tinted background
- FileBrowser entryActive: inset box-shadow → border ring
- Sidebar branchItem.active: border-left → background tint
- ActivityDashboard row: border-left → removed
- WorktreeManager: border-left → removed
- PromptDrawer selected: border-left → background tint
- Sidebar globalWorkspaceEntry: transparent border-left → padding
## Glassmorphism removed (DESIGN.md absolute ban)
- Mobile CommandWidget: backdrop-filter blur → opaque bg + shadow
- Mobile NewSessionSheet: backdrop-filter blur → opaque bg + shadow
- Mobile IdeasOverlay: backdrop-filter blur → opaque bg + shadow
## Performance: layout animations → GPU-composited transforms
- 8 progress bars: transition width → transform scaleX()
- TriStateToggle knob: transition left → transform translateX()
- Eliminates layout recalculation on every animation frame
## Token system completed — zero orphan hex remaining
- Migrated ~50 hard-coded hex colors → semantic tokens
- Created new tokens: --changes, --urgent, --search-match,
--search-match-active, --search-match-border, --tweak-highlight
- Removed all var(--token, #fallback) redundancies (~35 instances)
- Fixed wrong token names: --green/--red/--yellow → --success/--error/--changes,
--danger → --error, --ok → --success, --color-error → --error
- Converted rgba() patterns → color-mix(in srgb, var(--token) N%, transparent)
## Keyboard accessibility hardened (WCAG 2.1.1, 4.1.2)
- Added role="button" tabIndex={0} onKeyDown to 26 interactive divs
- Created src/utils/a11y.ts utility (onClickKeyDown helper)
- Components: GitPanel (7), Sidebar (5), Settings (3), SmartPromptsTab (2),
AIChatPanel, McpPopup, CommandOverview, Terminal, DiffFileList,
PrDetailContent, PromptOption, FileBrowser, Toast, TaskQueue,
AiTriage, ReferencesPanel
## Documentation
- PRODUCT.md: added Platform section (desktop-only, Tauri v2)
- DESIGN.md: added Platform note (no responsive/touch-target scope)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- TabBar.test: assert transform scaleX() instead of width % - BottomTabs.test: assert absence of backdrop-filter (design ban) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
Systematic design-system audit across accessibility, performance, theming, and anti-pattern compliance. Took the impeccable audit score from 12/20 (Acceptable) to 19/20 (Excellent) in a single pass.
This PR enforces the design principles documented in DESIGN.md — specifically the absolute bans on side-stripe borders, glassmorphism, and layout-property animations — while completing the semantic token migration and adding keyboard accessibility to all interactive elements.
Why these changes matter
Side-stripe borders removed (7 instances)
The left-border accent pattern (
border-left: 3px solid var(--accent)) is an absolute ban in our design system. It's a common AI-generated cliché that signals "someone used a template." Our active states now use background tints with subtle border rings — visually distinctive without the stripe.Impact: Every active/selected state in Settings, FileBrowser, Sidebar, ActivityDashboard, WorktreeManager, and PromptDrawer now respects the design spec.
Glassmorphism eliminated (3 mobile overlays)
backdrop-filter: blur(12px)on mobile is both a design-ban violation AND a performance problem. Each blur composites the entire underlying layer on the GPU every frame. Replaced with opaque backgrounds + elevation shadows per DESIGN.md's shadow vocabulary.Impact: CommandWidget, NewSessionSheet, IdeasOverlay — smoother rendering on mobile, spec-compliant.
Layout animations → GPU transforms (9 components)
Progress bars used
transition: width 0.3swhich forces the browser to recalculate layout on every frame (reflow). Converted totransform: scaleX()which runs entirely on the GPU compositor — zero layout cost.Same treatment for TriStateToggle (
left→translateX).Impact: Eliminates layout thrashing during progress animations across TabBar, ClaudeUsageDashboard, ProcessManager, UpdateProgress, DictationSettings, SessionCard, SessionDetail, and Settings.
Token system completed — zero orphan hex
Before this PR, ~50 hard-coded hex values and ~35
var(--token, #fallback)redundancies existed across the CSS. All resolved:--changes,--urgent,--search-match,--search-match-active,--search-match-border,--tweak-highlight--green/--red/--yellow/--danger/--ok/--color-error→ proper--success/--error/--changesrgba(r,g,b,a)→color-mix(in srgb, var(--token) N%, transparent)Impact: The entire desktop CSS now uses the token vocabulary exclusively. Theme changes propagate consistently. No more drift.
Keyboard accessibility (26 interactive divs)
Interactive
<div onClick={...}>elements are invisible to keyboard navigation and screen readers. Addedrole="button" tabIndex={0} onKeyDown={Enter/Space}to all collapsible headers, clickable rows, and toggle elements.Created
src/utils/a11y.tswith a reusableonClickKeyDownhelper.Impact: Full keyboard navigation for GitPanel sections, Sidebar headers, Settings tabs, MCP items, commit rows, toast dismiss, task queue items, and more. WCAG 2.1.1 (Keyboard) and 4.1.2 (Name/Role/Value) compliance.
Visual diff
border-left: 3pxaccentbackdrop-filter: blur(12px)var(--bg-secondary)+ shadowtransition: width 0.3stransition: transform 0.3s(GPU)var(--green, #3fb950)var(--success)role="button" tabIndex={0} onKeyDownTest plan
bun run buildpasses clean (TypeScript + Vite)🤖 Generated with Claude Code