Fix/rewards page track winners#579
Conversation
The rewards page was filtering winners by `submission.rank` only, so on the track-based prize structure it silently dropped every track winner. For the Boundless × Trustless Work hackathon (3 overall + 5 track tiers), the page rendered 3 of 8 winners and the publish wizard preview showed 3 of 8 prize tiers paired. Same root cause as boundlessfi/boundless-nestjs#132: track winners live on `SubmissionTrackEntry.wonRank`, not on `submission.rank`, and the rewards UI was rank-keyed end to end. Changes: - Extend `Submission` with optional track-winner fields (`isTrackWinner`, `trackId`, `trackName`, `trackPrize`, `trackWonRank`). - `useHackathonRewards` now fetches `getHackathonWinners` in a dedicated effect that runs once results are published. The `trackWinners` payload is stamped onto matching submissions AND returned raw so the page can render a per-track section. - `useHackathonRewards` also preserves `tier.kind` and `tier.trackId` on the mapped `prizeTiers` and re-sorts so track tiers no longer collapse to the 999 fallback rank. - `rewards/page.tsx` winners filter now ORs `s.isTrackWinner` with the rank-based check, and `maxRank` counts only OVERALL tiers so the rank-keyed lookups don't get polluted with synthetic track ranks. - New `TrackWinnersSection` component renders below the existing rank-based `PodiumSection`. Mirrors the public WinnersTab pattern: one card per track with prize chip, project name, team, avatars. - `PublishWinnersWizard` includes track winners in its preview list and threads `kind`/`trackId` through to `WinnersGrid`. - `WinnersGrid` now renders overall + track tiers as separate sections. Overall keeps the 2-1-3 podium re-order; track tiers render in display order. Each tier is matched to its winner via rank OR trackId. Pairs with boundless-nestjs#132 (BE trigger endpoint already respects track winners after that merged). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The wizard preview's "3/8 Winners Assigned" line plus the existing
WinnerCard layout was confusing — "$300 USDC" double-signed the
currency, "0 Comments" was meaningless in a payout preview, and track
winners got a "4th Position" ribbon they didn't earn.
Redesigned to match the patterns Devpost / Devfolio / ETHGlobal use
in their publish flows:
WinnersGrid header:
- Replace the cryptic "X/Y Winners Assigned" with a callout chip:
green check + "All N winners assigned" when complete, amber
warning + "X of Y assigned (Z unassigned)" when not.
- Show the total prize pool ("1,500 USDC pool") as a sibling chip so
the organizer sees the dollar figure they're committing.
- Render "Overall Placements" as a sub-header only when track
winners also exist (avoids redundant heading on OVERALL_ONLY).
WinnerCard:
- Drop the dollar sign for non-dollar currencies — `"$300 USDC"` is
now `"300 USDC"`, a cleaner industry-standard read.
- Track winners get a track-name chip ("Best UI/UX") instead of a
synthetic-rank ribbon ("4th Position").
- Drop the "0 Comments" noise; not a meaningful signal at payout time.
- Drop the placeholder bitmed.png; surface project name + participant
name + category as the primary content.
- Cards now have consistent dimensions (no podium scaling for tracks),
uniform border + hover treatment, prize chip aligned to the right.
Only the publish-wizard preview is touched; the public Winners tab
and the rewards podium are unchanged.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (9)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Superseded by the cherry-pick PR off main; this branch's data fix already landed via #576, so any new PR off it conflicts. Reopened polish-only against current main. |
No description provided.