Skip to content

Conversation

@FrederikBolding
Copy link
Member

@FrederikBolding FrederikBolding commented Nov 7, 2025

Description

We recently changed it so onActive fires once the client has been unlocked. This PR adjusts the hook that provides the active flag to the same behavior.

Open in GitHub Codespaces

Changelog

CHANGELOG entry: null


Note

Updates client activity to require both UI open and wallet unlocked, and adjusts Snap client-status E2E test expectations.

  • Snaps / Controller:
    • Update getIsActive in app/scripts/metamask-controller.js to return this._isClientOpen && isUnlocked (was only this._isClientOpen).
  • Tests:
    • Adjust test/e2e/snaps/test-snap-clientstatus.spec.ts to expect active: false when locked: true.

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

@metamaskbot metamaskbot added team-core-platform Core Platform team INVALID-PR-TEMPLATE PR's body doesn't match template labels Nov 7, 2025
Mrtenz
Mrtenz previously approved these changes Nov 7, 2025
@metamaskbot
Copy link
Collaborator

Builds ready [07d9fc5]
UI Startup Metrics (1228 ± 103 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup12281066171210312821424
load105992614899811261233
domContentLoaded105392114829711191227
domInteractive211394141857
firstPaint66587149543110651194
backgroundConnect2282152728231241
firstReactRender26175472841
getState22873112648
initialActions001001
loadScripts8317011262979021011
setupStore1172831217
numNetworkReqs1367520673
BrowserifyPower User HomeuiStartup19531732249920620492499
load1043902138917112641389
domContentLoaded1035894137717012581377
domInteractive311684235784
firstPaint6919613514459601351
backgroundConnect24022426210243262
firstReactRender29263833138
getState18215821619200216
initialActions001011
loadScripts806676114716710281147
setupStore14102971329
numNetworkReqs1187325059157250
WebpackStandard HomeuiStartup8267011174868321057
load60755992576602837
domContentLoaded59954990973595810
domInteractive15124781438
firstPaint19058907185171696
backgroundConnect251274152865
firstReactRender29175983337
getState1152931216
initialActions001001
loadScripts59654789970592800
setupStore1152951227
numNetworkReqs1467820873
WebpackPower User HomeuiStartup12841149189522213321895
load654572945127732945
domContentLoaded637561927119696927
domInteractive231368173968
firstPaint29567895262572895
backgroundConnect57102487080248
firstReactRender27242922829
getState14110015619152156
initialActions001011
loadScripts633559916116686916
setupStore1762892728
numNetworkReqs1117222947165229
FirefoxBrowserifyStandard HomeuiStartup14281278202212514781690
load1217110015588312611377
domContentLoaded1216110015578312611376
domInteractive983619729111150
firstPaint------
backgroundConnect4425172235089
firstReactRender24204542538
getState74354717
initialActions001001
loadScripts1190107814507712321346
setupStore1487591429
numNetworkReqs1467820775
BrowserifyPower User HomeuiStartup23702091274822425632748
load13541170173717015111737
domContentLoaded13531170173617015101736
domInteractive21192652186340652
firstPaint------
backgroundConnect11231411113130411
firstReactRender453181145281
getState1116415526130155
initialActions001011
loadScripts13161129165715914301657
setupStore2351012427101
numNetworkReqs1347121259194212
WebpackStandard HomeuiStartup16271430247919816432153
load13781208176810714121615
domContentLoaded13781207176810714111614
domInteractive1043536545115169
firstPaint------
backgroundConnect49222393650142
firstReactRender292082103041
getState10319121834
initialActions002001
loadScripts1350118417419813901572
setupStore197241341470
numNetworkReqs1367018768
WebpackPower User HomeuiStartup25992169328537530263285
load15491284188420518091884
domContentLoaded15481284188420518081884
domInteractive19739585160371585
firstPaint------
backgroundConnect1063039897171398
firstReactRender40315064750
getState1208619227124192
initialActions001011
loadScripts15131256185319717621853
setupStore59631886113318
numNetworkReqs1357031586234315
📊 Page Load Benchmark Results

Current Commit: 07d9fc5 | Date: 11/7/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.05s (±38ms) 🟡 | historical mean value: 1.03s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 730ms (±35ms) 🟢 | historical mean value: 718ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 79ms (±12ms) 🟢 | historical mean value: 76ms ⬆️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.05s 38ms 1.02s 1.33s 1.07s 1.33s
domContentLoaded 730ms 35ms 707ms 988ms 742ms 988ms
firstPaint 79ms 12ms 64ms 180ms 88ms 180ms
firstContentfulPaint 79ms 12ms 64ms 180ms 88ms 180ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 150 Bytes (0%)
  • ui: 0 Bytes (0%)
  • common: 20 Bytes (0%)

@metamaskbot
Copy link
Collaborator

✨ Files requiring CODEOWNER review ✨

🫰 @MetaMask/core-platform (1 files, +1 -1)
  • 📁 test/
    • 📁 e2e/
      • 📁 snaps/
        • 📄 test-snap-clientstatus.spec.ts +1 -1

@metamaskbot
Copy link
Collaborator

Builds ready [29c0bf4]
UI Startup Metrics (1204 ± 90 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup1204105414389012571363
load103986412708710911202
domContentLoaded103085712648910861194
domInteractive201479131858
firstPaint671145127040710581203
backgroundConnect22921432615230248
firstReactRender25178782734
getState20666102536
initialActions001001
loadScripts810639102688865971
setupStore1167771117
numNetworkReqs1367419673
BrowserifyPower User HomeuiStartup19131736243422920922434
load1021900138217712821382
domContentLoaded1012889136217412771362
domInteractive271564185264
firstPaint79922713713899531371
backgroundConnect24022426712253267
firstReactRender26243122731
getState17815221620200216
initialActions001011
loadScripts786670111216810451112
setupStore1191521215
numNetworkReqs1207625065181250
WebpackStandard HomeuiStartup85171014071238471168
load6215561187107605926
domContentLoaded6145511174103598901
domInteractive171183121448
firstPaint219561178237187898
backgroundConnect251180142559
firstReactRender29177293438
getState1162531317
initialActions002001
loadScripts6115491163101596891
setupStore1163841218
numNetworkReqs1367319871
WebpackPower User HomeuiStartup12311124164614712611646
load644569944121778944
domContentLoaded624556912109742912
domInteractive221256153856
firstPaint43567920278578920
backgroundConnect7193208387320
firstReactRender25242712627
getState1379515620149156
initialActions001011
loadScripts620554902106732902
setupStore1163881038
numNetworkReqs1087016639165166
FirefoxBrowserifyStandard HomeuiStartup14251247173310714691644
load1215107814358512731391
domContentLoaded1215107814358512721391
domInteractive1163442358121245
firstPaint------
backgroundConnect3924104134664
firstReactRender24204032628
getState74223714
initialActions002001
loadScripts1192106214088412501356
setupStore13670101332
numNetworkReqs1266115756
BrowserifyPower User HomeuiStartup26462092431851928804318
load15091141199224416571992
domContentLoaded15091141199124416561991
domInteractive21883581177438581
firstPaint------
backgroundConnect14127590150143590
firstReactRender463378125378
getState1337125241165252
initialActions105115
loadScripts14631121194822316271948
setupStore29698294298
numNetworkReqs1347332476200324
WebpackStandard HomeuiStartup16171399198213516681940
load13831222170310614251621
domContentLoaded13831222170310614251620
domInteractive1003437241112152
firstPaint------
backgroundConnect48221422354115
firstReactRender312377123170
getState9414515820
initialActions001001
loadScripts1352120416669813921536
setupStore15767121345
numNetworkReqs1367017865
WebpackPower User HomeuiStartup23992129292122526142921
load14851267186818416651868
domContentLoaded14841266186818416631868
domInteractive12941434105201434
firstPaint------
backgroundConnect86303328888332
firstReactRender473191184891
getState1186621535142215
initialActions101111
loadScripts14551247182417616271824
setupStore3481554233155
numNetworkReqs1306327263189272
📊 Page Load Benchmark Results

Current Commit: 29c0bf4 | Date: 11/7/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.03s (±42ms) 🟡 | historical mean value: 1.03s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 717ms (±39ms) 🟢 | historical mean value: 716ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 76ms (±15ms) 🟢 | historical mean value: 76ms ⬆️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.03s 42ms 1.01s 1.35s 1.06s 1.35s
domContentLoaded 717ms 39ms 697ms 1.02s 744ms 1.02s
firstPaint 76ms 15ms 60ms 216ms 88ms 216ms
firstContentfulPaint 76ms 15ms 60ms 216ms 88ms 216ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 150 Bytes (0%)
  • ui: 0 Bytes (0%)
  • common: 20 Bytes (0%)

@FrederikBolding FrederikBolding added this pull request to the merge queue Nov 7, 2025
Merged via the queue into main with commit f581837 Nov 7, 2025
349 of 375 checks passed
@FrederikBolding FrederikBolding deleted the fb/is-active-includes-unlocked branch November 7, 2025 11:15
@github-actions github-actions bot locked and limited conversation to collaborators Nov 7, 2025
@metamaskbot metamaskbot added the release-13.10.0 Issue or pull request that will be included in release 13.10.0 label Nov 7, 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.10.0 Issue or pull request that will be included in release 13.10.0 size-XS team-core-platform Core Platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants