Skip to content

Add Gauntlet Race placement badges for pantheon and PGCR - #341

Open
owens1127 wants to merge 2 commits into
mainfrom
feat/gauntlet-race-badges
Open

Add Gauntlet Race placement badges for pantheon and PGCR#341
owens1127 wants to merge 2 commits into
mainfrom
feat/gauntlet-race-badges

Conversation

@owens1127

Copy link
Copy Markdown
Contributor

Summary

  • Add Gauntlet Race badge on PGCR, OG images, and pantheon profile cards when a clear is on the gauntlet race leaderboard
  • Show pantheon version-first placement badges (version name + rank) for non-day-one clears
  • Gauntlet supersedes Day One when both apply; Insurrection Prime (v134) never shows Day One # from version-first rank
  • Rename Community Race labels to Gauntlet Race in home buckets and leaderboard page

Depends on API PR merging first (new isGauntletRace, isPantheon, profile fields).

Test plan

  • PGCR for gauntlet race clear shows Gauntlet Race #N only (not Day One #N)
  • PGCR for other pantheon day-one clears shows Day One #N
  • Insurrection Prime day-one clear without gauntlet shows Day One without number
  • Pantheon profile tab shows golden badge on correct mode cards
  • CI passes

Made with Cursor

Show Gauntlet Race ranks on PGCR, profile pantheon cards, and share images; suppress Insurrection Prime Day One numbers and let gauntlet placements supersede Day One when both apply.

Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel

vercel Bot commented Jun 14, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
raid-hub Ready Ready Preview Jun 14, 2026 6:49pm

Request Review

Co-authored-by: Cursor <cursoragent@cursor.com>
Comment on lines +31 to +38
if (activity.isGauntletRace && rank) {
return [
{
label: Tag.GAUNTLET_RACE,
placement: rank,
key: "gauntlet-race"
}
]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: The function getLeaderboardRaceBadges incorrectly requires a rank to show the "Gauntlet Race" badge, causing it to fall back to a "Day One" badge when rank is null.
Severity: MEDIUM

Suggested Fix

Update the conditional check from if (activity.isGauntletRace && rank) to if (activity.isGauntletRace). This will ensure the "Gauntlet Race" badge is correctly prioritized and displayed for all Gauntlet activities, even when a specific rank is not available.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: src/lib/pgcr/leaderboard-tag.ts#L31-L38

Potential issue: In the `getLeaderboardRaceBadges` function, the condition `if
(activity.isGauntletRace && rank)` requires a `rank` to be present to show a "Gauntlet
Race" badge. However, `leaderboardRank` can be `null` according to the API schema. When
`isGauntletRace` is true but `rank` is null, the logic incorrectly falls through to the
`isDayOne` check, causing a "Day One" badge to be displayed instead. This contradicts
the intended behavior where a Gauntlet Race badge should supersede a Day One badge,
regardless of whether a rank is available.

Did we get this right? 👍 / 👎 to inform future reviews.

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.

1 participant