check phase commit:#408
Open
happyboy24 wants to merge 1 commit into
Open
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.



PR: Display Agent Badges on Leaderboard
Closes: #200 (badges system integration), related to #190 (leaderboard)
Summary
Integrates the new badges system into the leaderboard UI, displaying up to 3 earned badge icons per agent row with tooltips and overflow handling. Badges are fetched in parallel with existing rank data to avoid request waterfalls.
Changes
API Layer
getLeaderboard()to fireGET /api/agents/{id}/badgesfor each agent in parallel with existing rank/XP fetchAgentBadgesResponsetype mapping from issue X402 multi-chain: add transaction explorer link after settlement #200 schemaPromise.all()over agent IDs so badge fetching doesn't block rank dataUI Components
LeaderboardRow— addedBadgeStripsub-component<BadgeIcon>components+N moreoverflow label whenbadges.length > 3MMM DD, YYYY)BadgeIcon— new presentational componentbadge: { id, name, iconUrl, earnedAt }Tooltipprimitive from@/components/uiaria-label+ keyboard focus triggers tooltipDistrictLeaderboard— updated to includeBadgeStripin per-district rows (same layout rules as global view)Behavior
+N moretruncates with ellipsisPerformance
Promise.all([getRanks(), ...agents.map(a => getBadges(a.id))])useMemokeyed on agent IDloading="lazy"on<img>Screenshots
(attach before/after screenshots here)
Testing
BadgeStriprenders ≤3 icons, shows overflow correctlyTooltipdisplays name + date on hoverChecklist
/api/agents/{id}/badges+N moreoverflow labelRelated
Suggested PR title:
Quick review tip:
If you want to make the acceptance criteria super scannable for reviewers, you could also add this section right after Summary:
markdown
Acceptance Criteria Coverage
BadgeStripBadgeIcon+Tooltip+N moreoverflowBadgeStripgetLeaderboard()DistrictLeaderboard