Skip to content

UI overhaul Phase 5h: extract Measurement Summary tiles - #184

Merged
slittycode merged 1 commit into
mainfrom
claude/ui-phase5h-measurement-summary
Jun 24, 2026
Merged

UI overhaul Phase 5h: extract Measurement Summary tiles#184
slittycode merged 1 commit into
mainfrom
claude/ui-phase5h-measurement-summary

Conversation

@slittycode

Copy link
Copy Markdown
Owner

What

Continues the AnalysisResults.tsx monolith split (Phase 5). Extracts the Measurement Summary DeviceRack — the TEMPO / KEY SIG / METER / CHARACTER tiles at the top of the results scroll — into a focused MeasurementSummarySection component.

This is a pure move: the section already rendered on the design-system primitives (DeviceRack / MetricTile / MetricBar / Pill / ConfidenceBandBadge / TokenBadgeList) with token-only classes, so no restyle was needed.

Changes

  • New apps/ui/src/components/analysisResults/MeasurementSummarySection.tsx — takes phase1 plus the parent-derived finalBpm / finalKey / keyIsApproximate / characteristicPills as props (state stays in the parent, per the high-coupling-slice pattern). The four helpers exclusive to this section (shortenCharacteristicName, characteristicPillClass, isAssumedMeter, meterStatusLabel) move in alongside it.
  • lowConfidenceIndicator (+ its title constant) moves to analysisResults/shared.tsx because it is shared with the harmonic-content card still inline in AnalysisResults, which now imports it back.
  • Removed the imports the move orphaned (Activity/Clock/Disc/Music icons, MetricBar/MetricTile/TokenBadgeList primitives, PhaseSourceBadge).
  • AnalysisResults.tsx: ~170 lines lighter.

Chain of custody / contract

Untouched. DOM output, every data-testid, and every data-text-role are byte-identical — this is an import-only restructure. No Phase 1 contract change.

Verification

  • npm run lint (tsc) ✅
  • npm run lint:style
  • npm run build
  • npm run test:unit830 passed, zero test changes (a pure move changes no tests; a broken test would mean the move wasn't pure)
  • Smoke + Chromatic gated by CI.

🤖 Generated with Claude Code

https://claude.ai/code/session_016to3B8Hf9eAGxAbzpQNvku


Generated by Claude Code

Move the Measurement Summary DeviceRack (TEMPO / KEY SIG / METER /
CHARACTER tiles) out of the AnalysisResults monolith into a focused
MeasurementSummarySection component. Pure extraction — the section
already rendered on the design-system primitives (DeviceRack /
MetricTile / MetricBar / Pill / ConfidenceBandBadge / TokenBadgeList)
with token-only classes, so no restyle was needed.

- New apps/ui/src/components/analysisResults/MeasurementSummarySection.tsx
  takes phase1 + the parent-derived finalBpm/finalKey/keyIsApproximate/
  characteristicPills as props (state stays in the parent). The four
  helpers exclusive to this section (shortenCharacteristicName,
  characteristicPillClass, isAssumedMeter, meterStatusLabel) move in
  alongside it.
- lowConfidenceIndicator (+ its title constant) moves to
  analysisResults/shared.tsx since it is shared with the harmonic-content
  card still inline in AnalysisResults, which imports it back.
- Removed the now-orphaned imports the move left behind (Activity/Clock/
  Disc/Music icons, MetricBar/MetricTile/TokenBadgeList primitives,
  PhaseSourceBadge).

DOM output, data-testids, and data-text-roles are byte-identical. tsc,
lint:style, build, and all 830 unit tests green with zero test changes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016to3B8Hf9eAGxAbzpQNvku
@slittycode
slittycode merged commit 33701e0 into main Jun 24, 2026
5 checks passed
@slittycode
slittycode deleted the claude/ui-phase5h-measurement-summary branch June 24, 2026 02:58
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