feat(dashboard): recent-review teaser and comma-formatted token counts #80
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/home-recent-review"
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?
Add a "most recent review" card to the home page showing the signed-in
user's newest involved review (repo, PR, verdict, tier, and a one-line
summary). Admins with no reviews of their own fall back to their saved
"view as" identity, labeled as such.
Also format the input/output token tallies with thousands separators via
a new humanCount helper so they read as "1,234,567" rather than a wall of
digits.
Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com
Automated review by pr-reviewer v0.39.0 | Safety Check | Claude Sonnet 5 | tracking id
r-62b853-c15fb9This is an AI-generated review and may contain mistakes.
Status: ✅ Completed
✅ Verdict: LGTM — Additive dashboard feature (recent-review teaser + comma-formatted token counts) with reasonable tests and no security or breaking-change concerns.
Reviewed the diff:
humanCount: straightforward comma-formatting logic, tested with several cases including negatives. Looks correct.summarize: trims first non-empty line, truncates by rune count with ellipsis. Reasonable, tested.recentReviewForUser/recentReviewFor: usess.store.ReviewsVisibleToUser(ctx, email, 1)— relies on that method properly scoping to the user's visible/involved reviews (not shown in diff, presumed already correct/existing). Falls back to admin's "view as" email only if it differs from the real email, and labels it appropriately. Nil-safe on missing user, and errors are logged and treated as "no review" rather than propagated — reasonable fail-open behavior for a non-critical dashboard widget.{{if .RecentReview}}and{{if .RecentReview.Summary}}, no obvious injection risk since html/template auto-escapes.Nothing alarming: no secrets, no obvious logic bugs, no breaking changes.