0055. The overview page: honest rows, a broken trend line, a server-safe band, a session reveal
Source:
docs/decisions/0055-overview-page.md. Generated at build time; edit the source file.
Date: 2026-11-22. Status: accepted (M5a Task 8). Builds on 0047 (honest statistics), 0050 (chart encodings) and 0053 (variant b).
Context
Section titled “Context”Task 8 turns the overview lab’s variant b into the real /app. The T6 critic and review left binding hand-offs: break the rolling line across months with no games, fix the misleading range rulers and bare sparklines, state n less often, a shorter phone headline, dark-mode weight, empty states, a red-pen “What to work on” slot that stays empty until the R2 profile exists, a time-control filter, a recent-games table, bandText usable on the server, and a narrow view model for client code.
Decision
Section titled “Decision”- No ruler on overview KPIs.
KpiStatgainsscale={false}, andEstimateKpialways passes it. A per-game rate has no meaningful reference range here (zero to “15% past the band” put every marker at about 75–80% across, which reads as “near the worst”), so the band is stated in words only. The styleguide and other hosts keep the ruler by default. - Sparklines carry their ends and direction.
KpiStatgainstrendEnds(the first and last weekly values under the line) andbetter(“Lower is better”): a convention, never a verdict. A one-line note beside the rows says a gap is a week with no games. - The trend breaks across empty time.
AccuracyTrendgainsgapDays; the overview passes 28, so the rolling line and band stop where four weeks or more passed with no games, and the caption says so. The chart’s default is unchanged. bandTextand its siblings move to@ci/ui/stats/band.ts, a module with no"use client", re-exported from the barrel. A server component can call them. Constants shared across the boundary (REVEAL_COOKIE) live in plain modules for the same reason.- The page is a server component. Only the accuracy trend is a client island, and it gets
AccuracyView: ids, ISO dates, accuracies, results, captions without opponents, review links.KpiStatreceives numbers only. The recent-games table is server-rendered. - n once per section, for estimates and shortfalls alike (fix round 1). The headline states n; “Mistakes per game” states it once, and each class in “By time control” states its own once. A row on the section’s basis keeps its basis for screen readers only (
basisHidden). Below the minimum, the section states “Need N more games…” once and its rows show a dash, with the basis and the shortfall kept for screen readers. A row on another basis (for example a class’s accuracy when some games have none) shows its own basis and shortfall visibly. - The filter is links.
?tc=witharia-current, so it survives a reload and needs no client code. An unknown or unanalysed class falls back to All. - The report reveal is CSS, gated by a session cookie. The server renders
data-reveal="first"whenci_overview_seenis absent; a client effect then sets it (no max-age, so it ends with the browser session). The ruled lines draw onscaleXand the heading and figures appear at 60% (CSS keyframes, so the server render is already the first frame and nothing waits for JavaScript), the trend draws in, andStatrolls up from zero only while its[data-reveal-fig]wrapper is still transparent. First viewport only; nothing under reduced motion. - “What to work on” stays empty. It names the slot and says the coaching profile is still being built. No finding is guessed from raw judgement counts.
- A lone game is plotted.
AccuracyTrendgainsminPoints(default 2, unchanged); the overview passes 1, so a one-game account shows its dot while the line waits for 10 games. Date ticks are now one per day, on midnight, so a short span never repeats a label. - The nav says “Overview” (ruling), matching the page’s title; “dashboard” stays a command-palette keyword.
- Dark mode. The trend band steps to
pencil/60, dense loss rings toink-faint, and the wins bar toink-soft, so the white bar is no longer the heaviest mark on the page.
Consequences
Section titled “Consequences”- One more prop each on
KpiStat,StatandAccuracyTrend, all optional and off by default. - The headline is rendered twice (a short phone sentence and the long one), one hidden per breakpoint.
- The lab under
/lab/overviewis unchanged and still dev-only.