Skip to content

UI overhaul Phase 2a: migrate drop-in primitives to ui/ - #167

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

UI overhaul Phase 2a: migrate drop-in primitives to ui/#167
slittycode merged 1 commit into
mainfrom
claude/charming-faraday-bcny24

Conversation

@slittycode

Copy link
Copy Markdown
Owner

Phase 2a of the UI overhaul — retire MeasurementPrimitives.tsx (slice 1 of 3)

Third PR in the phased overhaul (#165 Phase 0, #166 Phase 1 both merged). Phase 2 retires the competing MeasurementPrimitives.tsx primitive layer onto the canonical src/components/ui/ primitives. Because it spans 5 files and ~80 call sites, it ships as three reviewable slices; this is 2a: the API-identical drop-ins (lowest risk).

Change

  • MetricBar, MetricBarRow (50 call sites across MeasurementDashboard + AnalysisResults) → ui/MetricBar, ui/MetricBarRow. The ui/ versions are a strict superset (same props + forwardRef), so only the import source changes — the 47 MetricBarRow JSX sites are untouched.
  • StyledDataTableui/DataTable. Column API is identical; the single call site (MeasurementDashboard segment-stereo table) passes only supported fields.
  • AccentMetricCardui/MetricTile at all 8 sites, passing accent="accent" size="xl" to preserve the left-accent bar and value font size. This keeps analysisResultsUi.test.ts's border-l-2 border-accent count assertion green.

Deferred to 2b / 2c

StatusBadge, DeltaBadge, TokenBadgeList, OutlinePillButton (the badge/tone-remap work, incl. the off-palette muted/info/violet → token remaps) land in 2b; the DAW-lane primitives (LaneContainer/LaneRow/TimeRuler/StatsBar) move into ui/ with tokenized colors in 2c, where MeasurementPrimitives.tsx is finally deleted.

Verification

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

Invariants

Pure presentation-layer swap onto existing primitives; no measurement, citation, or data-contract surface touched; data-text-role hooks preserved.

🤖 Generated with Claude Code


Generated by Claude Code

First slice of retiring MeasurementPrimitives.tsx — the API-identical
exports move onto the canonical ui/ primitives:

- MetricBar, MetricBarRow (50 call sites) -> ui/MetricBar, ui/MetricBarRow.
  Props are identical; only the import source changes.
- StyledDataTable -> ui/DataTable (identical column API; the one call site
  passes only supported fields).
- AccentMetricCard -> ui/MetricTile at all 8 sites, passing
  accent="accent" size="xl" to preserve the left-accent bar and the value
  font size. This keeps analysisResultsUi.test.ts's border-l-2 border-accent
  count assertion green.

StatusBadge / DeltaBadge / TokenBadgeList / OutlinePillButton and the
DAW-lane primitives still import from MeasurementPrimitives; they migrate
in Phase 2b/2c, where the file is deleted.

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
@slittycode
slittycode merged commit a64b0f4 into main Jun 19, 2026
5 checks passed
@slittycode
slittycode deleted the claude/charming-faraday-bcny24 branch June 19, 2026 04:02
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