Skip to content

chore: social - traders list leaderboard#28170

Merged
zone-live merged 40 commits into
mainfrom
TSA-114-traders-list-leaderboard
Apr 13, 2026
Merged

chore: social - traders list leaderboard#28170
zone-live merged 40 commits into
mainfrom
TSA-114-traders-list-leaderboard

Conversation

@zone-live

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

Copy link
Copy Markdown
Contributor

Description

Wires up the Social Leaderboard to live data from the Social API.
Integrate the social-controllers (SocialService + SocialController) into the Engine, adds useTopTraders hook using useQuery from @metamask/react-data-query to fetch leaderboard data through the Data Services pattern.
Also adds the homepage TopTradersSection (horizontal card carousel) and the full TopTradersView (ranked list) with skeleton loading states.

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

Medium Risk
Adds a new Social data service/controller to the Engine and wires UI screens to fetch live leaderboard data from a new SOCIAL_API_URL, which could impact app startup/state persistence and introduce new network failure modes.

Overview
Adds live Social Leaderboard integration by introducing Engine-managed SocialService and SocialController (new messengers, init wiring, persisted state, and data-service registration) and configuring a new SOCIAL_API_URL build/env constant.

Updates the homepage TopTradersSection to fetch and render the top 3 traders (cards + skeleton loading, refresh via ref, hide when empty/flag off) and upgrades TopTradersView to display the full ranked list with a network filter entry point and follow toggles.

Includes new UI components (TopTraderCard, TraderRow, skeletons, NetworkFilterButton), a formatPnl formatter, the useTopTraders hook built on @metamask/react-data-query, plus expanded unit tests and updated mocks/strings.

Reviewed by Cursor Bugbot for commit 5881e59. Bugbot is set up for automated code reviews on this repo. 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.

@socket-security

socket-security Bot commented Mar 31, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​metamask/​social-controllers@​0.1.0741007589100

View full report

@zone-live zone-live added the team-social-ai Social & AI team label Mar 31, 2026
@zone-live

Copy link
Copy Markdown
Contributor Author

@SocketSecurity ignore npm/@metamask-previews/social-controllers@0.0.0-preview-ac7a6cc51

@MetaMask MetaMask deleted a comment from socket-security Bot Apr 1, 2026
@github-actions github-actions Bot added risk-high Extensive testing required · High bug introduction risk and removed risk-high Extensive testing required · High bug introduction risk labels Apr 2, 2026
@socket-security

socket-security Bot commented Apr 2, 2026

Copy link
Copy Markdown

All alerts resolved. Learn more about Socket for GitHub.

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

Ignoring alerts on:

  • npm/@metamask/social-controllers@0.1.0

View full report

@zone-live

Copy link
Copy Markdown
Contributor Author

@SocketSecurity ignore npm/@metamask/social-controllers@0.1.0

@github-actions github-actions Bot added risk-high Extensive testing required · High bug introduction risk and removed risk-high Extensive testing required · High bug introduction risk labels Apr 13, 2026
@github-actions github-actions Bot added risk-high Extensive testing required · High bug introduction risk and removed risk-high Extensive testing required · High bug introduction risk labels Apr 13, 2026

@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 5f9424f. Configure here.

Comment thread app/core/AppConstants.ts Outdated
@github-actions github-actions Bot added risk-high Extensive testing required · High bug introduction risk and removed risk-high Extensive testing required · High bug introduction risk labels Apr 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeAccounts, SmokeConfirmations, SmokeIdentity, SmokeNetworkAbstractions, SmokeNetworkExpansion, SmokeTrade, SmokeWalletPlatform, SmokeCard, SmokePerps, SmokeRamps, SmokeMultiChainAPI, SmokePredictions, SmokeSeedlessOnboarding, FlaskBuildTests
  • Selected Performance tags: @PerformanceAccountList, @PerformanceOnboarding, @PerformanceLogin, @PerformanceSwaps, @PerformanceLaunch, @PerformanceAssetLoading, @PerformancePredict, @PerformancePreps
  • Risk Level: high
  • AI Confidence: 100%
click to see 🤖 AI reasoning details

E2E Test Selection:
Hard rule (controller-version-update): @MetaMask controller package version updated in package.json: @metamask/social-controllers. Running all tests.

Performance Test Selection:
Hard rule (controller-version-update): @MetaMask controller package version updated in package.json: @metamask/social-controllers. Running all tests.

View GitHub Actions results

@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown
Contributor

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

@zone-live zone-live requested a review from joaosantos15 April 13, 2026 10:19
@zone-live zone-live enabled auto-merge April 13, 2026 10:22
@zone-live zone-live added this pull request to the merge queue Apr 13, 2026
Merged via the queue into main with commit cc65ec5 Apr 13, 2026
112 of 113 checks passed
@zone-live zone-live deleted the TSA-114-traders-list-leaderboard branch April 13, 2026 12:53
@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 risk-high Extensive testing required · High bug introduction risk size-XL team-social-ai Social & AI team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants