Skip to content

fix(ui): unify MeasurementDashboard sub-boxes onto canonical tokens - #86

Merged
slittycode merged 1 commit into
mainfrom
claude/refine-local-plan-MZ82F
May 20, 2026
Merged

fix(ui): unify MeasurementDashboard sub-boxes onto canonical tokens#86
slittycode merged 1 commit into
mainfrom
claude/refine-local-plan-MZ82F

Conversation

@slittycode

Copy link
Copy Markdown
Owner

Summary

  • Collapses 18 hex-literal sub-box className pairs in apps/ui/src/components/MeasurementDashboard.tsx onto the canonical design tokens (bg-bg-surface-dark + border-border/border-border-light) defined in apps/ui/src/index.css.
  • Complements the D.6 restyle (feat(ui): D.6a wrap MeasurementDashboard in DeviceRack + migrate cards #76, feat(ui): D.6b UnavailableMeasurementCard → EmptyState #77, feat(ui): D.6c rename local SectionHeader to NumberedSectionToggle #78): the section wrappers were migrated to DeviceRack, but the inner sub-boxes still carried 7 distinct bg shades (#101010 / #111111 / #121212 / #141414 / #15120b) and 6 distinct border shades. These now resolve to one token pair so the dashboard reads coherently inside DeviceRack and tracks future index.css tweaks.
  • Five outliers preserved (semantic-distinct tones, intentionally not generic panels): the "Assumed 4/4" amber chip (line 799), the unselected toggle off-state (816), the groove/tempo-stability progress-bar tracks (1097, 1140), and the Swing-tile inner bar track (2357).

The 8 substring edits

# Find Replace
1 `border border-[#1e1e1e] bg-[#141414]` `border border-border bg-bg-surface-dark` (×4)
2 `bg-[#141414] border border-[#1e1e1e]` `bg-bg-surface-dark border border-border` (×3)
3 `border border-[#242424] bg-[#101010]` `border border-border-light bg-bg-surface-dark` (×4)
4 `border border-[#202020] bg-[#121212]` `border border-border bg-bg-surface-dark` (×1)
5 `border border-[#232323] bg-[#121212]` `border border-border-light bg-bg-surface-dark` (×2)
6 `border border-[#2a2416] bg-[#121212]` `border border-border-light bg-bg-surface-dark` (×2)
7 `border border-[#2e2614] bg-[#15120b]` `border border-border-light bg-bg-surface-dark` (×1)
8 `border border-[#202020] bg-[#111111]` `border border-border bg-bg-surface-dark` (×1)

Diff stat: +18 / −18 in one file. No tokens added, no index.css edits.

Test plan

  • `npm run lint` (tsc --noEmit) — clean
  • `npm test` — 645 passed / 4 skipped
  • `npm run build` — clean (~1.4s)
  • Visual review: dashboard sub-boxes resolve to `#222` inside the DeviceRack `#444` gradient, and the 5 outliers retain their distinctive tones (amber chip, off-state, two progress-bar tracks, Swing-tile track).

Rollback / contrast fallback

If `#222` reads weak against the DeviceRack `#444` gradient, the same 8 substring edits can be re-run with `bg-bg-surface-darker` (`#1a1a1a`) instead of `bg-bg-surface-dark`. The 18-hex-to-tokens mapping is the structural change; which token is tunable without redoing the sweep.

🤖 Generated with Claude Code

Replaces 18 hex-literal sub-box className pairs in MeasurementDashboard.tsx
with the canonical design tokens defined in `apps/ui/src/index.css`
(`bg-bg-surface-dark` + `border-border`/`border-border-light`).

The numbered section wrappers were migrated to DeviceRack in #76/#77/#78,
but the inner sub-boxes still carried 7 distinct background shades
(`#101010` / `#111111` / `#121212` / `#141414` / `#15120b`) and 6 distinct
border shades (`#1e1e1e` / `#202020` / `#232323` / `#242424` / `#2a2416` /
`#2e2614`). These all collapse onto the canonical token pair, so the
dashboard reads coherently inside the new DeviceRack and stays in sync
with future token tweaks.

Five outliers preserved (semantic-distinct tones, not generic panels):
the "Assumed 4/4" amber chip, the unselected toggle off-state, the
groove and tempo-stability progress-bar tracks, and the Swing-tile
inner bar track.

Verified: `npm run lint` clean, 645 Vitest tests pass, `npm run build`
clean. Visual review deferred to PR — if `#222` reads weak inside the
DeviceRack `#444` gradient, the same 8 substring edits can be re-run
with `bg-bg-surface-darker` (`#1a1a1a`) instead.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@slittycode
slittycode merged commit 354e8f5 into main May 20, 2026
3 checks passed
@slittycode
slittycode deleted the claude/refine-local-plan-MZ82F branch May 20, 2026 06:06
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