Skip to content

chore: social - traders list leaderboard#28170

Open
zone-live wants to merge 37 commits intomainfrom
TSA-114-traders-list-leaderboard
Open

chore: social - traders list leaderboard#28170
zone-live wants to merge 37 commits intomainfrom
TSA-114-traders-list-leaderboard

Conversation

@zone-live
Copy link
Copy Markdown
Contributor

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

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
Integrates a new SocialService/SocialController into the Engine and begins consuming a new Social API endpoint, which can affect app startup and network behavior if misconfigured. UI changes are localized but introduce new loading/empty-state behavior and follow toggling logic.

Overview
Adds a live Social Leaderboard data path by integrating @metamask/social-controllers into the Engine (new SocialService + SocialController, messengers, state hydration, and registration in DATA_SERVICES), plus a configurable SOCIAL_API_URL in build/env config.

Replaces the homepage TopTradersSection placeholder with a real, refreshable carousel fed by a new useTopTraders hook (via @metamask/react-data-query), including skeleton loading states and a local Follow/Following toggle.

Builds out TopTradersView to render the full ranked list with skeleton rows and a network filter UI (bottom sheet wiring), and adds supporting components/utilities (TopTraderCard, TraderRow, formatPnl) and expanded test coverage for the new hook/components and updated section behavior.

Written by Cursor Bugbot for commit 5554c47. 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.

@socket-security
Copy link
Copy Markdown

socket-security bot commented Mar 31, 2026

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
Updatednpm/​@​metamask/​controller-utils@​11.19.0 ⏵ 11.20.09710077 +195 +5100

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-medium Moderate testing recommended · Possible bug introduction risk labels Apr 2, 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
@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
@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
@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
Copy link
Copy Markdown

@cursor cursor bot left a comment

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.

@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
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeAccounts, SmokeConfirmations, SmokeIdentity, SmokeNetworkAbstractions, SmokeNetworkExpansion, SmokeTrade, SmokeWalletPlatform, SmokeCard, SmokePerps, SmokeRamps, SmokeMultiChainAPI, SmokePredictions, 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

@socket-security
Copy link
Copy Markdown

socket-security bot commented Apr 2, 2026

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

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 2, 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

2 participants