Skip to content

feat(ui): Analytics dashboard pilot on the shared design system (U5 B2)#439

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

feat(ui): Analytics dashboard pilot on the shared design system (U5 B2)#439
OBenner merged 1 commit into
developfrom
claude/ui-b2-analytics-screen

Conversation

@OBenner

@OBenner OBenner commented Jul 24, 2026

Copy link
Copy Markdown
Owner

Summary

Second B2 slice. Composes the chart primitives from #438 into a generic AnalyticsDashboard screen — deliberately data-agnostic so all four B2 views (Analytics, Productivity, Merge Analytics, Model Usage) reuse it, not just Analytics.

libs/ui

  • AnalyticsDashboard: a KPI stat-tile row (each tile with an optional area sparkline), a column of titled line-chart cards, and an optional right rail of summary meta cards; loading/error/empty states carry aria-live/role="alert".
  • New shared types UiKpi / UiChartCard describe the dashboard inputs; the screen composes StatTile + Sparkline + LineChart.

Electron

  • Pure analytics-ui mappers: formatCount/formatPercent/formatCost, successRateTone, UTC shortDate, evenly-sampled axis labels, and buildKpis/buildCharts/buildSections from AnalyticsReport14 tests.
  • AnalyticsPilotView over the existing analytics.getReport IPC, mounted as "Analytics (new UI)" beside the legacy multi-tab view (which stays untouched).

i18n

  • analytics:analyticsPilot.* (en+fr), navigation:items.analyticsNext.

Scope

The pilot renders the report's summary KPIs + trend charts + outcome/QA summary cards. The legacy view's agent-stats and QA-issue drilldown tables are a natural part 2 (they need a dedicated table primitive not yet built).

Verification

  • 14/14 mapper tests; libs/ui + Electron tsc clean; Storybook rebuilt and the Dashboard story verified against the mockup (KPI sparklines, two-series velocity chart with legend + W-axis, single-series rate chart, Outcomes/QA rail).

Next in B2

Productivity / Merge Analytics / Model Usage reuse this same AnalyticsDashboard — mostly new mappers per screen.

🤖 Generated with Claude Code

Second B2 slice, composing the chart primitives from #438 into a
generic dashboard screen that all four B2 views can reuse:

- libs/ui: new AnalyticsDashboard screen — a KPI stat-tile row (each
  with an optional area sparkline), a column of titled line-chart
  cards, and an optional right rail of summary meta cards;
  loading/error/empty states with aria-live. Data-agnostic via new
  shared types UiKpi / UiChartCard, so Productivity / Merge Analytics
  / Model Usage can reuse it by mapping their report onto the same
  props.
- Electron: pure analytics-ui mappers (formatCount/Percent/Cost,
  successRateTone, UTC shortDate, evenly-sampled axis labels, and
  buildKpis/buildCharts/buildSections from AnalyticsReport; 14 tests)
  + AnalyticsPilotView over the existing analytics.getReport IPC.
  Mounted as "Analytics (new UI)" beside the legacy multi-tab view.
- i18n: analytics:analyticsPilot.* keys (en+fr), navigation.analyticsNext.

Scope: the pilot renders the report's summary KPIs + trend charts +
outcome/QA summary cards. The legacy view keeps the agent-stats and
QA-issue drilldowns (dedicated tables), which are a natural part 2.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@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.

@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: 36 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: 98f46a79-b5ae-43d8-9acb-d54cad1110a0

📥 Commits

Reviewing files that changed from the base of the PR and between ec83093 and b5b8218.

📒 Files selected for processing (14)
  • apps/frontend/src/renderer/App.tsx
  • apps/frontend/src/renderer/__tests__/analytics-ui.test.ts
  • apps/frontend/src/renderer/components/AnalyticsPilotView.tsx
  • apps/frontend/src/renderer/components/Sidebar.tsx
  • apps/frontend/src/renderer/lib/analytics-ui.ts
  • apps/frontend/src/shared/i18n/locales/en/analytics.json
  • apps/frontend/src/shared/i18n/locales/en/navigation.json
  • apps/frontend/src/shared/i18n/locales/fr/analytics.json
  • apps/frontend/src/shared/i18n/locales/fr/navigation.json
  • libs/ui/src/client/types.ts
  • libs/ui/src/index.ts
  • libs/ui/src/screens/AnalyticsDashboard.css
  • libs/ui/src/screens/AnalyticsDashboard.stories.tsx
  • libs/ui/src/screens/AnalyticsDashboard.tsx
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/ui-b2-analytics-screen

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.

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

Copy link
Copy Markdown

OBenner added a commit that referenced this pull request Jul 24, 2026
…440)

Third B2 slice — the first to reuse the generic AnalyticsDashboard
from #439 with no new libs/ui component:

- Electron: pure productivity-ui mappers (formatHours; buildProductivity
  Kpis/Charts/Sections from ProductivitySummary + ProductivityTrend
  Point, reusing analytics-ui's formatters/shortDate/sampleLabels/
  successRateTone; converts the backend 0-1 rates to whole percents;
  7 tests) + ProductivityPilotView over getProductivitySummary +
  getProductivityTrends. Mounted as "Productivity (new UI)".
- i18n: analytics:productivityPilot.* keys (en+fr; the productivity
  screens share the analytics namespace), navigation.productivityNext.

Scope: the productivity mockup's categorical bar panels ("when you
ship", "where the time went") have no backing data in the report, so —
like the Patterns pilot — this maps only the real data: KPI summary
figures + the daily trend series as line charts + outcome/effort cards.
No BarChart primitive is invented for panels the backend can't fill.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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