Skip to content

feat(rewards): multiple leaderboards one for each tier#28621

Merged
VGR-GIT merged 10 commits into
mainfrom
RWDS-1163-multiple-leaderboards-one-for-each-tier
Apr 13, 2026
Merged

feat(rewards): multiple leaderboards one for each tier#28621
VGR-GIT merged 10 commits into
mainfrom
RWDS-1163-multiple-leaderboards-one-for-each-tier

Conversation

@sophieqgu

@sophieqgu sophieqgu commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

Description

https://consensyssoftware.atlassian.net/browse/RWDS-1163

Leaderboard tier selector

  • Replaced TabsBar with a Pressable trigger that opens a RewardsSelectSheet bottom sheet for tier selection
  • Created RewardsSelectSheet -- a generic, reusable select bottom sheet registered as a transparentModal in MainNavigator.js at Routes.MODAL.REWARDS_SELECT_SHEET. Accepts title, options, selectedValue, and onSelect callback
  • Default tier is the user's projected tier (from leaderboard position) when available, otherwise the top tier (last in list)

Stats summary

  • Added CampaignStatsSummary component displaying Return, Market Value, Rank, and Tier in a 2x2 grid with loading skeletons and error banners

Leaderboard neighbor display (preview mode)

  • When maxEntries is set and the user's tier matches the selected tier:
  • If user rank is within visible range: highlights their row with bg-background-muted
  • If user rank is outside visible range: shows top 3 entries + dot separator + neighbor entries (rank-1, user, rank+1)
  • Handles edge cases: first/last in tier (1-2 neighbors), tier mismatch, no position data

Pending tag / Qualified tag

  • Add qualified and qualifiedDays to CampaignLeaderboardEntry and CampaignLeaderboardPositionDto
  • Display Pending Tag if qualified: false, Qualified tag if true

Activity view

  • Group activity rows by date

Prize pool

  • Add prize pool progress bar according to hardcoded breakpoints given by PRD
  • Fetch total deposit volume from new endpoint Get(':campaignId/stats/deposits')

Changelog

CHANGELOG entry: null

Related issues

Fixes:

Manual testing steps

Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]

Screenshots/Recordings

Before

*After

Pending

Simulator Screenshot - E2E Test  - 2026-04-09 at 17 59 47 Simulator Screenshot - E2E Test  - 2026-04-10 at 15 15 05 Simulator Screenshot - E2E Test  - 2026-04-10 at 15 15 41 Simulator Screenshot - E2E Test  - 2026-04-10 at 15 18 33 Simulator Screenshot - E2E Test  - 2026-04-10 at 15 18 40

Qualified

Simulator Screenshot - E2E Test  - 2026-04-10 at 15 20 27 Simulator Screenshot - E2E Test  - 2026-04-10 at 15 20 31 Simulator Screenshot - E2E Test  - 2026-04-10 at 15 23 10

Activity view

Simulator Screenshot - E2E Test  - 2026-04-10 at 15 28 48

Prize pool

Simulator Screenshot - E2E Test  - 2026-04-10 at 17 24 02 Simulator Screenshot - E2E Test  - 2026-04-10 at 17 29 36 Simulator Screenshot - E2E Test  - 2026-04-10 at 17 29 58

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Note

Medium Risk
Moderate UI/behavior changes in Rewards campaign flows plus a new data fetch (getOndoCampaignDeposits) and updated leaderboard rendering, which could affect navigation and correctness of displayed stats/tier selection.

Overview
Updates Ondo campaign rewards UI to support tier-based leaderboards via a new reusable RewardsSelectSheet modal (registered in MainNavigator) and localized tier display names.

Reworks campaign details/leaderboard presentation by replacing OndoLeaderboardPosition with a new CampaignStatsSummary (return/market value/rank/tier, pending/qualified tags, SWR-style loading/error handling), adding a OndoPrizePool progress section backed by a new useGetOndoCampaignDeposits hook, and enhancing OndoLeaderboard with preview mode (maxEntries), current-user highlighting, and neighbor/split-view rendering.

Refactors the portfolio activity view to be activity-only, grouped by date headers, and updates activity rows to support timeOnly, signed USD formatting, and external outflow address shortening; tests are updated/added accordingly.

Reviewed by Cursor Bugbot for commit ecd1e4b. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions

github-actions Bot commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@metamaskbot metamaskbot added the team-rewards Rewards team label Apr 9, 2026
@sophieqgu sophieqgu changed the title Rwds 1163 multiple leaderboards one for each tier feat(rewards): multiple leaderboards one for each tier Apr 9, 2026
@sophieqgu sophieqgu force-pushed the RWDS-1163-multiple-leaderboards-one-for-each-tier branch from 6809600 to 34c1842 Compare April 10, 2026 19:32
@sophieqgu sophieqgu force-pushed the RWDS-1163-multiple-leaderboards-one-for-each-tier branch from f3f23ec to d56848d Compare April 10, 2026 23:10
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

⏭️ Smart E2E selection skipped - draft PR

All E2E tests pre-selected.

View GitHub Actions results

@github-actions

Copy link
Copy Markdown
Contributor

E2E Fixture Validation — Schema is up to date
17 value mismatches detected (expected — fixture represents an existing user).
View details

@sonarqubecloud

Copy link
Copy Markdown

@sophieqgu sophieqgu marked this pull request as ready for review April 11, 2026 00:02
@sophieqgu sophieqgu requested a review from a team as a code owner April 11, 2026 00:02

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit ecd1e4b. Configure here.

nextPrize: null,
nextThreshold: current.deposit,
isMaxTier: true,
};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Prize pool subtext misleads when deposits exceed max threshold

Low Severity

When deposits reach the final breakpoint (≥$6M), computeProgress sets nextThreshold to current.deposit (6M). The subtext always renders using this value, producing text like "$7M of $6M volume" where current exceeds target. This is confusing to users since it implies they haven't reached a goal they've already surpassed.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit ecd1e4b. Configure here.

@VGR-GIT VGR-GIT added this pull request to the merge queue Apr 13, 2026
Merged via the queue into main with commit bee9b14 Apr 13, 2026
116 of 117 checks passed
@VGR-GIT VGR-GIT deleted the RWDS-1163-multiple-leaderboards-one-for-each-tier branch April 13, 2026 13:08
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 13, 2026
@metamaskbot metamaskbot added the release-7.74.0 Issue or pull request that will be included in release 7.74.0 label Apr 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.74.0 Issue or pull request that will be included in release 7.74.0 size-XL team-rewards Rewards team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants