UI overhaul Phase 2a: migrate drop-in primitives to ui/ - #167
Merged
Conversation
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
This was referenced Jun 19, 2026
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.
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.tsxprimitive layer onto the canonicalsrc/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 acrossMeasurementDashboard+AnalysisResults) →ui/MetricBar,ui/MetricBarRow. Theui/versions are a strict superset (same props +forwardRef), so only the import source changes — the 47MetricBarRowJSX sites are untouched.StyledDataTable→ui/DataTable. Column API is identical; the single call site (MeasurementDashboardsegment-stereo table) passes only supported fields.AccentMetricCard→ui/MetricTileat all 8 sites, passingaccent="accent" size="xl"to preserve the left-accent bar and value font size. This keepsanalysisResultsUi.test.ts'sborder-l-2 border-accentcount assertion green.Deferred to 2b / 2c
StatusBadge,DeltaBadge,TokenBadgeList,OutlinePillButton(the badge/tone-remap work, incl. the off-palettemuted/info/violet→ token remaps) land in 2b; the DAW-lane primitives (LaneContainer/LaneRow/TimeRuler/StatsBar) move intoui/with tokenized colors in 2c, whereMeasurementPrimitives.tsxis 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-rolehooks preserved.🤖 Generated with Claude Code
Generated by Claude Code