Skip to content

feat: hold time label and wiring#28873

Merged
xavier-brochard merged 10 commits into
mainfrom
TSA-408-hold-time-label-and-wiring
Apr 17, 2026
Merged

feat: hold time label and wiring#28873
xavier-brochard merged 10 commits into
mainfrom
TSA-408-hold-time-label-and-wiring

Conversation

@Bigshmow

@Bigshmow Bigshmow commented Apr 15, 2026

Copy link
Copy Markdown
Contributor

Description

The trader profile StatsRow currently shows a dash placeholder for avg hold time with the label "avg. hold".

Changes

  • Rename the label from "avg. hold" to "hold time" in i18n strings
  • Wire up medianHoldingTimeMinutes from the social controller/API response to the StatsRow component
  • The StatsRow component already accepts an avgHoldMinutes prop and formats it — just needs to be passed from TraderProfileView

TSA-408

Changelog

CHANGELOG entry: Added hold time to trader profile view

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

Performance checks (if applicable)

  • I've tested on Android
    • Ideally on a mid-range device; emulator is acceptable
  • I've tested with a power user scenario
    • Use these power-user SRPs to import wallets with many accounts and tokens
  • I've instrumented key operations with Sentry traces for production performance metrics

For performance guidelines and tooling, see the Performance Guide.

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 UI/i18n wiring change plus a minor dependency bump; main risk is mismatched API fields from @metamask/social-controllers@0.2.0 causing hold time or follow-state defaults to regress.

Overview
Trader profile stats now display hold time from the API by wiring profile.stats.medianHoldMinutes into StatsRow via a renamed prop (holdTimeMinutes).

Updates the i18n label from avg. hold to hold time, adjusts StatsRow unit tests accordingly, and bumps @metamask/social-controllers to ^0.2.0 (updating default background/log snapshot state to include SocialController.followingProfileIds).

Reviewed by Cursor Bugbot for commit 6de3166. 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.

@Bigshmow Bigshmow marked this pull request as ready for review April 15, 2026 16:18
@Bigshmow Bigshmow added the team-social-ai Social & AI team label Apr 15, 2026
@socket-security

socket-security Bot commented Apr 15, 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
Updatednpm/​@​metamask/​social-controllers@​0.1.0 ⏵ 0.2.07410075 +191 +3100

View full report

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

Reviewed by Cursor Bugbot for commit 2e2d625. Configure here.

Comment thread app/components/Views/SocialLeaderboard/TraderProfileView/TraderProfileView.tsx Outdated
@Bigshmow Bigshmow marked this pull request as draft April 15, 2026 16:25
@Bigshmow Bigshmow marked this pull request as ready for review April 15, 2026 17:08
Comment thread app/components/Views/SocialLeaderboard/TraderProfileView/TraderProfileView.tsx Outdated
Comment thread locales/languages/en.json Outdated
@joaosantos15 joaosantos15 force-pushed the TSA-408-hold-time-label-and-wiring branch from c78af96 to b1ee5e5 Compare April 16, 2026 09:02
@github-actions github-actions Bot added the risk-high Extensive testing required · High bug introduction risk label Apr 16, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 42.47%. Comparing base (7418947) to head (b1ee5e5).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main   #28873       +/-   ##
===========================================
- Coverage   82.28%   42.47%   -39.82%     
===========================================
  Files        5034     5038        +4     
  Lines      132095   132131       +36     
  Branches    29484    29506       +22     
===========================================
- Hits       108698    56117    -52581     
- Misses      16012    70768    +54756     
+ Partials     7385     5246     -2139     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@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 16, 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 16, 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 16, 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 16, 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 16, 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 16, 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 17, 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
12 value mismatches detected (expected — fixture represents an existing user).
View details

@xavier-brochard xavier-brochard added this pull request to the merge queue Apr 17, 2026
Merged via the queue into main with commit d267cfa Apr 17, 2026
179 of 182 checks passed
@xavier-brochard xavier-brochard deleted the TSA-408-hold-time-label-and-wiring branch April 17, 2026 09:26
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 17, 2026
@metamaskbotv2 metamaskbotv2 Bot added the release-7.75.0 Issue or pull request that will be included in release 7.75.0 label Apr 17, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.75.0 Issue or pull request that will be included in release 7.75.0 risk-high Extensive testing required · High bug introduction risk size-S team-portfolio team-social-ai Social & AI team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants