Skip to content

chore: add remote feature flag for multichain accounts #33112

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
May 29, 2025

Conversation

gantunesr
Copy link
Member

@gantunesr gantunesr commented May 21, 2025

Description

Open in GitHub Codespaces

Add remote feature flag for multichain accounts. The feature flag structure is,

{
  enabled: boolean;
  featureVersion: string;
  minimumVersion: string;
};

Related issues

Fixes: None

Manual testing steps

Not applicable

Screenshots/Recordings

applicable

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.

@gantunesr gantunesr marked this pull request as ready for review May 21, 2025 21:43
@metamaskbot
Copy link
Collaborator

Builds ready [b1e466e]
UI Startup Metrics (1217 ± 65 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1217108013676512651319
load105292611976610991158
domContentLoaded104491811916710931149
domInteractive16132731624
firstPaint83078119837710931159
backgroundConnect94316825
firstReactRender19144151932
getState1555992030
initialActions001001
loadScripts80466795166851909
setupStore85273812
WebpackHomeuiStartup20751669255518921952453
load16231309200914216901893
domContentLoaded16171305200514116861881
domInteractive15115381242
firstPaint1646446973194324
backgroundConnect2096282436
firstReactRender1074133585117317
getState134291281218
initialActions612922935
loadScripts16141303200413916851878
setupStore4363048619301
FirefoxBrowserifyHomeuiStartup13011125182213413311606
load1153994166811712011374
domContentLoaded1152994166711712001373
domInteractive90412492795135
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect201289102041
firstReactRender23205442330
getState11422929810
initialActions001001
loadScripts1135981165511511851352
setupStore73587614
WebpackHomeuiStartup16251369218317917421979
load14121172197116815301766
domContentLoaded14111172197116815301765
domInteractive79401521686116
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect23147582437
firstReactRender39275964250
getState95325922
initialActions002111
loadScripts13921158194316715121739
setupStore1057411932
cc: @HowardBraham
Benchmark value 831 exceeds gate value 800 for chrome browserify home mean firstPaint
Benchmark value 25 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 44 exceeds gate value 32 for chrome webpack home mean setupStore
Benchmark value 301 exceeds gate value 65 for chrome webpack home p95 setupStore
Benchmark value 12 exceeds gate value 11 for firefox browserify home mean getState
Benchmark value 1625 exceeds gate value 1615 for firefox webpack home mean uiStartup
Benchmark value 1412 exceeds gate value 1380 for firefox webpack home mean load
Benchmark value 1412 exceeds gate value 1380 for firefox webpack home mean domContentLoaded
Benchmark value 39 exceeds gate value 38 for firefox webpack home mean firstReactRender
Benchmark value 1392 exceeds gate value 1360 for firefox webpack home mean loadScripts
Benchmark value 1979 exceeds gate value 1935 for firefox webpack home p95 uiStartup
Benchmark value 1766 exceeds gate value 1660 for firefox webpack home p95 load
Benchmark value 1765 exceeds gate value 1660 for firefox webpack home p95 domContentLoaded
Benchmark value 1739 exceeds gate value 1630 for firefox webpack home p95 loadScripts
Benchmark value 32 exceeds gate value 28 for firefox webpack home p95 setupStore
Sum of mean exceeds: 151ms | Sum of p95 exceeds: 611ms
Sum of all benchmark exceeds: 762ms

Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0%)
  • ui: 0 Bytes (0%)
  • common: 1.68 KiB (0.02%)

@metamaskbot
Copy link
Collaborator

Builds ready [ee8a2c1]
UI Startup Metrics (1216 ± 81 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1216108816168112601349
load105191413657811001181
domContentLoaded104391013587910951176
domInteractive15134231622
firstPaint757147136440410591175
backgroundConnect94375923
firstReactRender21144062137
getState1454181934
initialActions001000
loadScripts803681110677857938
setupStore85565814
WebpackHomeuiStartup20881669252421522492429
load16211315193715417191861
domContentLoaded16151311192615217141852
domInteractive14114271239
firstPaint1646655169196305
backgroundConnect22124972637
firstReactRender14442369106274344
getState144309301426
initialActions318134
loadScripts16121310191615117121841
setupStore3263056518269
FirefoxBrowserifyHomeuiStartup13191146215816013491645
load11651020165912912091442
domContentLoaded11651019165812912091442
domInteractive993866867102159
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect20136782131
firstReactRender25205982451
getState11525527818
initialActions001001
loadScripts11471003163412611891423
setupStore8417917611
WebpackHomeuiStartup15301324211115216201849
load13281134187414414201619
domContentLoaded13281134187414414201619
domInteractive76591241380109
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2214118122136
firstReactRender37274844046
getState10516919819
initialActions001011
loadScripts13091118185814114001574
setupStore85354811
Benchmark value 23 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 34 exceeds gate value 33 for chrome browserify home p95 getState
Benchmark value 33 exceeds gate value 32 for chrome webpack home mean setupStore
Benchmark value 269 exceeds gate value 65 for chrome webpack home p95 setupStore
Benchmark value 12 exceeds gate value 11 for firefox browserify home mean getState
Sum of mean exceeds: 2ms | Sum of p95 exceeds: 210ms
Sum of all benchmark exceeds: 212ms

Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0%)
  • ui: 0 Bytes (0%)
  • common: 1.68 KiB (0.02%)

@shane-t shane-t self-requested a review May 22, 2025 10:04
shane-t
shane-t previously approved these changes May 22, 2025
owencraston
owencraston previously approved these changes May 22, 2025
montelaidev
montelaidev previously approved these changes May 22, 2025
@metamaskbot
Copy link
Collaborator

Builds ready [7701868]
UI Startup Metrics (1207 ± 66 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1207108814166612551301
load104393111845910871146
domContentLoaded103791911796010821139
domInteractive16133451530
firstPaint66679119242710611131
backgroundConnect74274818
firstReactRender21144462136
getState1564582129
initialActions001000
loadScripts79968993157838896
setupStore85263813
WebpackHomeuiStartup21151686269724022722467
load16391316211518117721888
domContentLoaded16331312210718017651879
domInteractive161161101344
firstPaint1756933858215291
backgroundConnect2613342332748
firstReactRender14243363107277331
getState154338331425
initialActions512532535
loadScripts16291311209617917621876
setupStore3673187219301
FirefoxBrowserifyHomeuiStartup13601175179011714141577
load12071050163611712881436
domContentLoaded12071050163511712871436
domInteractive1023833042114172
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2213218212130
firstReactRender24215562429
getState84374810
initialActions001001
loadScripts11891035156411412721420
setupStore74818611
WebpackHomeuiStartup15361338213814716181831
load13261149191014014121594
domContentLoaded13251148191014014111594
domInteractive79303443285121
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2416218212339
firstReactRender39284854247
getState95325923
initialActions002111
loadScripts13041133189413813821574
setupStore13523831814
Benchmark value 36 exceeds gate value 32 for chrome webpack home mean setupStore
Benchmark value 2467 exceeds gate value 2454 for chrome webpack home p95 uiStartup
Benchmark value 301 exceeds gate value 65 for chrome webpack home p95 setupStore
Benchmark value 39 exceeds gate value 38 for firefox webpack home mean firstReactRender
Sum of mean exceeds: 5ms | Sum of p95 exceeds: 249ms
Sum of all benchmark exceeds: 254ms

Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0%)
  • ui: 0 Bytes (0%)
  • common: 1.68 KiB (0.02%)

@gantunesr gantunesr dismissed stale reviews from shane-t, owencraston, and montelaidev via 8021ab9 May 23, 2025 20:15
@gantunesr gantunesr requested a review from a team as a code owner May 23, 2025 20:15
@metamaskbot
Copy link
Collaborator

metamaskbot commented May 23, 2025

✨ Files requiring CODEOWNER review ✨

🔑 @MetaMask/accounts-engineers (3 files, +209 -0)
  • 📁 ui/
    • 📁 selectors/
      • 📁 multichain-accounts/
        • 📄 feature-flags.test.ts +93 -0
        • 📄 feature-flags.ts +115 -0
        • 📄 index.ts +1 -0

@metamaskbot
Copy link
Collaborator

Builds ready [1beaf8c]
UI Startup Metrics (1230 ± 66 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1230109714376612711352
load105995312816210951157
domContentLoaded105294212716310911152
domInteractive16134241626
firstPaint68072117442710641135
backgroundConnect94285823
firstReactRender20163332127
getState1454282030
initialActions001001
loadScripts809703101861846921
setupStore85122811
WebpackHomeuiStartup21411691253219522702469
load16561325190814117601876
domContentLoaded16501322189914017501866
domInteractive161056101343
firstPaint1706235669210316
backgroundConnect23135382741
firstReactRender15542357111287341
getState144234231426
initialActions317135
loadScripts16471320188813917481856
setupStore4363368619301
FirefoxBrowserifyHomeuiStartup13031126174412413531577
load11511006157110912101386
domContentLoaded11511006157110912091386
domInteractive953927234104155
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect20126192040
firstReactRender23205552429
getState12418225829
initialActions001001
loadScripts1133993155010811931365
setupStore8417517620
WebpackHomeuiStartup15321329213715516231876
load13211147172813314191565
domContentLoaded13211147172813314191565
domInteractive77541491583105
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect21154552332
firstReactRender38275554145
getState164376451029
initialActions102111
loadScripts13021132171113313981546
setupStore10524824822
Benchmark value 23 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 44 exceeds gate value 32 for chrome webpack home mean setupStore
Benchmark value 2469 exceeds gate value 2454 for chrome webpack home p95 uiStartup
Benchmark value 301 exceeds gate value 65 for chrome webpack home p95 setupStore
Benchmark value 12 exceeds gate value 11 for firefox browserify home mean getState
Benchmark value 29 exceeds gate value 24 for firefox browserify home p95 getState
Benchmark value 39 exceeds gate value 38 for firefox webpack home mean firstReactRender
Benchmark value 16 exceeds gate value 15 for firefox webpack home mean getState
Sum of mean exceeds: 15ms | Sum of p95 exceeds: 261ms
Sum of all benchmark exceeds: 276ms

Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0%)
  • ui: 85 Bytes (0%)
  • common: 1.43 KiB (0.02%)

@metamaskbot
Copy link
Collaborator

Builds ready [df0fc64]
UI Startup Metrics (1221 ± 68 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1221109413916812701348
load105294312256210971161
domContentLoaded104593812186210891150
domInteractive16133141728
firstPaint75987116841510831152
backgroundConnect84305824
firstReactRender20153842030
getState1462972127
initialActions001001
loadScripts80569797661848906
setupStore85414813
WebpackHomeuiStartup21461694262821222892515
load16581254199516117631917
domContentLoaded16521246198016017561908
domInteractive161162111347
firstPaint1666232861220268
backgroundConnect241085102838
firstReactRender15744357107290340
getState255341631555
initialActions318145
loadScripts16481241196915817531897
setupStore287301562051
FirefoxBrowserifyHomeuiStartup12971121174612713381570
load1150997160412211991410
domContentLoaded1149997160412211991410
domInteractive973741144104151
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect19125062033
firstReactRender24205672345
getState9416616814
initialActions001001
loadScripts1133984158912111831393
setupStore64345612
WebpackHomeuiStartup15141323196313015941829
load13081146171212213851535
domContentLoaded13071145171212213851534
domInteractive84563133589132
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2515243242354
firstReactRender38265254144
getState94305924
initialActions102111
loadScripts12861125169212113551508
setupStore10523022817
Benchmark value 25 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 2515 exceeds gate value 2454 for chrome webpack home p95 uiStartup
Benchmark value 54 exceeds gate value 49 for firefox webpack home p95 backgroundConnect
Sum of mean exceeds: 0ms | Sum of p95 exceeds: 73ms
Sum of all benchmark exceeds: 73ms

Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 264 Bytes (0%)
  • ui: -219 Bytes (0%)
  • common: 5.48 KiB (0.07%)

@metamaskbot
Copy link
Collaborator

Builds ready [5eb39a3]
UI Startup Metrics (1222 ± 74 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1222107713787412711366
load105792312247211091177
domContentLoaded105091812227311041169
domInteractive16133741629
firstPaint790128121739510861162
backgroundConnect94325921
firstReactRender21164552134
getState1452972025
initialActions001000
loadScripts81068698472857924
setupStore85232812
WebpackHomeuiStartup21421708260719822852422
load16511317196114217501879
domContentLoaded16451314195114117441872
domInteractive161154101342
firstPaint1656332361222274
backgroundConnect23104682839
firstReactRender15344352109280335
getState144328321422
initialActions612882835
loadScripts16411309194014017411868
setupStore3963347820305
FirefoxBrowserifyHomeuiStartup13021120180015213131735
load1148978165013911651580
domContentLoaded1148977165013911651580
domInteractive983518829108163
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect21127292336
firstReactRender24195772348
getState10419120826
initialActions001001
loadScripts1130964163313711501555
setupStore64323612
WebpackHomeuiStartup15181350202513416161763
load13171163178013214071539
domContentLoaded13171163177913214071539
domInteractive75341461681112
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect21154952235
firstReactRender40285454347
getState84293912
initialActions002111
loadScripts12981146175813113881523
setupStore85617815
Benchmark value 1367 exceeds gate value 1365 for chrome browserify home p95 uiStartup
Benchmark value 21 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 40 exceeds gate value 32 for chrome webpack home mean setupStore
Benchmark value 305 exceeds gate value 65 for chrome webpack home p95 setupStore
Benchmark value 1735 exceeds gate value 1660 for firefox browserify home p95 uiStartup
Benchmark value 1580 exceeds gate value 1495 for firefox browserify home p95 load
Benchmark value 1580 exceeds gate value 1495 for firefox browserify home p95 domContentLoaded
Benchmark value 26 exceeds gate value 24 for firefox browserify home p95 getState
Benchmark value 1555 exceeds gate value 1475 for firefox browserify home p95 loadScripts
Benchmark value 41 exceeds gate value 38 for firefox webpack home mean firstReactRender
Sum of mean exceeds: 11ms | Sum of p95 exceeds: 572ms
Sum of all benchmark exceeds: 583ms

Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 4.64 KiB (0.09%)
  • ui: 344 Bytes (0%)
  • common: 44.89 KiB (0.55%)

@metamaskbot
Copy link
Collaborator

Builds ready [44e143c]
UI Startup Metrics (1213 ± 76 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1213105914037612621362
load105292912597111051172
domContentLoaded104592112497110991164
domInteractive16134851628
firstPaint72572125741910631159
backgroundConnect84325822
firstReactRender20164142029
getState1463271927
initialActions001001
loadScripts806686100270856920
setupStore75182811
WebpackHomeuiStartup21191723259320522502469
load16341345197515517391896
domContentLoaded16281341196815417331885
domInteractive161168101342
firstPaint1636432255203271
backgroundConnect2510334322639
firstReactRender13843358105217338
getState214347541539
initialActions3112135
loadScripts16251339195715217311874
setupStore3873167718304
FirefoxBrowserifyHomeuiStartup13121125200313313631553
load1165995157311612081392
domContentLoaded1164994157311612081392
domInteractive1014128833105173
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2212208212244
firstReactRender23206062328
getState9421821810
initialActions001001
loadScripts1146982154111511901370
setupStore6436369
WebpackHomeuiStartup15141329208913715931802
load13061160175511913621550
domContentLoaded13051160175411913621549
domInteractive77321431883116
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2314234232141
firstReactRender40285344347
getState12521622931
initialActions002111
loadScripts12861146171611213441523
setupStore10521221815
Benchmark value 23 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 38 exceeds gate value 32 for chrome webpack home mean setupStore
Benchmark value 2470 exceeds gate value 2454 for chrome webpack home p95 uiStartup
Benchmark value 304 exceeds gate value 65 for chrome webpack home p95 setupStore
Benchmark value 41 exceeds gate value 38 for firefox webpack home mean firstReactRender
Sum of mean exceeds: 9ms | Sum of p95 exceeds: 260ms
Sum of all benchmark exceeds: 269ms

Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 4.76 KiB (0.09%)
  • ui: 350 Bytes (0%)
  • common: 44.75 KiB (0.55%)

@metamaskbot
Copy link
Collaborator

Builds ready [2adc168]
UI Startup Metrics (1204 ± 62 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1204107713886212401322
load104393412075910741165
domContentLoaded103592611935910691153
domInteractive16133441628
firstPaint72586120341210491129
backgroundConnect84335823
firstReactRender21155062039
getState1454982033
initialActions001001
loadScripts79769195458831909
setupStore85253912
WebpackHomeuiStartup22261766263821023762552
load17191373219716118351959
domContentLoaded17121369219116018291949
domInteractive161265111444
firstPaint1696240566200298
backgroundConnect319242333267
firstReactRender15545363107291336
getState274340601757
initialActions318146
loadScripts17091367218915918261938
setupStore4273087824306
FirefoxBrowserifyHomeuiStartup13591165188214314191705
load11961034159512012621458
domContentLoaded11961034159512012621458
domInteractive1063767772114182
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2214108122246
firstReactRender26216692454
getState11526126928
initialActions001001
loadScripts11761020157411712401435
setupStore8417016712
WebpackHomeuiStartup15591322218916616231908
load13481149176414414411645
domContentLoaded13481149176314414411645
domInteractive79372142284122
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2515245292340
firstReactRender40285244348
getState12524425932
initialActions001011
loadScripts13251134173613714211620
setupStore95687820
Benchmark value 24 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 2226 exceeds gate value 2192 for chrome webpack home mean uiStartup
Benchmark value 1720 exceeds gate value 1711 for chrome webpack home mean load
Benchmark value 1713 exceeds gate value 1704 for chrome webpack home mean domContentLoaded
Benchmark value 1709 exceeds gate value 1699 for chrome webpack home mean loadScripts
Benchmark value 43 exceeds gate value 32 for chrome webpack home mean setupStore
Benchmark value 2552 exceeds gate value 2454 for chrome webpack home p95 uiStartup
Benchmark value 306 exceeds gate value 65 for chrome webpack home p95 setupStore
Benchmark value 26 exceeds gate value 25 for firefox browserify home mean firstReactRender
Benchmark value 12 exceeds gate value 11 for firefox browserify home mean getState
Benchmark value 1705 exceeds gate value 1660 for firefox browserify home p95 uiStartup
Benchmark value 28 exceeds gate value 24 for firefox browserify home p95 getState
Benchmark value 41 exceeds gate value 38 for firefox webpack home mean firstReactRender
Sum of mean exceeds: 78ms | Sum of p95 exceeds: 394ms
Sum of all benchmark exceeds: 472ms

Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 4.38 KiB (0.08%)
  • ui: 4.01 KiB (0.06%)
  • common: 50.11 KiB (0.62%)

@gantunesr gantunesr added this pull request to the merge queue May 29, 2025
Merged via the queue into main with commit 99e5d3b May 29, 2025
156 checks passed
@gantunesr gantunesr deleted the gar/chore/multichain-accounts-ff branch May 29, 2025 11:51
@github-actions github-actions bot locked and limited conversation to collaborators May 29, 2025
@metamaskbot metamaskbot added the release-12.21.0 Issue or pull request that will be included in release 12.21.0 label May 29, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.21.0 Issue or pull request that will be included in release 12.21.0 team-accounts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants