Skip to content

Conversation

@FrederikBolding
Copy link
Member

@FrederikBolding FrederikBolding commented Nov 21, 2025

Description

This PR replaces ReadOnlyNetworkStore with FixtureExtensionStore. This new class extends ExtensionStore while still seeding the initial state using the fixture server. This effectively means that all E2Es leverage the real browser storage APIs instead of an in-memory store, bringing us closer to testing actual production builds.

Due to this change in behavior, the errors-before-init-opt-in-ui-state.json snapshot had to be updated as well. The snapshot is now more realistic as it contains the initialized background state, instead of just the fixture data.

Open in GitHub Codespaces

Changelog

CHANGELOG entry: null

Related issues

Fixes:


Note

Replace ReadOnlyNetworkStore with FixtureExtensionStore (seeds from fixture server but uses real extension storage) and update tests and state snapshots accordingly.

  • Storage/Test Infra:
    • Introduce FixtureExtensionStore extending ExtensionStore, initializing from http://localhost:12345/state.json and persisting via real browser storage; supports async get/set/reset.
    • Use FixtureExtensionStore in test builds in app/scripts/background.js and lib/setup-initial-state-hooks.js via PersistenceManager.
  • Tests:
    • Add fixture-extension-store.test.ts (mocks webextension-polyfill, verifies network seeding and storage behavior).
    • Update persistence-manager.test.ts to rely on ExtensionStore mock (remove read-only store mock).
    • Adjust E2E errors.spec.ts: remove debug logs, add waits for state settle, and tweak Sentry assertions.
    • Refresh snapshot errors-before-init-opt-in-ui-state.json to reflect initialized background state and new schema/version.
  • Sentry/State Hooks:
    • Sentry persisted state now read via PersistenceManager with FixtureExtensionStore in tests; add cleanup of most recent state during app-state acquisition.

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

@metamaskbot metamaskbot added the team-core-platform Core Platform team label Nov 21, 2025
@metamaskbot
Copy link
Collaborator

Builds ready [5c78682]
UI Startup Metrics (1256 ± 87 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup1256107614628713201421
load103690612497910881183
domContentLoaded102890312367810801175
domInteractive241486172176
firstPaint56890125841710281172
backgroundConnect22119934819226253
firstReactRender3120125133355
getState3816128174378
initialActions1013213
loadScripts816698100577866957
setupStore1362951524
numNetworkReqs1257821573
BrowserifyPower User HomeuiStartup20531728259521921872468
load1022866148013110261402
domContentLoaded1007861147113010071385
domInteractive35161793629147
firstPaint5359314874099571398
backgroundConnect247202759105231529
firstReactRender864713318100115
getState19912872892208290
initialActions103112
loadScripts80266212741308061184
setupStore1885292336
numNetworkReqs90652033096178
WebpackStandard HomeuiStartup815734101270841978
load61155681462614784
domContentLoaded60755180461610777
domInteractive2414102192078
firstPaint219101809153195591
backgroundConnect1263281530
firstReactRender29214353237
getState291362113846
initialActions103112
loadScripts60454979459608766
setupStore1263951423
numNetworkReqs1257720571
WebpackPower User HomeuiStartup16791308242924918822119
load70558611851207191031
domContentLoaded69358111771207041020
domInteractive37171603233130
firstPaint334921067243425873
backgroundConnect64762913026493
firstReactRender86481231699110
getState18913171660198248
initialActions104112
loadScripts69057911681187021011
setupStore23981142852
numNetworkReqs1386729654176290
FirefoxBrowserifyStandard HomeuiStartup13381092177715014231630
load1093927149011411641330
domContentLoaded1092927149011411621330
domInteractive67301733688142
firstPaint------
backgroundConnect47212103543136
firstReactRender22183642333
getState1075861020
initialActions103112
loadScripts1064910146310411191300
setupStore125114131129
numNetworkReqs1156314653
BrowserifyPower User HomeuiStartup30741961589377035364496
load1363960290849414202620
domContentLoaded1362960290849414202620
domInteractive173311665237167660
firstPaint------
backgroundConnect2622212832923511045
firstReactRender92492523495181
getState24289998226211910
initialActions2033326
loadScripts1285941266141613712499
setupStore1586810221152766
numNetworkReqs90522154283206
WebpackStandard HomeuiStartup15121306212114815751855
load1257109515729913141468
domContentLoaded1257109515719913141467
domInteractive723023946100181
firstPaint------
backgroundConnect46191903045107
firstReactRender27206462936
getState176187271380
initialActions102122
loadScripts1230107814909112881439
setupStore146119141141
numNetworkReqs1256717662
WebpackPower User HomeuiStartup35082393800590241155188
load16881156617467917422809
domContentLoaded16881156617467917422809
domInteractive2523041244821761027
firstPaint------
backgroundConnect208261028218236708
firstReactRender101434765798232
getState292941788315260957
initialActions401031226
loadScripts16331124614866416782697
setupStore1906825234201771
numNetworkReqs90542214584211
📊 Page Load Benchmark Results

Current Commit: 5c78682 | Date: 11/21/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.06s (±38ms) 🟡 | historical mean value: 1.04s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 743ms (±36ms) 🟢 | historical mean value: 728ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 80ms (±12ms) 🟢 | historical mean value: 78ms ⬆️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.06s 38ms 1.04s 1.32s 1.09s 1.32s
domContentLoaded 743ms 36ms 719ms 985ms 762ms 985ms
firstPaint 80ms 12ms 68ms 188ms 88ms 188ms
firstContentfulPaint 80ms 12ms 68ms 188ms 88ms 188ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 70 Bytes (0%)
  • ui: 40.38 KiB (0.58%)
  • common: 199 Bytes (0%)

@github-actions github-actions bot added size-M and removed size-S labels Nov 21, 2025
@FrederikBolding FrederikBolding changed the title wip: Use real storage in E2E test: Use real storage in E2E Nov 21, 2025
@metamaskbot
Copy link
Collaborator

Builds ready [ba18647]
UI Startup Metrics (1339 ± 117 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup13391123183411714121530
load1101898149610211681261
domContentLoaded1093893148910311621254
domInteractive2714117212284
firstPaint60496151344310871267
backgroundConnect23620533321242280
firstReactRender341974114157
getState4216176235190
initialActions108124
loadScripts86768912281029371035
setupStore1474061631
numNetworkReqs1257820572
BrowserifyPower User HomeuiStartup------
load------
domContentLoaded------
domInteractive------
firstPaint------
backgroundConnect------
firstReactRender------
getState------
initialActions------
loadScripts------
setupStore------
numNetworkReqs------
WebpackStandard HomeuiStartup820732104976841994
load61656182261631788
domContentLoaded61155881260626781
domInteractive2414101182179
firstPaint21474765134216595
backgroundConnect1163161326
firstReactRender30197693441
getState291559103749
initialActions103112
loadScripts60855680258624769
setupStore1253751422
numNetworkReqs1257620571
WebpackPower User HomeuiStartup18141409267726320052277
load71860113091357311075
domContentLoaded70759012951347161064
domInteractive39172133933152
firstPaint281931309217258784
backgroundConnect1409643213123568
firstReactRender925215719103127
getState18713169862201273
initialActions103112
loadScripts70458812841327141055
setupStore22958122449
numNetworkReqs1326429558168279
FirefoxBrowserifyStandard HomeuiStartup13191078187616914261697
load1080918149512611471364
domContentLoaded1079917149512611471363
domInteractive71282864692141
firstPaint------
backgroundConnect51221643363126
firstReactRender22185352333
getState126189191124
initialActions103122
loadScripts1050902143511811161344
setupStore136206221033
numNetworkReqs1156615657
BrowserifyPower User HomeuiStartup30361764484076336974509
load1361930271250714672530
domContentLoaded1361930271150714662530
domInteractive207311059268196992
firstPaint------
backgroundConnect284191180327437953
firstReactRender91363534097161
getState24288937214226901
initialActions208122
loadScripts1319915251448614452421
setupStore1225774180141749
numNetworkReqs91552124483203
WebpackStandard HomeuiStartup15321296194713516171823
load12691083161910213231487
domContentLoaded12681083161910213231487
domInteractive68271944088144
firstPaint------
backgroundConnect4819129255497
firstReactRender292081113060
getState137150151325
initialActions103112
loadScripts1244106715929713001433
setupStore136119171133
numNetworkReqs1156816659
WebpackPower User HomeuiStartup33932109528280941224861
load16401111331154717702873
domContentLoaded16401111331054717702873
domInteractive14230984164145448
firstPaint------
backgroundConnect2622612483072431091
firstReactRender944130638100148
getState294681192284286923
initialActions501031427
loadScripts15371084312547216552688
setupStore1726818220175767
numNetworkReqs90582194383200
📊 Page Load Benchmark Results

Current Commit: ba18647 | Date: 11/21/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.02s (±38ms) 🟡 | historical mean value: 1.04s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 712ms (±35ms) 🟢 | historical mean value: 727ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 75ms (±13ms) 🟢 | historical mean value: 79ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.02s 38ms 995ms 1.30s 1.05s 1.30s
domContentLoaded 712ms 35ms 686ms 977ms 736ms 977ms
firstPaint 75ms 13ms 56ms 184ms 88ms 184ms
firstContentfulPaint 75ms 13ms 56ms 184ms 88ms 184ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 70 Bytes (0%)
  • ui: 40.37 KiB (0.58%)
  • common: 199 Bytes (0%)

@metamaskbot
Copy link
Collaborator

Builds ready [192b4d9]
UI Startup Metrics (1269 ± 108 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup12691079169810813201425
load104790213979911231192
domContentLoaded103989913929911091183
domInteractive241491172074
firstPaint64984139642410471181
backgroundConnect22019829515229243
firstReactRender311968103749
getState3916137184275
initialActions109112
loadScripts827677115297901983
setupStore1265471228
numNetworkReqs1257520572
BrowserifyPower User HomeuiStartup21851796291023723392605
load1038881164315110431461
domContentLoaded1024875162915110261448
domInteractive36161793530144
firstPaint55610716363969571184
backgroundConnect273206786125241578
firstReactRender924515323103136
getState224132843123236650
initialActions104112
loadScripts81467314191518151229
setupStore20105392539
numNetworkReqs1316530155165286
WebpackStandard HomeuiStartup79971799565820965
load60255179959612766
domContentLoaded59854779358608756
domInteractive231392172074
firstPaint23079776165214618
backgroundConnect1153971426
firstReactRender27194053134
getState301370113650
initialActions102112
loadScripts59554477956606747
setupStore1263851422
numNetworkReqs1257619570
WebpackPower User HomeuiStartup17391331244526819842156
load70658911241267151040
domContentLoaded69558411141257021032
domInteractive36161883730155
firstPaint2951031135219288859
backgroundConnect92770617839571
firstReactRender895413217101119
getState19012971579198259
initialActions103012
loadScripts69258110921237001022
setupStore221055132953
numNetworkReqs1406529955176285
FirefoxBrowserifyStandard HomeuiStartup12381031164714113131588
load1025878142010310741249
domContentLoaded1024878142010410701248
domInteractive59281753582131
firstPaint------
backgroundConnect42202473041101
firstReactRender21175362233
getState126129171028
initialActions102112
loadScripts100086113449210471188
setupStore14520824933
numNetworkReqs1155513650
BrowserifyPower User HomeuiStartup32162157574374936454647
load1387964288748614882634
domContentLoaded1386964288648514882625
domInteractive16732983187156619
firstPaint------
backgroundConnect3173014023554991129
firstReactRender96413244399205
getState302931117278268925
initialActions3062623
loadScripts1283930266337214472353
setupStore15781132221143720
numNetworkReqs90602024183194
WebpackStandard HomeuiStartup16411322199916117371973
load13311142167710213851529
domContentLoaded13311141167710213841529
domInteractive802722942101163
firstPaint------
backgroundConnect56211783472137
firstReactRender312183103245
getState207209331560
initialActions103122
loadScripts1298112216509913501497
setupStore196149251483
numNetworkReqs1257117765
WebpackPower User HomeuiStartup32792268469764038814504
load15491189272038517062404
domContentLoaded15481188272038617062403
domInteractive162301020196151535
firstPaint------
backgroundConnect237261354261258925
firstReactRender89372163393157
getState297831727304327859
initialActions501081338
loadScripts14821115269135116382304
setupStore13161079211127742
numNetworkReqs91552184582206
📊 Page Load Benchmark Results

Current Commit: 192b4d9 | Date: 11/21/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.03s (±38ms) 🟡 | historical mean value: 1.04s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 719ms (±37ms) 🟢 | historical mean value: 727ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 76ms (±9ms) 🟢 | historical mean value: 79ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.03s 38ms 1.00s 1.31s 1.07s 1.31s
domContentLoaded 719ms 37ms 695ms 992ms 757ms 992ms
firstPaint 76ms 9ms 64ms 148ms 84ms 148ms
firstContentfulPaint 76ms 9ms 64ms 148ms 84ms 148ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 70 Bytes (0%)
  • ui: 40.37 KiB (0.58%)
  • common: 199 Bytes (0%)

@metamaskbot
Copy link
Collaborator

Builds ready [e8cc962]
UI Startup Metrics (1254 ± 108 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup12541059164010813231464
load104789513099411151223
domContentLoaded104089212959211081202
domInteractive241488172172
firstPaint59279129742810541177
backgroundConnect21719329618223252
firstReactRender301978113255
getState3616146184069
initialActions104112
loadScripts831694103888901989
setupStore1274251323
numNetworkReqs1257721575
BrowserifyPower User HomeuiStartup20071618277121720872539
load993835181016710011435
domContentLoaded97882717761669781425
domInteractive36152423930133
firstPaint7279918143989701336
backgroundConnect237176758109210533
firstReactRender85441381998114
getState20313268985214291
initialActions106112
loadScripts79265315521627891233
setupStore1766092135
numNetworkReqs89642013295179
WebpackStandard HomeuiStartup820734104375838993
load61455979860623782
domContentLoaded61055479160619775
domInteractive2415102182173
firstPaint21777796155209612
backgroundConnect1253281528
firstReactRender30208693339
getState291360103546
initialActions103111
loadScripts60755278358617765
setupStore1262741419
numNetworkReqs1257620570
WebpackPower User HomeuiStartup17111271242825119592119
load69559413611267021023
domContentLoaded68458613281256931015
domInteractive35161733530142
firstPaint3161031040231372847
backgroundConnect88863216730549
firstReactRender885213618101122
getState198136735105195261
initialActions106113
loadScripts68258413191236911007
setupStore24869153556
numNetworkReqs1406530655180265
FirefoxBrowserifyStandard HomeuiStartup12871060201516013731589
load1053911140310511041284
domContentLoaded1052907140310611031282
domInteractive59281873682144
firstPaint------
backgroundConnect44191903341113
firstReactRender22174862235
getState116689923
initialActions102122
loadScripts102889413759710791257
setupStore126179181033
numNetworkReqs1157115659
BrowserifyPower User HomeuiStartup30771979628376335684453
load1323911415749914192362
domContentLoaded1322910415749914182362
domInteractive17233999203172600
firstPaint------
backgroundConnect282251386332409975
firstReactRender92493493998179
getState26084957241228890
initialActions218123
loadScripts1265892396246212872267
setupStore19072027300202787
numNetworkReqs91582094483204
WebpackStandard HomeuiStartup14791265210414515551809
load1226106314969912921414
domContentLoaded1226105814969912921413
domInteractive58251873381129
firstPaint------
backgroundConnect46182023143135
firstReactRender27207882940
getState136196211123
initialActions102122
loadScripts1200103914799312671372
setupStore156158221156
numNetworkReqs1256917662
WebpackPower User HomeuiStartup33952259559078238694928
load16781141352556418892941
domContentLoaded16781141352456418882941
domInteractive141311058150154465
firstPaint------
backgroundConnect242251072252316923
firstReactRender90403944494120
getState276891137259254896
initialActions3038527
loadScripts16121124334652218042752
setupStore1486811215152767
numNetworkReqs90532134580208
📊 Page Load Benchmark Results

Current Commit: e8cc962 | Date: 11/21/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.03s (±38ms) 🟡 | historical mean value: 1.04s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 720ms (±61ms) 🟢 | historical mean value: 727ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 80ms (±43ms) 🟢 | historical mean value: 79ms ⬆️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.03s 38ms 1.01s 1.32s 1.07s 1.32s
domContentLoaded 720ms 61ms 697ms 1.28s 750ms 1.28s
firstPaint 80ms 43ms 60ms 500ms 84ms 500ms
firstContentfulPaint 80ms 43ms 60ms 500ms 84ms 500ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 70 Bytes (0%)
  • ui: 41.21 KiB (0.59%)
  • common: 199 Bytes (0%)

@@ -1,16 +1,16 @@
{
"data": {
"AuthenticationController": { "isSignedIn": "boolean" },
Copy link
Member Author

Choose a reason for hiding this comment

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

The explanation for the big diff here is that previously we would rely on ReadOnlyNetworkStore here:

. During the E2E the class would initialize with the fixture state but never be updated. Now that we are using the real storage API, the underlying state is updated by the background.

Copy link
Member Author

Choose a reason for hiding this comment

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

cc @Gudahtt for a sanity check

@metamaskbot metamaskbot added the INVALID-PR-TEMPLATE PR's body doesn't match template label Nov 21, 2025
@metamaskbot
Copy link
Collaborator

Builds ready [0c65494]
UI Startup Metrics (1309 ± 103 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup13091111159710313781496
load107191112819111421246
domContentLoaded106289512749211331241
domInteractive261598202182
firstPaint627116129343810671207
backgroundConnect23120841428236259
firstReactRender3219126143354
getState351799154162
initialActions105112
loadScripts8386771042908991011
setupStore1273451222
numNetworkReqs1257821575
BrowserifyPower User HomeuiStartup20801754316723422332469
load1036881182614410511372
domContentLoaded1021868181714410291363
domInteractive40162444732166
firstPaint5399214423749591075
backgroundConnect256200765110232536
firstReactRender87441361799113
getState211127700106225404
initialActions103112
loadScripts81567015711428291159
setupStore191064102438
numNetworkReqs91651943298180
WebpackStandard HomeuiStartup810711105267834980
load61155981361619785
domContentLoaded60755480661615779
domInteractive241399192082
firstPaint19774631114187579
backgroundConnect1153071228
firstReactRender28204353236
getState291355103644
initialActions103111
loadScripts60455179659613770
setupStore1263651420
numNetworkReqs1257720571
WebpackPower User HomeuiStartup17001296243625219492108
load69158212451237021034
domContentLoaded68157712311236881021
domInteractive37161893931161
firstPaint3011041036204384685
backgroundConnect85861116924530
firstReactRender894617219101119
getState18512465858198252
initialActions104112
loadScripts67857412201216861011
setupStore231067143452
numNetworkReqs1416730453177280
FirefoxBrowserifyStandard HomeuiStartup12611026182914213361516
load1041879155310310911231
domContentLoaded1040879155310410911231
domInteractive55301893578144
firstPaint------
backgroundConnect45212373740113
firstReactRender23186072335
getState1063541020
initialActions103112
loadScripts101386414239010641179
setupStore13590151054
numNetworkReqs1156314652
BrowserifyPower User HomeuiStartup31991865584880537704622
load1389929280550414492695
domContentLoaded1388928280550414492695
domInteractive13830733140166498
firstPaint------
backgroundConnect2782412963173181018
firstReactRender93393234096181
getState21882932186210759
initialActions2132323
loadScripts1308908258845014192520
setupStore1476822220126772
numNetworkReqs90522094281199
WebpackStandard HomeuiStartup16001352202115416941933
load1302111915699513621452
domContentLoaded1301111915699513621452
domInteractive78272344693198
firstPaint------
backgroundConnect59221983781132
firstReactRender30227683242
getState186248311371
initialActions103122
loadScripts1270110315458913271432
setupStore195173281277
numNetworkReqs1256817765
WebpackPower User HomeuiStartup33212194861296239644815
load16441142584468817462757
domContentLoaded16431142584368817452757
domInteractive2252840065081741000
firstPaint------
backgroundConnect2722513203113561016
firstReactRender97373035196223
getState28029942262237902
initialActions7110320258
loadScripts15511093582264916052609
setupStore14551009213159757
numNetworkReqs91552204297195
📊 Page Load Benchmark Results

Current Commit: 0c65494 | Date: 11/21/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 967ms (±38ms) 🟢 | historical mean value: 1.05s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 671ms (±35ms) 🟢 | historical mean value: 729ms ⬇️ (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 967ms 38ms 942ms 1.25s 991ms 1.25s
domContentLoaded 671ms 35ms 651ms 937ms 694ms 937ms
firstPaint 75ms 12ms 64ms 188ms 80ms 188ms
firstContentfulPaint 75ms 12ms 64ms 188ms 80ms 188ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 116 Bytes (0%)
  • ui: 41.41 KiB (0.59%)
  • common: 199 Bytes (0%)

@metamaskbot
Copy link
Collaborator

Builds ready [cccca99]
UI Startup Metrics (1287 ± 115 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup12871062163111513601497
load1061895133810011231275
domContentLoaded1055877131710011181267
domInteractive28161182522104
firstPaint574148133641810341202
backgroundConnect22420426411230247
firstReactRender3419206203957
getState4216139224998
initialActions1013214
loadScripts8376621093968941058
setupStore1364361424
numNetworkReqs1257520572
BrowserifyPower User HomeuiStartup20451736279620622332391
load96883117801729521464
domContentLoaded95482217681719341450
domInteractive38162244533164
firstPaint68317317813869151473
backgroundConnect258184698131218628
firstReactRender874314124106128
getState19514164782199254
initialActions105112
loadScripts76363815711697471250
setupStore1864192038
numNetworkReqs1416830252177279
WebpackStandard HomeuiStartup8577221105878961052
load66257787977690835
domContentLoaded65757187377683827
domInteractive29171192324100
firstPaint21175827142201623
backgroundConnect11682101120
firstReactRender2921110103338
getState281472133457
initialActions103111
loadScripts65456886275681816
setupStore1263151420
numNetworkReqs1257720573
WebpackPower User HomeuiStartup16041290209219316751990
load6845811083111689998
domContentLoaded6745741078112679989
domInteractive38181743833160
firstPaint313961007211411694
backgroundConnect47762912118488
firstReactRender894214121105127
getState17712864151184219
initialActions103112
loadScripts6725721069110677981
setupStore23981163653
numNetworkReqs1476631860192301
FirefoxBrowserifyStandard HomeuiStartup13061081172715214071622
load1057908142611111141282
domContentLoaded1056908142611211131282
domInteractive61302564286134
firstPaint------
backgroundConnect3923127214099
firstReactRender22185752333
getState1073451023
initialActions103022
loadScripts1035891139610910921262
setupStore125110141128
numNetworkReqs1256617662
BrowserifyPower User HomeuiStartup27151952475268627564557
load1200921284940011292584
domContentLoaded1199921284140011292583
domInteractive12733985142110471
firstPaint------
backgroundConnect143231128202122483
firstReactRender89373314791154
getState272351172216308805
initialActions217123
loadScripts1159905268136910932413
setupStore18061013219188708
numNetworkReqs91632094279200
WebpackStandard HomeuiStartup15101265193115916351815
load12461053172211513281426
domContentLoaded12451053172211513271426
domInteractive59261423181125
firstPaint------
backgroundConnect47222473350109
firstReactRender28197373041
getState1275571323
initialActions102122
loadScripts12211040164510913001408
setupStore146120181270
numNetworkReqs1257017664
WebpackPower User HomeuiStartup30422273584782129854901
load14841159312146015092713
domContentLoaded14841159311946015092713
domInteractive11731925135101466
firstPaint------
backgroundConnect163341256216172504
firstReactRender96383615497234
getState29082984232419815
initialActions301031123
loadScripts14051101295338414422513
setupStore14571000193189594
numNetworkReqs91612104377193
📊 Page Load Benchmark Results

Current Commit: cccca99 | Date: 11/24/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.03s (±40ms) 🟡 | historical mean value: 1.04s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 720ms (±38ms) 🟢 | historical mean value: 723ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 76ms (±11ms) 🟢 | historical mean value: 78ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.03s 40ms 1.01s 1.35s 1.07s 1.35s
domContentLoaded 720ms 38ms 698ms 1.01s 752ms 1.01s
firstPaint 76ms 11ms 64ms 172ms 88ms 172ms
firstContentfulPaint 76ms 11ms 64ms 172ms 88ms 172ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 49 Bytes (0%)
  • ui: 0 Bytes (0%)
  • common: 201 Bytes (0%)

@metamaskbot
Copy link
Collaborator

Builds ready [8b82805]
UI Startup Metrics (1218 ± 104 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup1218994152410412801416
load102185212259010701215
domContentLoaded101584912208810651202
domInteractive2614121242095
firstPaint54787123640610081209
backgroundConnect21319027014222240
firstReactRender28185883146
getState321585103752
initialActions105112
loadScripts808655101885853988
setupStore1163241219
numNetworkReqs1257720573
BrowserifyPower User HomeuiStartup21461840266722023442571
load1024899155015610231479
domContentLoaded1010891154115610081473
domInteractive41172224931184
firstPaint6109015494049831401
backgroundConnect258201629103232554
firstReactRender884616222104123
getState18412667957197235
initialActions103112
loadScripts80168713151557991255
setupStore201082112344
numNetworkReqs1416731455180300
WebpackStandard HomeuiStartup811689116087841985
load63556091475654809
domContentLoaded63155590275651804
domInteractive2715150262299
firstPaint22780924163212620
backgroundConnect1057191117
firstReactRender26194563138
getState261362113244
initialActions103112
loadScripts62855390073649795
setupStore1163051323
numNetworkReqs1257720573
WebpackPower User HomeuiStartup16571305229921517382122
load6935911268105704922
domContentLoaded6845841260106697917
domInteractive42172184534162
firstPaint27490937183272689
backgroundConnect102863118486593
firstReactRender924414722107129
getState18012770878183226
initialActions102012
loadScripts6815821251104694909
setupStore20667132251
numNetworkReqs91652113298184
FirefoxBrowserifyStandard HomeuiStartup12561046173114113191603
load102488513488910701196
domContentLoaded102388513478910701196
domInteractive55291813181119
firstPaint------
backgroundConnect42221662941109
firstReactRender22186062235
getState12713717922
initialActions102012
loadScripts100086913318310501154
setupStore12610114949
numNetworkReqs1156816663
BrowserifyPower User HomeuiStartup26311995443053427653986
load1185904257432011122241
domContentLoaded1184898257432111112240
domInteractive13234862140112476
firstPaint------
backgroundConnect126241116152126328
firstReactRender83382242691132
getState270771048221308792
initialActions3169827
loadScripts1146889232028910911862
setupStore1519684176140574
numNetworkReqs92592184478200
WebpackStandard HomeuiStartup15761339221814616351879
load1288108416209813371488
domContentLoaded1288108416209813371487
domInteractive74272943985136
firstPaint------
backgroundConnect53222143562133
firstReactRender312378113366
getState156166191427
initialActions113122
loadScripts1261106715939313101432
setupStore176211271570
numNetworkReqs1156616663
WebpackPower User HomeuiStartup30242337499766730314728
load14671183299234814392495
domContentLoaded14671183299234814382494
domInteractive1213197913898448
firstPaint------
backgroundConnect1732912162301541030
firstReactRender964332544100199
getState297541240229387747
initialActions511021637
loadScripts14051158283227313761896
setupStore1368777168128544
numNetworkReqs92612064180193
📊 Page Load Benchmark Results

Current Commit: 8b82805 | Date: 11/24/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.03s (±40ms) 🟡 | historical mean value: 1.04s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 714ms (±37ms) 🟢 | historical mean value: 722ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 75ms (±12ms) 🟢 | historical mean value: 78ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.03s 40ms 1000ms 1.33s 1.04s 1.33s
domContentLoaded 714ms 37ms 690ms 1.01s 725ms 1.01s
firstPaint 75ms 12ms 60ms 176ms 88ms 176ms
firstContentfulPaint 75ms 12ms 60ms 176ms 88ms 176ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 49 Bytes (0%)
  • ui: 0 Bytes (0%)
  • common: 201 Bytes (0%)

@FrederikBolding FrederikBolding marked this pull request as ready for review November 24, 2025 13:48
async reset(): Promise<void> {
this.#initialized = false;
this.#state = null;
await super.reset();
Copy link

Choose a reason for hiding this comment

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

Bug: Race condition in reset method

The reset method has a race condition where #initialized is set to false before creating a new #initializing promise. If get or set is called between setting #initialized = false and this.#initializing = this.#init(), they will await the old resolved promise instead of the new initialization, potentially accessing uninitialized or reset state.

Fix in Cursor Fix in Web

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think this matters in practice, but can fix it if anyone feels strongly about it

Copy link
Contributor

@cryptodev-2s cryptodev-2s left a comment

Choose a reason for hiding this comment

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

LGTM!

@FrederikBolding FrederikBolding added this pull request to the merge queue Nov 25, 2025
Merged via the queue into main with commit c214824 Nov 25, 2025
180 checks passed
@FrederikBolding FrederikBolding deleted the fb/use-real-storage-e2e branch November 25, 2025 12:02
@github-actions github-actions bot locked and limited conversation to collaborators Nov 25, 2025
@metamaskbot metamaskbot added the release-13.12.0 Issue or pull request that will be included in release 13.12.0 label Nov 25, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

INVALID-PR-TEMPLATE PR's body doesn't match template release-13.12.0 Issue or pull request that will be included in release 13.12.0 size-M team-core-platform Core Platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants