Skip to content

UI overhaul Phase 2c: migrate MeasurementDashboard badges to ui/ - #169

Merged
slittycode merged 1 commit into
mainfrom
claude/charming-faraday-bcny24
Jun 19, 2026
Merged

UI overhaul Phase 2c: migrate MeasurementDashboard badges to ui/#169
slittycode merged 1 commit into
mainfrom
claude/charming-faraday-bcny24

Conversation

@slittycode

Copy link
Copy Markdown
Owner

Phase 2c of the UI overhaul — retire MeasurementPrimitives.tsx (slice 3 of 4)

Follows #168 (Phase 2b). Migrates MeasurementDashboard.tsx off the MeasurementPrimitives badge exports — after this, only the four DAW-lane primitives remain in that file.

Change

  • StatusBadge (17 compact chips): rather than 17 JSX rewrites in this 2,848-line file (slated for the Phase 5 split), a small local adapter over ui/Pill centralizes the off-palette tone remap (muted/info/violetneutral). Call sites and chordToneForLabel stay untouched. Minor-chord violet collapses to neutral (single-accent ethos; a dedicated chord-quality color can be a later refinement). It's local sugar over Pill, not a competing primitive.
  • OutlinePillButton (sample-generate control) → ui/Button variant="secondary". The old control already rendered muted when inactive, so secondary matches its appearance.
  • DeltaBadge, TokenBadgeListui/DeltaBadge, ui/TokenBadgeList; genre secondary tone remaps mutedneutral.
  • Stories: add the missing ui/DeltaBadge and ui/TokenBadgeList Storybook stories, restoring the repo's "every ui/ primitive ships a story" convention (Chromatic now covers them).

Remaining

Only LaneContainer/LaneRow/TimeRuler/StatsBar are left in MeasurementPrimitives.tsx. Phase 2d moves them into ui/ with tokenized colors and deletes the file.

Verification

  • npm run lint:style
  • npm run lint (tsc --noEmit) ✓
  • npm run test:unit ✓ (830)
  • npm run build

Invariants

Presentation-layer only; no measurement/citation/data-contract surface touched; data-text-role hooks preserved.

🤖 Generated with Claude Code


Generated by Claude Code

Third slice of retiring MeasurementPrimitives.tsx — the dashboard now
imports nothing from it.

- StatusBadge (17 compact chips): introduce a tiny local adapter over
  ui/Pill that maps the legacy off-palette tones (muted/info/violet) onto
  the token palette in one place, so the call sites and chordToneForLabel
  stay untouched ahead of the Phase 5 split. Minor-chord violet collapses
  to neutral. Not a competing primitive — local sugar over Pill.
- OutlinePillButton (sample-generate control) -> ui/Button variant=secondary
  (it already rendered muted/inactive, so secondary matches).
- DeltaBadge, TokenBadgeList -> ui/DeltaBadge, ui/TokenBadgeList; the genre
  secondary tone remaps muted -> neutral.
- Add the missing ui/DeltaBadge and ui/TokenBadgeList Storybook stories,
  restoring the "every ui/ primitive ships a story" convention (Chromatic
  picks them up).

Only the four DAW-lane primitives remain in MeasurementPrimitives.tsx;
Phase 2d moves them into ui/ and deletes the file.

Verified: lint:style, tsc --noEmit, 830 unit tests, and the production
build all green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016to3B8Hf9eAGxAbzpQNvku
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.

2 participants