feat: recent activity modal with grouped history#242
Conversation
- Limit dashboard preview to 3 items (was 5) - Increase backend query limit to 20 for modal use - Extract client component with "View All Activity" button that opens a dialog - Dialog features a purple header with total XP + count, and timeline grouped by month Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Claude finished @pbrissaud's task in 1m 27s —— View job Code Review
Overall the implementation is clean and well-structured. The server component → client component split is a nice pattern. A few issues worth addressing: Bug: Null challenge fields can break the UI
The component should guard against these null values, either by conditionally rendering the link/title, or by filtering out non-challenge transactions upstream. Fix this → UX: Modal header XP total is misleading
const totalXp = recentGains.reduce((sum, g) => sum + g.xpAmount, 0);
Code quality: Fragile Dialog close-button CSS selector
// make the built-in close button visible over the purple header
"[&>button:last-child]:text-primary-foreground [&>button:last-child]:opacity-80 [&>button:last-child]:hover:opacity-100",This relies on the internal DOM structure of shadcn/ui's Minor: "View All Activity" shown with 0 itemsIf the user has no activity yet, the button still renders and opens an empty modal. Consider hiding the button (or the whole section) when Nit: Magic number for preview countLine 94: Summary
|
…dialog close button - Guard against null challengeSlug/challengeTitle from leftJoin - Rename totalXp to recentXp and label it "+X XP recently" in modal header - Add hideCloseButton prop to DialogContent; use explicit DialogClose in purple header - Hide "View All Activity" button and modal when recentGains is empty - Extract PREVIEW_COUNT constant (was magic number 3) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Claude finished @pbrissaud's task in 1m 26s —— View job Code Review (Updated)
All five issues from the previous review have been addressed. Here's a summary:
One remaining minor nitThe modal header shows The implementation is clean and the fixes are well-done. Ready to merge once the nit is addressed (or consciously left as-is). |
Signed-off-by: Paul Brissaud <pbrissaud.pro@gmail.com>
|
Claude finished @pbrissaud's task in 1m 5s —— View job Code Review (Updated)
All previously flagged issues from the first two reviews remain fixed. The implementation is clean overall. Two small things to note in this latest push: Nit:
|
| Previous Issues | Status |
|---|---|
🔴 Null challengeSlug/challengeTitle → broken links |
✅ Fixed |
| 🟡 XP total was a partial sum without indication | ✅ Fixed — "XP recently" label |
🟡 Fragile [&>button:last-child] CSS selector |
✅ Fixed — explicit DialogClose + hideCloseButton |
| 🟢 "View All Activity" shown with empty state | ✅ Fixed |
🟢 Magic number 3 for preview slice |
✅ Fixed — PREVIEW_COUNT constant |
| New / Carry-over | Severity |
|---|---|
PREVIEW_COUNT is 4 but PR says 3 |
🟢 Nit |
| Activity count not qualified as "recent" | 🟢 Nit (carry-over) |
The PR is otherwise ready to merge. These are purely cosmetic; address them or close them consciously.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Claude finished @pbrissaud's task in 1m 5s —— View job Code Review (Updated)
All issues from previous reviews are resolved in this latest push. Here's the full status:
One remaining nit:
|
Summary
Test plan
🤖 Generated with Claude Code