Skip to content

feat(ui): BarList distribution primitive for the B2 batch (U5 B2)#441

Merged
OBenner merged 1 commit into
developfrom
claude/ui-b2-barlist
Jul 24, 2026
Merged

feat(ui): BarList distribution primitive for the B2 batch (U5 B2)#441
OBenner merged 1 commit into
developfrom
claude/ui-b2-barlist

Conversation

@OBenner

@OBenner OBenner commented Jul 24, 2026

Copy link
Copy Markdown
Owner

Summary

A small primitive slice that fills the last gap for the B2 batch. The Merge Analytics mockup's distribution panels (PR size, reviewer turnaround) and Model Usage's per-model breakdown are horizontal bar lists, not line charts — so this adds the missing primitive.

New primitive (libs/ui)

  • BarList — one labeled row per category with a proportional, tone-colored bar and a trailing value. Ideal for Record<string, number> breakdowns (PR sizes, per-model tokens/cost, error patterns). The bar is decorative (aria-hidden); the label and value are real text, so no extra ARIA is needed.
  • charts.ts: barPercent(value, scale) — a value's clamped 0–100 share, returning 0 for non-positive value/scale — exported and unit-tested from the app suite (9 chart tests total).

What this deliberately does not add

No vertical/categorical BarChart over invented data — only this real, high-reuse distribution list. It unlocks Merge Analytics (its main content), Model Usage's model breakdown, and the deferred Analytics/Productivity drilldowns (error_patterns, common_issues, agent_stats).

Verification

  • 9/9 chart tests (incl. barPercent); libs/ui + Electron tsc clean; Storybook rebuilt (3 stories), BarList verified against the mockup in light + dark (proportional bars, value labels, single-row).

Next in B2

Merge Analytics composes AnalyticsDashboard + BarList; then Model Usage.

🤖 Generated with Claude Code

The Merge Analytics mockup's "distribution" panels (PR size, reviewer
turnaround) and Model Usage's per-model breakdown are horizontal bar
lists, not line charts — the missing primitive for the batch. Adds:

- BarList: one labeled row per category with a proportional, tone-
  colored bar and a trailing value. Ideal for Record<string, number>
  breakdowns (PR sizes, per-model tokens/cost, error patterns); the
  bar is decorative, the label + value are real text.
- charts.ts: barPercent(value, scale) — value's clamped 0–100 share,
  0 for non-positive value/scale; exported and unit-tested from the
  app suite (9 chart tests total).

No BarChart (vertical/categorical bars over invented data) is added —
only this real, high-reuse distribution list. Verified in Storybook
(3 stories) light + dark.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@OBenner, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 12 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 1e04debf-45fb-458d-ba28-fb900235e392

📥 Commits

Reviewing files that changed from the base of the PR and between f9d80fd and 631737d.

📒 Files selected for processing (6)
  • apps/frontend/src/renderer/__tests__/ui-charts.test.ts
  • libs/ui/src/index.ts
  • libs/ui/src/primitives/BarList.css
  • libs/ui/src/primitives/BarList.stories.tsx
  • libs/ui/src/primitives/BarList.tsx
  • libs/ui/src/primitives/charts.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/ui-b2-barlist

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.

@cursor

cursor Bot commented Jul 24, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@OBenner
OBenner merged commit 9b463de into develop Jul 24, 2026
19 checks passed
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant