Skip to content

Conversation

@OGPoyraz
Copy link
Member

@OGPoyraz OGPoyraz commented Nov 3, 2025

Description

This PR aims to activate re-simulation feature when user focus the active extension window for batch transactions.

Open in GitHub Codespaces

Changelog

CHANGELOG entry: null

Related issues

Fixes: Batch transaction resimulation

Manual testing steps

  1. Batch transaction simulation network requests (sentinel) should be visible in the network tab when focused in the active window.

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

Adds TransactionType.batch to FOCUSABLE_TYPES to enable batch tx re-simulation on window focus.

  • Confirmations UI
    • Update ui/pages/confirmations/hooks/useTransactionFocusEffect.ts:
      • Add TransactionType.batch to FOCUSABLE_TYPES so batch transactions toggle active state on window focus.

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

@OGPoyraz OGPoyraz requested a review from a team as a code owner November 3, 2025 08:41
@metamaskbot metamaskbot added the team-confirmations Push issues to confirmations team label Nov 3, 2025
@metamaskbot
Copy link
Collaborator

✨ Files requiring CODEOWNER review ✨

@MetaMask/confirmations (1 files, +1 -0)
  • 📁 ui/
    • 📁 pages/
      • 📁 confirmations/
        • 📁 hooks/
          • 📄 useTransactionFocusEffect.ts +1 -0

@OGPoyraz OGPoyraz changed the title feat: Activate batch transaction resimulations feat: Activate batch transaction re-simulations when window is focused Nov 3, 2025
@OGPoyraz OGPoyraz changed the title feat: Activate batch transaction re-simulations when window is focused feat: Activate batch transaction re-simulations when on window focus Nov 3, 2025
@metamaskbot
Copy link
Collaborator

Builds ready [5361652]
UI Startup Metrics (1264 ± 89 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup1264110015238913391396
load108995313178411661206
domContentLoaded108394813038311581198
domInteractive211483131854
firstPaint64090131144211051200
backgroundConnect2292162537233241
firstReactRender28185073346
getState2075172335
initialActions51214613
loadScripts860729107683937984
setupStore1062531017
numNetworkReqs1367419672
BrowserifyPower User HomeuiStartup20231806280731024082807
load1094938173624714211736
domContentLoaded1085932173024814101730
domInteractive271564185264
firstPaint66617917385199601738
backgroundConnect23721927212241272
firstReactRender26242912729
getState17816220112192201
initialActions427157
loadScripts860707148524111811485
setupStore1292641126
numNetworkReqs15710331388304313
WebpackStandard HomeuiStartup8827401157869001109
load65360093176658885
domContentLoaded64659491673651868
domInteractive16126791538
firstPaint18657882186185626
backgroundConnect261278142864
firstReactRender30185783539
getState1262231518
initialActions3114248
loadScripts64259190571649858
setupStore1152031317
numNetworkReqs1367519870
WebpackPower User HomeuiStartup13321168201424916032014
load68160510041227651004
domContentLoaded65359496099731960
domInteractive231264163964
firstPaint27473966239357966
backgroundConnect63182157398215
firstReactRender26242812628
getState14710916215157162
initialActions41256425
loadScripts64959295095721950
setupStore1262472224
numNetworkReqs1469727968193279
FirefoxBrowserifyStandard HomeuiStartup15501330214912616171740
load1309114515248513801454
domContentLoaded1309114515248513791454
domInteractive1213632848126224
firstPaint------
backgroundConnect51283553853116
firstReactRender28225782749
getState84396819
initialActions7120821414
loadScripts1279112314818413421422
setupStore1475591336
numNetworkReqs1366917763
BrowserifyPower User HomeuiStartup24672135327037630183270
load14051175185522316521855
domContentLoaded14051174185422316511854
domInteractive18091406113254406
firstPaint------
backgroundConnect1074035295196352
firstReactRender39296294662
getState1329428044158280
initialActions1411393314139
loadScripts13651138182121416171821
setupStore3661504243150
numNetworkReqs1506834385219343
WebpackStandard HomeuiStartup15731411199014516371891
load13441189169410813931582
domContentLoaded13431189169410813921581
domInteractive993226541109165
firstPaint------
backgroundConnect47231222253110
firstReactRender312272133069
getState10316617917
initialActions51296326
loadScripts1315117016689813651519
setupStore16488181375
numNetworkReqs1367118867
WebpackPower User HomeuiStartup27482193367542631803675
load15961261193921618371939
domContentLoaded15961261193921618371939
domInteractive18345451131331451
firstPaint------
backgroundConnect1183426668182266
firstReactRender44321061750106
getState1318021527137215
initialActions13263141963
loadScripts15541241188920917711889
setupStore4762686245268
numNetworkReqs1796435994248359
📊 Page Load Benchmark Results

Current Commit: 5361652 | Date: 11/3/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.07s (±72ms) 🟡 | historical mean value: 1.04s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 746ms (±70ms) 🟢 | historical mean value: 725ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 77ms (±10ms) 🟢 | historical mean value: 77ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.07s 72ms 1.02s 1.35s 1.28s 1.35s
domContentLoaded 746ms 70ms 704ms 1.04s 950ms 1.04s
firstPaint 77ms 10ms 60ms 156ms 88ms 156ms
firstContentfulPaint 77ms 10ms 60ms 156ms 88ms 156ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 68 Bytes (0%)
  • ui: 24 Bytes (0%)
  • common: 10 Bytes (0%)

@OGPoyraz OGPoyraz enabled auto-merge November 3, 2025 09:31
@metamaskbot
Copy link
Collaborator

Builds ready [6d7c6da]
UI Startup Metrics (1268 ± 97 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup1268111716579713181438
load108396713798311341221
domContentLoaded107696213558111261213
domInteractive2214129181964
firstPaint70390139643311101219
backgroundConnect23221729411235253
firstReactRender29195693648
getState2296692540
initialActions61587713
loadScripts851737110678903984
setupStore1063341117
numNetworkReqs1367620674
BrowserifyPower User HomeuiStartup20331810278730524112787
load1072941141918113451419
domContentLoaded1064935141318113371413
domInteractive281676205476
firstPaint66121214334319741433
backgroundConnect24022126211255262
firstReactRender27253322833
getState18616725621197256
initialActions63153615
loadScripts835716119117910981191
setupStore1191211212
numNetworkReqs15510330683281306
WebpackStandard HomeuiStartup9377841300949621154
load691622104387691918
domContentLoaded681614102384685904
domInteractive181267101640
firstPaint19361908176205649
backgroundConnect301487173181
firstReactRender3119137143841
getState1372431619
initialActions41203510
loadScripts678612101182682893
setupStore1272441419
numNetworkReqs1367419868
WebpackPower User HomeuiStartup13371154196226214901962
load67359510121277251012
domContentLoaded656584977117697977
domInteractive221262163962
firstPaint207114593117265593
backgroundConnect711828583113285
firstReactRender26243632636
getState14610815816156158
initialActions41175717
loadScripts652582965114686965
setupStore1264091440
numNetworkReqs1439927965196279
FirefoxBrowserifyStandard HomeuiStartup15371322212814516001788
load1297114015299213661455
domContentLoaded1297114015299213661454
domInteractive1233633652133228
firstPaint------
backgroundConnect4728151225199
firstReactRender26214852741
getState11419621830
initialActions42374313
loadScripts1268112015118813381423
setupStore164214271138
numNetworkReqs1267116760
BrowserifyPower User HomeuiStartup25802174348333228263483
load14411208207320615712073
domContentLoaded14411207207220615712072
domInteractive23397545167486545
firstPaint------
backgroundConnect12632434105189434
firstReactRender41325684856
getState13410419324150193
initialActions1511182827118
loadScripts14041187195819115431958
setupStore32101804138180
numNetworkReqs1397029271219292
WebpackStandard HomeuiStartup16841491232415717551981
load14241237187711614681667
domContentLoaded14241236187711614681667
domInteractive1033522434111176
firstPaint------
backgroundConnect56222243559126
firstReactRender362382173678
getState844851014
initialActions8116322428
loadScripts13911220183110814401623
setupStore14780121235
numNetworkReqs1367017866
WebpackPower User HomeuiStartup25492139315127928123151
load15071240199219916331992
domContentLoaded15071240199219916331992
domInteractive19639490144344490
firstPaint------
backgroundConnect903323868131238
firstReactRender463199165199
getState1458821843195218
initialActions14177221977
loadScripts14701221193219015781932
setupStore3881474079147
numNetworkReqs1566632979202329
📊 Page Load Benchmark Results

Current Commit: 6d7c6da | Date: 11/3/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.03s (±42ms) 🟡 | historical mean value: 1.04s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 717ms (±39ms) 🟢 | historical mean value: 729ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 77ms (±12ms) 🟢 | historical mean value: 77ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.03s 42ms 1.01s 1.36s 1.06s 1.36s
domContentLoaded 717ms 39ms 698ms 1.03s 737ms 1.03s
firstPaint 77ms 12ms 60ms 184ms 84ms 184ms
firstContentfulPaint 77ms 12ms 60ms 184ms 84ms 184ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 68 Bytes (0%)
  • ui: 24 Bytes (0%)
  • common: 10 Bytes (0%)

@OGPoyraz OGPoyraz added this pull request to the merge queue Nov 3, 2025
auto-merge was automatically disabled November 3, 2025 15:51

Pull Request is not mergeable

Merged via the queue into main with commit a37a298 Nov 3, 2025
480 of 485 checks passed
@OGPoyraz OGPoyraz deleted the activate-batch-transaction-resimulations branch November 3, 2025 16:04
@github-actions github-actions bot locked and limited conversation to collaborators Nov 3, 2025
@metamaskbot metamaskbot added the release-13.9.0 Issue or pull request that will be included in release 13.9.0 label Nov 3, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-13.9.0 Issue or pull request that will be included in release 13.9.0 size-XS team-confirmations Push issues to confirmations team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants