Skip to content

Conversation

@gambinish
Copy link
Contributor

@gambinish gambinish commented Jan 9, 2026

Description

Initializes perpsEnabledVersion feature flag selector to gate Perps features behind during development, which is version gated to v13.15.0 at the time of this PR.

Open in GitHub Codespaces

Changelog

CHANGELOG entry: Add perpsEnabledVersion feature flag

Related issues

Fixes:

Manual testing steps

  1. Go to Launch Darkly and toggle on/off perpsEnabled feature flag in main-dev environment
  2. Note that there is a ~15min cache window before the client will register the new flag
  3. You can bypass this by removing/reinstalling the extension after the flag has been toggled
  4. Ensure the version gate works, by downgrading your package.json to 13.14.0 (perps tab should not be visible in this case)

Currently this only gates the Perps tab from showing up as an initial PoC

Screenshots/Recordings

Screenshot 2026-01-09 at 2 11 49 PM

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

Adds infrastructure to gate Perps via remote feature flags with version checks and wires it into the UI.

  • New isPerpsFeatureEnabled helper (semver-based using app version) and PerpsFeatureFlag type; comprehensive unit tests
  • Selector getIsPerpsEnabled reads remoteFeatureFlags.perpsEnabledVersion; tests included
  • Account overview conditionally shows Perps tab when enabled
  • Updates enums/mappings: AccountOverviewTabKey.Perps, TraceName.AccountOverviewPerpsTab, MetaMetricsEventName.PerpsScreenOpened
  • Adds i18n string perps

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

@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

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-perps Perps team label Jan 9, 2026
@github-actions github-actions bot added the size-S label Jan 9, 2026
@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Jan 9, 2026

✨ Files requiring CODEOWNER review ✨

🔑 @MetaMask/accounts-engineers (1 files, +14 -0)
  • 📁 ui/
    • 📁 components/
      • 📁 multichain/
        • 📁 account-overview/
          • 📄 account-overview-tabs.tsx +14 -0

👨‍🔧 @MetaMask/core-extension-ux (1 files, +14 -0)
  • 📁 ui/
    • 📁 components/
      • 📁 multichain/
        • 📁 account-overview/
          • 📄 account-overview-tabs.tsx +14 -0

👨‍🔧 @MetaMask/perps (3 files, +152 -1)
  • 📁 ui/
    • 📁 selectors/
      • 📁 perps/
        • 📄 feature-flags.test.ts +135 -0
        • 📄 feature-flags.ts +16 -0
        • 📄 index.ts +1 -1

@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Jan 9, 2026

Builds ready [2e61495]
UI Startup Metrics (1264 ± 105 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup12641026156610513271447
load1051853134410011141225
domContentLoaded104684613379911071220
domInteractive2515104192182
firstPaint147631100115184298
backgroundConnect21319324910218236
firstReactRender1593551827
getState3617136144158
initialActions103112
loadScripts8396501131999021022
setupStore1274151322
numNetworkReqs181178171168
BrowserifyPower User HomeuiStartup19571715264820520732454
load1051922142211910901336
domContentLoaded1037917140912010751330
domInteractive38171583134125
firstPaint197691419185232336
backgroundConnect293203761150255645
firstReactRender22165852328
getState17513923421187228
initialActions104112
loadScripts82370011941158501117
setupStore19114981939
numNetworkReqs58371462461124
WebpackStandard HomeuiStartup809641115590856992
load65757387272710787
domContentLoaded65156986771703781
domInteractive2615108202287
firstPaint995924442117183
backgroundConnect2751213039102
firstReactRender15113331622
getState311460133955
initialActions105112
loadScripts64856786470700779
setupStore126113121135
numNetworkReqs181173171170
WebpackPower User HomeuiStartup13531041212823614381945
load7236231140101733928
domContentLoaded7136131133102725922
domInteractive39192023533129
firstPaint1396649282164318
backgroundConnect78867215922549
firstReactRender24183232630
getState16113736928165211
initialActions106112
loadScripts7106101124100723919
setupStore191051101744
numNetworkReqs59371722757138
FirefoxBrowserifyStandard HomeuiStartup14041132253521614721750
load1109945219315011411323
domContentLoaded1109945219315011381322
domInteractive74329009587144
firstPaint------
backgroundConnect6321115611955171
firstReactRender13103541322
getState126101101223
initialActions103122
loadScripts1080931207413811151258
setupStore14498151150
numNetworkReqs19981191376
BrowserifyPower User HomeuiStartup24611835454152424773958
load1216962252428611621951
domContentLoaded1216961252428611621951
domInteractive1173342692110396
firstPaint------
backgroundConnect109221199128124234
firstReactRender231578102535
getState318651228269518816
initialActions206123
loadScripts1166944236224011251832
setupStore1358633166168565
numNetworkReqs58291994746191
WebpackStandard HomeuiStartup15221294215917215821911
load12901082167811913671498
domContentLoaded12901082167811913671498
domInteractive75262073795133
firstPaint------
backgroundConnect52163294251139
firstReactRender14102831419
getState178169221540
initialActions102022
loadScripts12591063165411513281469
setupStore164106171256
numNetworkReqs19985201377
WebpackPower User HomeuiStartup28912164513879528284634
load16381225319759616973039
domContentLoaded16371225319759616963039
domInteractive12433100415999514
firstPaint------
backgroundConnect1772811692521461017
firstReactRender2615254252733
getState30978861240514796
initialActions203123
loadScripts15481204310150716082845
setupStore11911772166104570
numNetworkReqs56272014648187
📊 Page Load Benchmark Results

Current Commit: 2e61495 | Date: 1/9/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.03s (±68ms) 🟡 | historical mean value: 1.04s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 724ms (±65ms) 🟢 | historical mean value: 723ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 75ms (±12ms) 🟢 | historical mean value: 79ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.03s 68ms 1000ms 1.31s 1.27s 1.31s
domContentLoaded 724ms 65ms 693ms 989ms 946ms 989ms
firstPaint 75ms 12ms 56ms 184ms 84ms 184ms
firstContentfulPaint 75ms 12ms 56ms 184ms 84ms 184ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

@gambinish gambinish marked this pull request as ready for review January 9, 2026 23:16
@gambinish gambinish requested review from a team as code owners January 9, 2026 23:16
@gambinish gambinish changed the base branch from perps/docs to main January 13, 2026 01:16
@gambinish gambinish requested a review from a team as a code owner January 13, 2026 01:16
@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Jan 13, 2026

Builds ready [cb91c53]
UI Startup Metrics (1338 ± 113 ms)
PlatformBuildTypePageMetricTest Title (ms)Persona (ms)Mean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--13381079162311314121516
load--1116911137910411811264
domContentLoaded--1108905136910311721258
domInteractive--2816114212488
firstPaint--164661072117203326
backgroundConnect--22520828513228252
firstReactRender--17103151929
getState--371995134163
initialActions--105112
loadScripts--89268511611039571036
setupStore--1363551524
numNetworkReqs--181177171169
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--19001586259720620042395
load--1018907139311110211287
domContentLoaded--1005903136411210111278
domInteractive--33171352432101
firstPaint--181651378145228357
backgroundConnect--279200718136241635
firstReactRender--21172932327
getState--17513829030190236
initialActions--102112
loadScripts--79569411451088001063
setupStore--1796071736
numNetworkReqs--59401432462129
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--795647102882841980
load--64557087572686789
domContentLoaded--64056686871682783
domInteractive--2615112202285
firstPaint--1075934056143241
backgroundConnect--2951263146107
firstReactRender--15113241624
getState--3215167223762
initialActions--107112
loadScripts--63756385970680775
setupStore--1164261220
numNetworkReqs--171182171167
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--1377990197926015921919
load--687596107294699907
domContentLoaded--677589106795686902
domInteractive--36171773432132
firstPaint--1376842576193297
backgroundConnect--104761719027549
firstReactRender--22183232429
getState--16213475763162224
initialActions--102011
loadScripts--674587105893683893
setupStore--1584551720
numNetworkReqs--1004022946139202
19--------
FirefoxBrowserifyStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--14011105184716815251701
load--1119946145111611981346
domContentLoaded--1118946145011611981346
domInteractive--71322244093139
firstPaint--------
backgroundConnect--64193025392172
firstReactRender--12102421316
getState--166459451231
initialActions--102122
loadScripts--1079929137910211431273
setupStore--12470111036
numNetworkReqs--19979191373
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--25181757483262425034228
load--1249946276836712722364
domContentLoaded--1249945276836712722363
domInteractive--13032949134121444
firstPaint--------
backgroundConnect--133211129191115494
firstReactRender--22156662429
getState--27335812213394719
initialActions--217123
loadScripts--1193925274533611662227
setupStore--1566813218121708
numNetworkReqs--60292064077139
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--15381314201514716231876
load--12951111158610513581539
domContentLoaded--12951111158610513581539
domInteractive--802820939115140
firstPaint--------
backgroundConnect--52211673754140
firstReactRender--15114851625
getState--208257321758
initialActions--103122
loadScripts--1260109315649113201443
setupStore--184177261567
numNetworkReqs--19980191375
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--29112119533481632774629
load--16041173318252717383003
domContentLoaded--16031173318152717373003
domInteractive--11636639115106472
firstPaint--------
backgroundConnect--2362818753541671103
firstReactRender--23153452532
getState--27275890221362827
initialActions--2069723
loadScripts--14851151299440316042639
setupStore--1309728177111633
numNetworkReqs--60282004074172
19--------
📊 Page Load Benchmark Results

Current Commit: cb91c53 | Date: 1/13/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.05s (±39ms) 🟡 | historical mean value: 1.04s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 731ms (±37ms) 🟢 | historical mean value: 727ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 78ms (±13ms) 🟢 | historical mean value: 78ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.05s 39ms 1.02s 1.33s 1.07s 1.33s
domContentLoaded 731ms 37ms 707ms 999ms 750ms 999ms
firstPaint 78ms 13ms 60ms 196ms 88ms 196ms
firstContentfulPaint 78ms 13ms 60ms 196ms 88ms 196ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 153 Bytes (0%)
  • ui: 911 Bytes (0.01%)
  • common: -10 Bytes (0%)

@github-project-automation github-project-automation bot moved this to Needs dev review in PR review queue Jan 13, 2026
ameliejyc
ameliejyc previously approved these changes Jan 13, 2026
Copy link
Contributor

@aganglada aganglada left a comment

Choose a reason for hiding this comment

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

I would probably add a minimumVersion to the FF so we can keep shipping in main until we reach the release version

@github-project-automation github-project-automation bot moved this from Needs dev review to Needs more work from the author in PR review queue Jan 13, 2026
@gambinish
Copy link
Contributor Author

I would probably add a minimumVersion to the FF so we can keep shipping in main until we reach the release version

Good idea. Updated the code to read from the newly created perpsEnabledVersion ff, which is JSON and includes the version gate

@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Jan 13, 2026

Builds ready [4c5dbfe]
UI Startup Metrics (1261 ± 95 ms)
PlatformBuildTypePageMetricTest Title (ms)Persona (ms)Mean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--1261104315559513191409
load--105286612978911081186
domContentLoaded--104586412938811031182
domInteractive--2616106202287
firstPaint--193641142202187905
backgroundConnect--21319126312216241
firstReactRender--17103851927
getState--4019146194666
initialActions--103112
loadScripts--839664108185897961
setupStore--1254551322
numNetworkReqs--171178171172
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--19591665263220920352397
load--1044916138011710551330
domContentLoaded--1031905137511910441324
domInteractive--38192313335114
firstPaint--208721322162240388
backgroundConnect--269211755112241571
firstReactRender--22175142428
getState--196141800106195234
initialActions--103112
loadScripts--81569711581158191099
setupStore--18104881837
numNetworkReqs--59381432363122
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--792641100979843959
load--64757085471700775
domContentLoaded--64256684871693768
domInteractive--2515165222078
firstPaint--1066030252134213
backgroundConnect--2951313247102
firstReactRender--16107771723
getState--3015137163655
initialActions--102111
loadScripts--63856384570691766
setupStore--1154461221
numNetworkReqs--181176181172
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--1347998218726615021909
load--68359394392695905
domContentLoaded--67358893192681900
domInteractive--35171442733119
firstPaint--1386351381159278
backgroundConnect--80771218018617
firstReactRender--22183332429
getState--1628172762162230
initialActions--103111
loadScripts--67058692991679892
setupStore--1776091739
numNetworkReqs--933924349133227
19--------
FirefoxBrowserifyStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--13501071215318414531671
load--1085895182912611611280
domContentLoaded--1084890182912611611280
domInteractive--67311673991145
firstPaint--------
backgroundConnect--52192564654149
firstReactRender--12101821317
getState--146188221132
initialActions--103112
loadScripts--1054879179811511231203
setupStore--164203271143
numNetworkReqs--19978181371
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--24941709540160224684029
load--1267993270943112662608
domContentLoaded--1267993270943112662607
domInteractive--121361038128117340
firstPaint--------
backgroundConnect--122271384161125270
firstReactRender--22147072530
getState--31155914262506848
initialActions--207123
loadScripts--1223927261740912052450
setupStore--115768715698555
numNetworkReqs--58291543582131
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--15621227213819216651952
load--13101134167612813941598
domContentLoaded--13101134167612813941597
domInteractive--832824546107193
firstPaint--------
backgroundConnect--67192675383185
firstReactRender--14112631622
getState--177152201535
initialActions--103122
loadScripts--12701118160610413331462
setupStore--2251963614125
numNetworkReqs--19978191574
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--28962175501974228854669
load--16501201309355517682961
domContentLoaded--16501201308855417672961
domInteractive--130301033147108477
firstPaint--------
backgroundConnect--1902212012811591152
firstReactRender--24165262736
getState--349701748293509904
initialActions--217123
loadScripts--15271180307542216672745
setupStore--1011178015291554
numNetworkReqs--59222094166170
19--------
📊 Page Load Benchmark Results

Current Commit: 4c5dbfe | Date: 1/13/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.04s (±39ms) 🟡 | historical mean value: 1.04s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 726ms (±37ms) 🟢 | historical mean value: 727ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 77ms (±9ms) 🟢 | historical mean value: 78ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.04s 39ms 1.01s 1.31s 1.09s 1.31s
domContentLoaded 726ms 37ms 701ms 986ms 758ms 986ms
firstPaint 77ms 9ms 64ms 156ms 84ms 156ms
firstContentfulPaint 77ms 9ms 64ms 156ms 84ms 156ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 153 Bytes (0%)
  • ui: 1.61 KiB (0.02%)
  • common: -10 Bytes (0%)

Copy link
Member

@gantunesr gantunesr left a comment

Choose a reason for hiding this comment

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

Approved for Accounts CO,

  • account-overview-tabs.tsx

@github-project-automation github-project-automation bot moved this from Needs more work from the author to Review finalised - Ready to be merged in PR review queue Jan 13, 2026
@gambinish gambinish added this pull request to the merge queue Jan 13, 2026
Merged via the queue into main with commit b70cd4a Jan 13, 2026
187 checks passed
@gambinish gambinish deleted the perps/feature-flag branch January 13, 2026 19:46
@github-project-automation github-project-automation bot moved this from Review finalised - Ready to be merged to Merged, Closed or Archived in PR review queue Jan 13, 2026
@github-actions github-actions bot locked and limited conversation to collaborators Jan 13, 2026
@metamaskbot metamaskbot added the release-13.15.0 Issue or pull request that will be included in release 13.15.0 label Jan 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-13.15.0 Issue or pull request that will be included in release 13.15.0 size-M team-perps Perps team

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

7 participants