Skip to content

refactor(ui): compose Crew preview metrics - #649

Merged
zacjones93 merged 2 commits into
codex/metric-summary-migrationfrom
codex/metric-preview-migration
Jul 15, 2026
Merged

refactor(ui): compose Crew preview metrics#649
zacjones93 merged 2 commits into
codex/metric-summary-migrationfrom
codex/metric-preview-migration

Conversation

@zacjones93

@zacjones93 zacjones93 commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • replace the duplicate compact metric helpers in the Crew copy-prior-event and role-template panels with the shared Metric.Inset, Metric.Label, and Metric.Value composition
  • preserve the existing three-column grids, compact card tokens, values, and visible value-before-label order while using semantic dl / dt / dd source order
  • add focused coverage for all six metrics, zero and long values, and both panels' unavailable states
  • document the reviewed Crew consumer boundary in lat.md

Stack

Validation

  • pnpm --filter crew test -- crew-copy-prior-event-panel.test.tsx crew-template-panel.test.tsx — 4/4 passed
  • pnpm --filter crew type-check
  • focused Biome checks
  • pnpm --filter wodsmith-start check:ui-inventory
  • lat check
  • pre-push monorepo lint and type-check hooks
  • diff scope/check against 7ecd5ebe6b2569a3cea4204b4514df9381625ec0

Full Crew baseline remains unchanged: known missing organizer component imports, stale event-import label assertions, and the recurring XLSX decompression timeout are outside this slice.


Summary by cubic

Replaced local metric cards in the Crew copy-prior-event and template panels with shared Metric.Inset/Metric.Label/Metric.Value to standardize semantics and styling. Keeps the three-column layout, compact typography, and visible value-before-label order while using semantic dl/dt/dd.

  • Refactors
    • Composed metrics in both panels with the shared Metric parts; removed duplicate local helpers.
    • Preserved compact card tokens, typography (xs/base sizes, leading/tracking), and grids; values appear first via order-first while source order stays label→value.
    • Added focused tests for zero/long values and both panels’ unavailable states.
    • Updated lat.md to document Crew compact preview consumers and the reviewed boundary.

Written for commit d6316c1. Summary will update on new commits.

Review in cubic

@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: acab4efc-b80c-42fc-8101-2aaa82e5f695

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/metric-preview-migration

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

This was referenced Jul 11, 2026
@zacjones93

Copy link
Copy Markdown
Contributor Author

Independent review at exact head d6316c1b489127296a294a6c921fa75f48b19e10 on base 7ecd5ebe6b2569a3cea4204b4514df9381625ec0: LGTM — no remaining blocking findings.

The first pass found that the shared Metric.Value defaults changed the compact panels' prior line-height and tracking. The follow-up commit fixes that compatibility gap explicitly: copy values use text-base leading-6 tracking-normal, template values use text-xs leading-4 tracking-normal, and the focused tests require those tokens while rejecting leading-none tracking-tight.

Verified:

  • exactly six shared metric sites: three in copy-prior-event and three in role-template preview;
  • both local Metric helpers are removed and no unrelated helper or production file is changed;
  • source order remains dl > dt + dd, while order-first preserves the existing visible value-before-label order;
  • three-column grids, gap-2, rounded-md border bg-card px-2 py-2, labels, values, and the corrected compact typography match the prior presentation contract;
  • zero counts and Number.MAX_SAFE_INTEGER remain semantic and wrap-safe through min-w-0, break-words, and overflow-wrap:anywhere;
  • unavailable copy/template branches remain non-metric states;
  • calculations, filters, selection state, apply/save handlers, disabled state, and surrounding workflow markup are unchanged;
  • focused tests pass 4/4; Crew type-check passes; focused Biome, UI inventory, lat check, and exact-range git diff --check pass;
  • LAT refs are unique and cover all four focused scenarios;
  • live review threads are empty. CodeRabbit only posted its draft-skip notice; the new-head CI run is still in progress, so final merge should wait for those checks to finish.

GitNexus graph queries remained unavailable because the MCP runtime cannot read the repository's newer LadybugDB storage version, even after re-indexing this exact worktree. The review therefore used the exact SHA diff, source contracts, focused runtime tests, type-checking, inventory/LAT validation, and live GitHub state as the authoritative evidence.

@zacjones93
zacjones93 merged commit d6316c1 into codex/metric-summary-migration Jul 15, 2026
15 checks passed
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