Skip to content

Conversation

@MajorLift
Copy link
Contributor

@MajorLift MajorLift commented Oct 2, 2025

Description

The MetamaskController.privateSendUpdate method is currently not used anywhere, but is a useful wrapper for the uncommon scenario where a forced UI state update needs to be triggered in response to background events or actions. In the more usual case where a UI state update needs to be triggered in response to user actions, forceUpdateMetamaskState is used.

This commit adds a boolean flag parameter to privateSendUpdate for optionally triggering state updates only with pending patches, which is the default behavior of the update event that is used by the method.

Open in GitHub Codespaces

Changelog

CHANGELOG entry: null

Related issues

Fixes:

Manual testing steps

  1. Go to this page...

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

privateSendUpdate now accepts a sendFullState flag to either emit the full MetaMask state or just trigger an 'update' for pending patches, with updated JSDoc.

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

@github-actions
Copy link
Contributor

github-actions bot commented Oct 2, 2025

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-extension-platform Extension Platform team label Oct 2, 2025
@github-actions github-actions bot added the size-S label Oct 2, 2025
@metamaskbot
Copy link
Collaborator

📊 Page Load Benchmark Results

Current Commit: 8de082b | Date: 10/2/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.08s (±77ms) 🟡 | historical mean value: 1.05s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 756ms (±73ms) 🟢 | historical mean value: 739ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 80ms (±12ms) 🟢 | historical mean value: 77ms ⬆️ (historical data)
📈 Detailed Results
Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.08s 77ms 1.03s 1.36s 1.34s 1.36s
domContentLoaded 756ms 73ms 708ms 1.04s 998ms 1.04s
firstPaint 80ms 12ms 68ms 184ms 96ms 184ms
firstContentfulPaint 80ms 12ms 68ms 184ms 96ms 184ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

Results generated automatically by MetaMask CI

@metamaskbot
Copy link
Collaborator

Builds ready [8de082b]
UI Startup Metrics (1286 ± 63 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1286113614656313191409
load110997212586211421232
domContentLoaded110196612526211341220
domInteractive18144561739
firstPaint631160124445111231216
backgroundConnect2612442979265278
firstReactRender25184872641
getState1356081625
initialActions50758614
loadScripts84871499462880967
setupStore963131013
WebpackHomeuiStartup21011568271026122902544
load16711249216920918331987
domContentLoaded16631237214620818261970
domInteractive1912151201547
firstPaint1676962982194298
backgroundConnect281775113154
firstReactRender107393388699329
getState2552875815267
initialActions62405616
loadScripts16591232213620718221958
setupStore3354117715294
FirefoxBrowserifyHomeuiStartup13961217174910714431638
load1208105015198612641364
domContentLoaded1208105015198612641363
domInteractive1103241362110262
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect311895143469
firstReactRender28247252934
getState837511613
initialActions3043437
loadScripts1183103214978712401322
setupStore95527824
WebpackHomeuiStartup16401445205315917471963
load13881211172713414861651
domContentLoaded13881211172713414851651
domInteractive1173540367116317
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect33216073845
firstReactRender39338254146
getState8316616614
initialActions511181538
loadScripts13651191170613514631632
setupStore136156171041
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 240 Bytes (0.01%)
  • ui: 7.32 KiB (0.11%)
  • common: 2.16 KiB (0.03%)

@MajorLift MajorLift force-pushed the jongsun/feat/251002-add-param-to-privateSendUpdate branch from 8de082b to d7f6f88 Compare October 2, 2025 17:31
@MajorLift MajorLift added the no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed label Oct 3, 2025
@metamaskbot
Copy link
Collaborator

📊 Page Load Benchmark Results

Current Commit: d7f6f88 | Date: 10/2/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.07s (±72ms) 🟡 | historical mean value: 1.06s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 748ms (±70ms) 🟢 | historical mean value: 741ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 78ms (±12ms) 🟢 | historical mean value: 81ms ⬇️ (historical data)
📈 Detailed Results
Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.07s 72ms 1.03s 1.34s 1.29s 1.34s
domContentLoaded 748ms 70ms 712ms 1.01s 960ms 1.01s
firstPaint 78ms 12ms 60ms 188ms 92ms 188ms
firstContentfulPaint 78ms 12ms 60ms 188ms 92ms 188ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

Results generated automatically by MetaMask CI

@metamaskbot
Copy link
Collaborator

Builds ready [d7f6f88]
UI Startup Metrics (1215 ± 64 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1215108614046412641317
load105095911945610981141
domContentLoaded104394711865710911135
domInteractive17135171639
firstPaint645115115942210591137
backgroundConnect2512382828255265
firstReactRender22174242331
getState1357491627
initialActions50618511
loadScripts79970792455846895
setupStore962731017
WebpackHomeuiStartup19851565255526421732455
load15851243196820317281902
domContentLoaded15781231196420317191892
domInteractive16126491442
firstPaint1667137560190298
backgroundConnect281270103152
firstReactRender99363408190327
getState3443087514270
initialActions52213612
loadScripts15741229195320117171880
setupStore165272371323
FirefoxBrowserifyHomeuiStartup15121299206012015571715
load1301113116178513611445
domContentLoaded1300113116178513611445
domInteractive1163547972122273
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3621148223998
firstReactRender30255243236
getState11323329725
initialActions41142410
loadScripts1273111516008413361420
setupStore1065271028
WebpackHomeuiStartup16821445226615117851966
load14261242174213115231668
domContentLoaded14251242174213115231667
domInteractive1177335059118300
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect35229594147
firstReactRender40335034246
getState8313415714
initialActions512052036
loadScripts14001215171313214921642
setupStore1063961027
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 240 Bytes (0.01%)
  • ui: 7.32 KiB (0.11%)
  • common: 2.19 KiB (0.03%)

@github-project-automation github-project-automation bot moved this to Needs dev review in PR review queue Oct 3, 2025
@MajorLift MajorLift marked this pull request as ready for review October 3, 2025 15:32
@MajorLift MajorLift force-pushed the jongsun/feat/251002-add-param-to-privateSendUpdate branch from 920a2f1 to 0727256 Compare October 3, 2025 15:34
@metamaskbot
Copy link
Collaborator

📊 Page Load Benchmark Results

Current Commit: 0727256 | Date: 10/3/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.07s (±73ms) 🟡 | historical mean value: 1.05s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 754ms (±70ms) 🟢 | historical mean value: 740ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 79ms (±11ms) 🟢 | historical mean value: 81ms ⬇️ (historical data)
📈 Detailed Results
Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.07s 73ms 1.03s 1.37s 1.29s 1.37s
domContentLoaded 754ms 70ms 716ms 1.04s 961ms 1.04s
firstPaint 79ms 11ms 64ms 176ms 88ms 176ms
firstContentfulPaint 79ms 11ms 64ms 176ms 88ms 176ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

Results generated automatically by MetaMask CI

@metamaskbot
Copy link
Collaborator

Builds ready [0727256]
UI Startup Metrics (1224 ± 56 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1224111413865612561349
load106196212035210921152
domContentLoaded105394911945310851140
domInteractive18136281737
firstPaint70298119442010771133
backgroundConnect2542412798257273
firstReactRender24174562538
getState1259491422
initialActions40183510
loadScripts80771094051836892
setupStore952731017
WebpackHomeuiStartup18261549228319019832157
load15161361180512716031760
domContentLoaded15041349179712615951743
domInteractive161189141347
firstPaint2055716903101751376
backgroundConnect3115168183555
firstReactRender4519184245481
getState125110111319
initialActions30203311
loadScripts15001347179512515901738
setupStore123106111423
FirefoxBrowserifyHomeuiStartup13901247176811914331658
load1190108313867912321349
domContentLoaded1189108313857912321349
domInteractive96342875198240
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect292067103351
firstReactRender29254743138
getState836010724
initialActions3121337
loadScripts1168106813597612101322
setupStore12516222835
WebpackHomeuiStartup16071419217514216561952
load13951225178110414401673
domContentLoaded13951225178010414401672
domInteractive102324007098350
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect4020139224394
firstReactRender3526165163657
getState8310111717
initialActions41487415
loadScripts1364120717629814061556
setupStore154117211075
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 458 Bytes (0.01%)
  • ui: 8.25 KiB (0.13%)
  • common: 2.32 KiB (0.03%)

@MajorLift MajorLift removed the status in PR review queue Oct 3, 2025
@MajorLift MajorLift marked this pull request as draft October 3, 2025 17:43
@MajorLift MajorLift force-pushed the jongsun/feat/251002-add-param-to-privateSendUpdate branch from 0727256 to a4c55a2 Compare October 7, 2025 12:32
@MajorLift MajorLift force-pushed the jongsun/feat/251002-add-param-to-privateSendUpdate branch from a4c55a2 to e6106f0 Compare October 7, 2025 12:38
@metamaskbot
Copy link
Collaborator

📊 Page Load Benchmark Results

Current Commit: e6106f0 | Date: 10/7/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.06s (±72ms) 🟡 | historical mean value: 1.05s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 743ms (±70ms) 🟢 | historical mean value: 736ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 79ms (±11ms) 🟢 | historical mean value: 77ms ⬆️ (historical data)
📈 Detailed Results
Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.06s 72ms 1.02s 1.34s 1.29s 1.34s
domContentLoaded 743ms 70ms 709ms 1.02s 964ms 1.02s
firstPaint 79ms 11ms 60ms 172ms 88ms 172ms
firstContentfulPaint 79ms 11ms 60ms 172ms 88ms 172ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

Results generated automatically by MetaMask CI

@metamaskbot
Copy link
Collaborator

Builds ready [e6106f0]
UI Startup Metrics (1245 ± 76 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1245109015457612821382
load107893213307611151226
domContentLoaded107292613127611121220
domInteractive17134961636
firstPaint708144133743610861195
backgroundConnect2512382787255265
firstReactRender2517132162341
getState1153361327
initialActions40224414
loadScripts827677104575869972
setupStore95315921
WebpackHomeuiStartup18971554227719320462209
load15611380190112716491786
domContentLoaded15461369185812516331776
domInteractive181197171468
firstPaint3355917814971971631
backgroundConnect331490144163
firstReactRender52192353262109
getState153136191528
initialActions5015917324
loadScripts15411367185612416291774
setupStore1243871531
FirefoxBrowserifyHomeuiStartup14401250180012114891741
load1235107515489112991395
domContentLoaded1234107415489212991395
domInteractive106364436898257
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3120116123553
firstReactRender30255253242
getState63284612
initialActions41376215
loadScripts1212105815349012681374
setupStore11414119751
WebpackHomeuiStartup15901352214014116141955
load1379120417669914201579
domContentLoaded1378120417659914201579
domInteractive1073241374105363
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3519109183886
firstReactRender362682143678
getState836810630
initialActions7012917241
loadScripts1351118717409513901555
setupStore935911746
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 226 Bytes (0%)
  • ui: 0 Bytes (0%)
  • common: 10 Bytes (0%)

@MajorLift MajorLift closed this Oct 8, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Oct 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed size-S team-extension-platform Extension Platform team

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants