For #3202's second half. appVisitorsView in src/web/pages/settings.ts shows only today's numbers.
Done looks like:
[ ] src/apps/vitals.ts exports loadP75Days(db, appId, at, days = 30): (number | null)[], oldest first. A day with no reports is null. It runs one query grouped by day, not 30 queries.
[ ] appVisitorsView draws it with the daySpark helper, server-rendered and with no script. Its label says "p75 load each day over the last 30 days". An app with no reports in 30 days says "No load reports in the last 30 days" in words, with no svg.
[ ] Nothing is added outside the design system: no new class, colour literal, style= or off-scale size. bun test test/design-lint.test.ts passes before the push, with docs/design/baseline.json untouched. Run it locally: it is what failed pull #3236.
[ ] A test seeds fixture vital rows on days 1, 2 and 4 and checks three things: the gap on day 3 (two polylines), the empty-state sentence, and that loadP75Days returns null for the silent day.
Files: src/apps/vitals.ts, src/web/pages/settings.ts, test/app-vitals-days.test.ts.
Risks: the page must stay fast. Index use on the vitals table needs checking, so add an index only if the query plan scans.
For #3202's second half.
appVisitorsViewinsrc/web/pages/settings.tsshows only today's numbers.Done looks like:
src/apps/vitals.tsexportsloadP75Days(db, appId, at, days = 30): (number | null)[], oldest first. A day with no reports isnull. It runs one query grouped by day, not 30 queries.appVisitorsViewdraws it with thedaySparkhelper, server-rendered and with no script. Its label says "p75 load each day over the last 30 days". An app with no reports in 30 days says "No load reports in the last 30 days" in words, with no svg.style=or off-scale size.bun test test/design-lint.test.tspasses before the push, withdocs/design/baseline.jsonuntouched. Run it locally: it is what failed pull #3236.loadP75Daysreturnsnullfor the silent day.Files:
src/apps/vitals.ts,src/web/pages/settings.ts,test/app-vitals-days.test.ts. Risks: the page must stay fast. Index use on the vitals table needs checking, so add an index only if the query plan scans.