Skip to content

[#889] Add weekly snapshots component#908

Merged
realproject7 merged 2 commits intomainfrom
task/889-weekly-snapshots
Apr 21, 2026
Merged

[#889] Add weekly snapshots component#908
realproject7 merged 2 commits intomainfrom
task/889-weekly-snapshots

Conversation

@realproject7
Copy link
Copy Markdown
Owner

Fixes #889

Summary

  • WeeklySnapshots component: scrollable list of weekly recap cards in reverse chronological order
  • Each card shows: week number, date range, new stories, token buys, new referrals, mcap change (absolute + %), PL earned
  • MCap change colored green (accent) for positive, red (error) for negative
  • Empty state: "No weekly snapshots yet — check back after the first week!"
  • Added to /airdrop page between Leaderboard and MilestoneTrack
  • 60s stale time consistent with other airdrop components

Test plan

  • Verify weekly recap cards display in reverse chronological order
  • Verify all stats shown: stories, buys, referrals, mcap change, PL earned
  • Verify mcap percentage change calculated correctly with color coding
  • Verify date range formatting (e.g., "Apr 14-Apr 20")
  • Verify empty state when no snapshots exist
  • Verify responsive layout on mobile

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
plotlink Ignored Ignored Apr 21, 2026 5:56am

Request Review

Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: REQUEST CHANGES

Summary

The recap UI is close, but it does not enforce the reverse-chronological ordering required by issue #889.

Findings

  • [medium] The component renders data.snapshots in API order without sorting. Issue #889 explicitly requires latest week first, so this UI will be wrong whenever the endpoint returns snapshots oldest-first or unsorted.
    • File: src/components/airdrop/WeeklySnapshots.tsx:58
    • Suggestion: Sort snapshots descending by weekStart or weekNumber before rendering so the latest recap is always at the top.

Decision

Requesting changes because the component currently relies on implicit backend ordering for a user-visible requirement.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: APPROVE

Summary

The follow-up update resolves the ordering issue from my prior review. Weekly recap cards are now explicitly sorted descending by weekNumber, so the latest week renders first regardless of API order.

Findings

  • No remaining code-level blockers in the changed files.

Decision

Approving because the weekly snapshots behavior I reviewed now matches issue #889.

@realproject7 realproject7 merged commit b0d40ab into main Apr 21, 2026
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Airdrop P3] Weekly snapshots component

2 participants