feat(stats): add accuracy and reuse-rate sparklines to the homepage hero (#4447, #4448) - #4685
Merged
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
gittensory-ui | 10cf1f0 | Commit Preview URL Branch Preview URL |
Jul 10 2026, 11:56 AM |
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ProofOfPowerStatshero band, riding theaccuracyTrend/reuseRateTrendseriesGET /v1/public/statsalready returns (feat(review): add a public weekly review-accuracy trend (#4447) #4655, feat(review): add cache hit/miss telemetry to grounding and review-memory (#4448) #4658, feat(review): instrument impact-map + add a public AI-reuse-rate trend (#4448) #4671)./statspage with full trend charts, then explicitly redirected to inline hero sparklines instead — smaller surface, no new route, no navigation change.accuracyPct: null/reuseRatePct: null; the sparkline draws a genuine gap there (connectNulls={false}) instead of a fabricated flat line or a zero.codecov/patchin their own PRs, so this diff has nosrc/**lines and no coverage obligation.Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Closes #123) — a linked open issue is required for every contributor PR.Closes #4448 (last unchecked deliverable — "Homepage/
/statspage shows the reuse-rate trend" — the other #4448 deliverables shipped in #4658/#4671; the "daily rollup, cron-refreshed" deliverable was deliberately built as a live-computed query over durable tables instead, mirroring the same live-vs-rollup call made for #4447, to avoid a cron-miss gap and a second copy of the number). Advances #4447 (already closed; this adds the "accuracy-over-time chart alongside the existing live number" piece its own checklist left undone at close time).Validation
git diff --checknpm run actionlint— skipped, no.github/workflows/**changes in this diff.npm run typechecknpm run test:coveragelocally;codecov/patchrequires ≥99% coverage of the lines AND branches you changed (aim for 100% on your diff so CI variance does not fail near the threshold). Global coverage is a non-blocking trend with a loose 90% backstop, not the gate. — skipped: nosrc/**lines in this diff (UI-only), socodecov/patchdoesn't apply. UI-side behavior is covered byui:testinstead (see below).npm run test:workers— skipped, no Worker/backend code touched.npm run build:mcp— skipped, no MCP package changes.npm run test:mcp-pack— skipped, no MCP package changes.npm run ui:openapi:check— clean; this diff doesn't touch any route or schema.npm run ui:lintnpm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderateproof-of-power-stats.test.tsx: five-tile assertion (was four), a dedicated sparkline-count/a11y-name test, and the fixture now carries a deliberate null-accuracy week to exercise the gap path.Also ran, not in the template's list:
npm --workspace @jsonbored/gittensory-ui run test(15 files / 113 tests, full workspace) both before and after rebasing onto latestmain— no drift.Safety
/v1/public/statspayload; the whole section still renders nothing untiltotals.handled > 0, same as before.UI Evidencesection below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository. — left unchecked honestly: seeUI Evidencebelow for what was actually verified and why no GitHub-hosted image URLs are attached.UI Evidence
No GitHub-hosted screenshot URLs are attached — this session has no browser access to github.com to produce
user-attachments/user-imagesURLs, and the template asks not to commit review-evidence images to the repo. In lieu of that, here's exactly what was verified against the local dev server (apps/gittensory-ui, via Claude Code's Preview tooling, realrechartsrender in a real DOM, not a snapshot test):stroke: oklch(0.88 0.18 115)(--chart-1, accuracy) andoklch(0.75 0.16 140)(--chart-2, reuse rate) — the app's own existing, already-validated chart ramp, not a new palette..darkclass off directly (this app keys theming off a class, notprefers-color-scheme) — both sparklines correctly repaint to their light-mode OKLCH values (0.78 0.18 115/ light chart-2), no hardcoded dark-only color.<path>directly: twoM(moveto) subpaths, breaking exactly at the fixture's null-accuracy week — confirmsconnectNulls={false}produces a real visual gap for "below minimum sample," not an interpolated line through it.grid-cols-2layout: the 5th tile ("AI work reused") wraps to its own row at half width as expected, sparkline stays proportioned inside the tile, no overflow/clipping.<Line>s:strokeWidth: 2px,strokeLinecap/strokeLinejoin: round, no axes/gridlines/tooltip (sparklines are the documented exception to the hover-layer default) — matches the dataviz skill's stat-tile figure contract.Notes
.claude/launch.json(a local Preview-tooling dev-server config) is intentionally not included in this PR — it's outsidewantedPathsand is personal/session tooling, not a repo need.