From d13859d31e6d30ecc41bcbeffd3b5c8338b99141 Mon Sep 17 00:00:00 2001 From: Prad Nukala Date: Mon, 31 Aug 2026 18:56:52 -0400 Subject: [PATCH] refactor(docs): rename recent stats to heat and update dashboard rendering --- apps/docs/islands/ProgressDashboard.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/apps/docs/islands/ProgressDashboard.tsx b/apps/docs/islands/ProgressDashboard.tsx index 23e99f6..28db14c 100644 --- a/apps/docs/islands/ProgressDashboard.tsx +++ b/apps/docs/islands/ProgressDashboard.tsx @@ -46,7 +46,8 @@ interface Stats { }[]; streak: number; queue: { date: string; due: number }[]; - recent: { date: string; attempts: number; passes: number }[]; + /** Every campaign day, zeros included; this page reads only the tail. */ + heat: { date: string; attempts: number; passes: number }[]; } function isStats(value: unknown): value is Stats { @@ -60,7 +61,7 @@ function isStats(value: unknown): value is Stats { Array.isArray(v.phases) && Array.isArray(v.gates) && Array.isArray(v.queue) && - Array.isArray(v.recent) && + Array.isArray(v.heat) && typeof v.streak === "number" ); } @@ -332,11 +333,14 @@ const GREENS = [ ]; function Recent({ stats }: { stats: Stats }) { + // heat spans the whole campaign, future days and all. The window wanted here + // is the seven days ending today, and campaign.day is that day, 1-based. + const week = stats.heat.slice(Math.max(0, stats.campaign.day - 7), stats.campaign.day); return (
Last 7 days
- {stats.recent.map((r) => ( + {week.map((r) => (