feat(dashboard): add a 7-day stats window to the home page #93
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/home-seven-day-window"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The home page rolled up one window (last 24 hours), which is too narrow
to see whether review volume or failures are trending. Add a second card
covering the last 7 days alongside it.
The stat block moves into a "statsWindow" template that the page ranges
over, so the handler decides which windows exist and the markup is
written once. Each window's store lookup falls back to zeros on error
independently, so one failed query no longer blanks the whole rollup.
Both windows share the existing StatsSince query and the indexed
review_events.timestamp column; the 7-day figures are cumulative and
include the last 24 hours.
Co-Authored-By: Claude Opus 5 noreply@anthropic.com
Automated review by pr-reviewer v0.42.1 | Safety Check | Claude Sonnet 5 | tracking id
r-70589d-5a2d41This is an AI-generated review and may contain mistakes.
Status: ✅ Completed
✅ Verdict: LGTM — The change is a straightforward, well-tested refactor to add a second stats window with independent error fallback, with no security or breaking-change concerns.
Complexity: moderate
Reviewed the diff for obvious bugs, security issues, or accidental commits.
statsWindowtemplate + slice looks sound; the handler builds two independent windows and each falls back to zeros on error independently, matching the PR description.internal/dashboard/user_handlers.golacks direct handler-level tests, but the rendering logic is covered viahome_render_test.go, and this is a low-risk, additive change (no new external inputs, no auth/security-sensitive code paths touched).renderHometest helper still works via a thin wrapper, and the template change preserves the original card markup, just wrapped in a named block.Nothing alarming stands out; this looks like a clean, well-tested UI/handler change.