feat:Add a "Recently Completed" hunts section to the Arcade (#359)#412
Merged
Samuel1-ona merged 1 commit intoJun 1, 2026
Merged
Conversation
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.
What changed
when a hunt exceeds 50 players.
(up to 5 hunts) with winner addresses and a "View results" link per card.
arcade page load to avoid N sequential calls.
New files
┌────────────────────────┬────────────────────────────────────────────────┐
│ File │ Purpose │
├────────────────────────┼────────────────────────────────────────────────┤
│ hooks/usePlayerCo │ Single-hunt count with TTL cache and no-throw │
│ unt.ts │ guarantee │
├────────────────────────┼────────────────────────────────────────────────┤
│ hooks/usePlayerCo │ Bulk fetch via Promise.allSettled; exposes │
│ unts.ts │ refetch() │
├────────────────────────┼────────────────────────────────────────────────┤
│ hooks/useRecently │ Derives completed hunts from existing query; │
│ Completed.ts │ slices to MAX_RECENTLY_COMPLETED = 5 │
├────────────────────────┼────────────────────────────────────────────────┤
│ components/Comple │ Separate card for completed hunts (distinct │
│ tedHuntCard.tsx │ data shape from HuntCards) │
├────────────────────────┼────────────────────────────────────────────────┤
│ components/Recent │ Returns null when empty; horizontal scroll, │
│ lyCompletedSection.tsx │ keyboard-navigable │
├────────────────────────┼────────────────────────────────────────────────┤
│ hooks/usePlayerCo │ 10 tests: storage scan, TTL cache, trending │
│ unt.test.ts │ threshold, stale re-fetch │
├────────────────────────┼────────────────────────────────────────────────┤
│ hooks/usePlayerCo │ 7 tests: bulk fetch, cache hit, refetch, │
│ unts.test.ts │ partial failure isolation │
├────────────────────────┼────────────────────────────────────────────────┤
│ components/test │ 20 tests: count display, badge, a11y, card │
│ s/HuntCards.test.tsx │ rendering, answer submission │
└────────────────────────┴────────────────────────────────────────────────┘
Modified files
PlayerCountResult
to usePlayerCount in the play flow
RecentlyCompletedSection
Design decisions
(hunt_registered_{id}_{address}), consistent with how registerPlayer and
getPlayerProgress already work — no new RPC call.
are no completed hunts.
full address on title + aria-label.
nullable props that make the type system unhelpful.
Testing
All 37 new tests pass. Pre-existing failures in huntStore.test.ts and
GlobalActivityFeed.test.tsx are unrelated to this PR (pre-existing
localStorage.clear and logger issues in the test environment).
closes #359