Skip to content

feat(stats): sparkline the remaining two homepage headline tiles (PRs reviewed, filtered %) #4721

Description

@JSONbored

Context

Follow-up to epic #4445 (closed). #4447/#4448 shipped sparklines on the "Decision accuracy" and "AI work reused" tiles; the other two trend-eligible tiles ("PRs reviewed", "Filtered without merge") were left without one since neither had a persisted weekly series -- the homepage previously served only a lifetime total plus a single "this week" delta.

Requirements

  • Extend GET /v1/public/stats with a reviewVolumeTrend, computed live (no cron/rollup, same architecture as accuracyTrend/reuseRateTrend) as weekly cohorts: a PR credits the week it was first published; merged reflects its current disposition regardless of which week it actually merged. filteredPct only means anything evaluated against a fixed PR set, so this is a cohort trend, not an independent per-day event count like accuracyTrend's merged/closed split.
  • Wire the homepage's "PRs reviewed" and "Filtered without merge" tiles to their own 8-week sparklines.
  • "Maintainer time saved" stays without one -- it's reviewed x ~20min, a fixed multiple of the first tile, so its own trend would just be a rescaled copy.

Deliverables

  • reviewVolumeTrend on GET /v1/public/stats; OpenAPI regenerated
  • Homepage hero band shows sparklines on all 4 trend-eligible tiles
  • Tests: cohort-bucketing correctness, null-guard on low-sample weeks, an end-to-end test proving a PR credits its PUBLISH week even when it merges later, Orb-fleet folding

Effort

S

Metadata

Metadata

Assignees

Labels

maintainer-onlyOwner-only work — yields no Gittensor points.

Projects

Status
Done

Relationships

None yet

Development

No branches or pull requests

Issue actions