Server Component met data-fetching via getSprintTokenHistory/getDayTokenData/
getPbiTokenAggregates. SprintTokenHistoryTable, TokenDayChart (Recharts LineChart),
PbiTokenTable en TokenSelectors (client, URL-params). Link toegevoegd in
insights/page.tsx.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The /insights page was rendering only Sprint Health (2 charts).
PRs #47/#48/#49 delivered helpers + tests for Velocity, Backlog health
and Agent throughput, but Velocity and Backlog never produced their
UI components, and none of the four new sections were wired into
page.tsx. Result: user sees 2 charts where 5 sections were promised.
This PR fills the gaps:
- New `app/(app)/insights/components/velocity-chart.tsx` — Recharts
grouped BarChart with optional ReferenceLine for the average. Empty
state when <2 completed sprints.
- New `app/(app)/insights/components/backlog-health.tsx` — counters
(stories sans AC / tasks sans plan / stuck>7d) + stuck-tasks table
with severity-coded days-stuck cell.
- `app/(app)/insights/page.tsx` rewritten as 5 sections:
Sprint Health, Plan-quality (donut + alignment-trend), Agent
throughput, Velocity, Backlog health. Helpers run in one
Promise.all so the page renders in a single tick.
Tests: 314/314 green, tsc clean, lint 0 errors.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Re-introduce the 3 unique files from closed PRs #37 and #40 that
overlap-merged with already-landed sub-PRs (#34, #35, #36, #38, #39):
- app/(app)/insights/page.tsx — Server Component dat alle helpers
parallel aanroept en de 5 sectie-Cards rendert (Sprint Health,
Plan-quality, Agent throughput, Velocity, Backlog health)
- app/(app)/insights/components/sprint-info-strip.tsx — chips per
active sprint met productname + goal + dagen-over + taakcount
- app/(app)/insights/components/alignment-trend.tsx — Recharts
LineChart die % ALIGNED jobs per sprint over laatste 5 sprints toont
- lib/insights/verify-stats.ts — TrendPoint type + getAlignmentTrend
helper (uitgebreid van PR #38)
Plus dependency: recharts (was in package.json van #37/#40 die we
sloten).
Tests: 290/290 groen, tsc clean, lint clean.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>