feat(ui): add findings-by-category/severity breakdown card to analytics (#2195) - #4748
Conversation
…cs (JSONbored#2195) Group AI-review findings by category, each split by severity tier (blocker/warning/advisory/nit) as a stacked-count card. Display slice: it reads an optional findingsBreakdown shape off the operator-dashboard payload, shows 'no findings in window' when the window is empty, and 'not yet available' until the backend aggregation is wired — so it ships safely ahead of the feed and lights up once it lands. Reuses the shared AnalyticsCardShell + StatusPill; severity colors via token classes only.
|
🚨 Contributor flagged. Click here for more info: Superagent Dashboard |
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Tip 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 ✅ Gittensory review result - approve/merge recommendedReview updated: 2026-07-10 22:15:31 UTC
✅ Suggested Action - Approve/Merge
Review summary Nits — 5 non-blocking
Flagged checks (non-blocking)
Linked issue satisfactionPartially addressed Review context
Contributor next steps
Signal definitions
Visual preview
Click any thumbnail to open the full-size screenshot. Before = production · After = this PR's preview deploy. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
What
Adds the findings-by-category/severity breakdown card to the operator analytics dashboard (Closes #2195): AI-review findings grouped by category, each split by severity tier (
blocker/warning/advisory/nit) as a stacked-count card with a proportional per-category bar.Display slice — it reads an optional
findingsBreakdownshape off the operator-dashboard payload and degrades cleanly:so it ships safely ahead of the feed and lights up automatically once the data lands. No
src/**change.Changes
findings-breakdown-card.tsx(new) —FindingsBreakdownCard+FindingsBreakdown/FindingSeverityTiertypes. Per category: a proportional stacked bar (guardstotal === 0, no divide-by-zero) + colored severity counts, ordered blocker→nit. Reuses the sharedAnalyticsCardShell(feat(ui): shared analytics-card empty + loading skeleton states #2200) andStatusPill; severity colors via token classes only (bg-danger/bg-warning/bg-mint/bg-muted-foreground), no hardcoded hex.findings-breakdown-card.test.tsx(new) — 4 tests: multi-category populated, single-category (zero-count severity omitted), present-but-empty, and absent-field — covering both arms of thecount > 0guards.app.analytics.tsx— optionalfindingsBreakdown?: FindingsBreakdownon the dashboard type + renders<FindingsBreakdownCard findings={data.findingsBreakdown} />after the acceptance-rate card.Verification
ui:typecheck✓ ·ui:test(4/4) ✓ ·ui:build✓ · eslint 0 errors · prettier clean.Screenshots
Net-new card — no findings-by-category card existed on
/app/analyticsbefore. Shown in both the live empty ("not yet available") and populated forms, across desktop + mobile, light + dark.ready · light
ready · dark
ready · mobile
empty · light
empty · dark
empty · mobile
Closes #2195