Skip to content

chore: adds the initial setup for leaderboard feature#28053

Merged
zone-live merged 5 commits into
mainfrom
TSA-326-leaderboard-initial-setup
Mar 30, 2026
Merged

chore: adds the initial setup for leaderboard feature#28053
zone-live merged 5 commits into
mainfrom
TSA-326-leaderboard-initial-setup

Conversation

@zone-live

@zone-live zone-live commented Mar 27, 2026

Copy link
Copy Markdown
Contributor

Description

Adds the remote flag aiSocialLeaderboardEnabled and selector. When enabled, the homepage shows a Top Traders section (header + empty horizontal carousel placeholder) and registers the Top Traders as a stack screen with back/search and placeholder "Top traders". No leaderboard data or API yet this, is just the initial setup for the feature.

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

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

Low Risk
Low risk: changes are additive, feature-flag gated, and primarily UI/navigation scaffolding with tests and strings; no data fetching or critical flows are modified.

Overview
Adds initial Social Leaderboard scaffolding behind a remote flag. Introduces a version-gated aiSocialLeaderboardEnabled selector and registry entry, and conditionally registers a new Routes.SOCIAL_LEADERBOARD.VIEW stack screen (TopTradersView).

Homepage gains a new flag-controlled section. Adds TopTradersSection (header + empty horizontal carousel placeholder), includes it in homepage section ordering/refresh and analytics section naming, and updates tests/localization to cover the new route, flag behavior, and section index/total calculations.

Written by Cursor Bugbot for commit 5e5c1da. This will update automatically on new commits. Configure here.

@github-actions

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-social-ai Social & AI team label Mar 27, 2026
@github-actions github-actions Bot added size-M risk-medium Moderate testing recommended · Possible bug introduction risk labels Mar 27, 2026
@github-actions github-actions Bot added risk-medium Moderate testing recommended · Possible bug introduction risk and removed risk-medium Moderate testing recommended · Possible bug introduction risk labels Mar 27, 2026
@github-actions github-actions Bot added size-L risk-medium Moderate testing recommended · Possible bug introduction risk and removed size-M risk-medium Moderate testing recommended · Possible bug introduction risk labels Mar 27, 2026
@github-actions github-actions Bot added risk-medium Moderate testing recommended · Possible bug introduction risk and removed risk-medium Moderate testing recommended · Possible bug introduction risk labels Mar 27, 2026
@github-actions github-actions Bot added risk-medium Moderate testing recommended · Possible bug introduction risk and removed risk-medium Moderate testing recommended · Possible bug introduction risk labels Mar 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeWalletPlatform, SmokePerps, SmokePredictions
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: medium
  • AI Confidence: 82%
click to see 🤖 AI reasoning details

E2E Test Selection:
The PR introduces a new "Social Leaderboard / Top Traders" feature with the following changes:

  1. Homepage.tsx: New TopTradersSection added to the homepage sections list between Tokens and Perps sections. This modifies the section ordering and the getSectionIndex logic used by all homepage sections.

  2. MainNavigator.js: New TopTradersView route added conditionally (only when isSocialLeaderboardEnabled is true). This is a critical navigation file that affects all navigation flows.

  3. useHomeViewedEvent.ts: New TOP_TRADERS section name added to HomeSectionNames enum - this affects analytics tracking for all homepage sections.

  4. Routes.ts: New SOCIAL_LEADERBOARD route constants added (additive only).

  5. Feature flag: aiSocialLeaderboardEnabled is disabled by default (inProd: false, enabled: false), so the new UI won't appear in tests unless explicitly enabled.

Why SmokeWalletPlatform: This tag directly covers the Trending discovery tab and homepage sections. The Homepage.tsx changes (section ordering, section index calculation) and the HomeSectionNames enum change could affect how existing sections (Perps, Predictions, Tokens) are tracked and displayed. The MainNavigator change also affects navigation infrastructure used by Trending tests.

Why SmokePerps: Perps is a section inside the Trending tab. The homepage section ordering change (new TOP_TRADERS section inserted between TOKENS and PERPS) could affect getSectionIndex for Perps, potentially impacting analytics or rendering order. Per tag description: "changes to Perps views (headers, lists, full views) affect Trending. When selecting SmokePerps, also select SmokeWalletPlatform."

Why SmokePredictions: Similarly, Predictions is a section inside the Trending tab. The section index changes could affect Predictions section tracking. Per tag description: "Predictions is also a section inside the Trending tab (SmokeWalletPlatform); changes to Predictions views affect Trending."

The feature is disabled by default so risk to existing tests is low-medium. No SmokeConfirmations needed as this is a UI scaffold with no transaction flows yet.

Performance Test Selection:
No performance tests needed. The new TopTradersSection is a UI scaffold with an empty ScrollView (no data loading), the feature is disabled by default, and there are no changes to data fetching, state management, or rendering-heavy components that would impact performance metrics.

View GitHub Actions results

@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 1 potential issue.

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.

@Bigshmow Bigshmow 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.

LGTM

@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

@zone-live zone-live added this pull request to the merge queue Mar 30, 2026
Merged via the queue into main with commit 9ebed6c Mar 30, 2026
93 of 95 checks passed
@zone-live zone-live deleted the TSA-326-leaderboard-initial-setup branch March 30, 2026 17:56
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 30, 2026
@metamaskbot metamaskbot added the release-7.73.0 Issue or pull request that will be included in release 7.73.0 label Mar 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.73.0 Issue or pull request that will be included in release 7.73.0 risk-medium Moderate testing recommended · Possible bug introduction risk size-L team-social-ai Social & AI team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants