Skip to content

fix: hide legacy network manager modal in sidepanel confirmation#39908

Merged
ameliejyc merged 2 commits intomainfrom
fix-network-manager-dapp-request-broken-ui
Feb 10, 2026
Merged

fix: hide legacy network manager modal in sidepanel confirmation#39908
ameliejyc merged 2 commits intomainfrom
fix-network-manager-dapp-request-broken-ui

Conversation

@ameliejyc
Copy link
Contributor

@ameliejyc ameliejyc commented Feb 9, 2026

Description

When the Network Manager modal is open in the side panel view and a dapp request comes in, the confirmation screen navigates but the Network Manager modal remains visible and broken.

The useModalState.closeModals() hook only closed the NetworkListMenu but not legacy modals like NETWORK_MANAGER. This fix extends closeModals() to also close any open legacy modals, as modals should not persist on top of confirmation screens.

Open in GitHub Codespaces

Changelog

CHANGELOG entry: Fixed Network Manager modal not closing when navigating to dapp confirmation screens in side panel view

Related issues

Fixes: #39880

Manual testing steps

  1. Open MetaMask in side panel view
  2. Open the Network Manager modal (via token list control bar)
  3. Trigger a dapp request (e.g. connect or sign request from a dapp)
  4. Verify the Network Manager modal closes and the confirmation screen displays correctly

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

Low Risk
Small UI-state change that dispatches an additional MODAL_CLOSE action; low risk aside from potentially closing other legacy modals more broadly than intended.

Overview
Fixes a sidepanel navigation issue where the legacy Network Manager modal could remain visible over dapp confirmation screens.

useModalState.closeModals() now dispatches hideModal() in addition to closeNetworkMenu(), ensuring any open legacy modal is closed when the app attempts to close modal UI.

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

@github-actions
Copy link
Contributor

github-actions bot commented Feb 9, 2026

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-core-extension-ux Core Extension UX team label Feb 9, 2026
@github-actions github-actions bot added the size-S label Feb 9, 2026
@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Feb 9, 2026

Builds ready [0161a83]
UI Startup Metrics (1414 ± 114 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup14141229179211414791581
load12261009159310912911393
domContentLoaded12191004158711012861385
domInteractive2615111192275
firstPaint166641297174214239
backgroundConnect23421531318235278
firstReactRender17105661930
initialActions108113
loadScripts999782134111210701172
setupStore1466471523
numNetworkReqs231587201581
BrowserifyPower User HomeuiStartup272414199975173227266956
load12221033206816512821523
domContentLoaded12051021205716112551496
domInteractive35181712933109
firstPaint191731591163246313
backgroundConnect852284734512067413500
firstReactRender23165372538
initialActions108112
loadScripts966788174615110261245
setupStore15674101633
numNetworkReqs884917330103145
WebpackStandard HomeuiStartup8526721161989091042
load7206011081104797930
domContentLoaded7145981074103793922
domInteractive261691182374
firstPaint1116236956132209
backgroundConnect38181762838104
firstReactRender15104051725
initialActions104113
loadScripts7115961071102791920
setupStore1263251223
numNetworkReqs231591201580
WebpackPower User HomeuiStartup1252903270227612841803
load74265110951107381061
domContentLoaded73064210861107271048
domInteractive3818129223891
firstPaint168661054134192409
backgroundConnect187501140145161386
firstReactRender21173842329
initialActions102011
loadScripts72764010771087251039
setupStore1353861521
numNetworkReqs1465327838162233
FirefoxBrowserifyStandard HomeuiStartup16041294218121017432026
load13561125188918114491726
domContentLoaded13551125188918114491726
domInteractive68322424485145
firstPaint------
backgroundConnect762617945119162
firstReactRender1292021214
initialActions107122
loadScripts13121109184916413991631
setupStore136226231235
numNetworkReqs2512102231889
BrowserifyPower User HomeuiStartup28202156831277328813409
load16061274674065115881867
domContentLoaded16051274674065215881867
domInteractive1474249297190358
firstPaint------
backgroundConnect4081161271294591937
firstReactRender18146371826
initialActions103122
loadScripts15641248670465115551830
setupStore14510828179167541
numNetworkReqs85331893399151
WebpackStandard HomeuiStartup16801383235018217591998
load14231158184012114921628
domContentLoaded14221158183912214921628
domInteractive852919142117162
firstPaint------
backgroundConnect74293025080158
firstReactRender1711122121623
initialActions2041422
loadScripts13831141181711214361549
setupStore196232341341
numNetworkReqs231286181877
WebpackPower User HomeuiStartup27692044814368828523829
load15861303631254916342094
domContentLoaded15861303631154916342094
domInteractive167321375185170518
firstPaint------
backgroundConnect3591391224242420850
firstReactRender22163342530
initialActions208123
loadScripts15411264627454115732020
setupStore170111073198228565
numNetworkReqs82362163695152
📊 Page Load Benchmark Results

Current Commit: 0161a83 | Date: 2/9/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.03s (±39ms) 🟡 | historical mean value: 1.05s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 720ms (±37ms) 🟢 | historical mean value: 729ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 75ms (±11ms) 🟢 | historical mean value: 77ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.03s 39ms 1.01s 1.34s 1.05s 1.34s
domContentLoaded 720ms 37ms 700ms 1.02s 734ms 1.02s
firstPaint 75ms 11ms 60ms 176ms 80ms 176ms
firstContentfulPaint 75ms 11ms 60ms 176ms 80ms 176ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 58 Bytes (0%)
  • ui: 2.04 KiB (0.02%)
  • common: 1.26 KiB (0.01%)

@ameliejyc ameliejyc changed the title fix: cp-13.18.0 hide legacy network manager modal in sidepanel confirmation fix: hide legacy network manager modal in sidepanel confirmation Feb 9, 2026
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Feb 9, 2026

Builds ready [2d66e86]
UI Startup Metrics (1446 ± 117 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup14461173179911715161627
load12391005153111413071412
domContentLoaded1232999152811413001401
domInteractive2617103182377
firstPaint1446627257195227
backgroundConnect23721833417242260
firstReactRender18113352028
initialActions107113
loadScripts1011770127811610841195
setupStore1464371729
numNetworkReqs231590201583
BrowserifyPower User HomeuiStartup273314239351163028235675
load12421064180615312831587
domContentLoaded12251053178015012581578
domInteractive3620131223695
firstPaint215791738205250407
backgroundConnect82129341059616473296
firstReactRender24155072737
initialActions105112
loadScripts982821145013310141305
setupStore1554481734
numNetworkReqs1143924344141196
WebpackStandard HomeuiStartup843669110196918996
load70859391489779868
domContentLoaded70258990288771855
domInteractive251697172272
firstPaint1075932051133212
backgroundConnect3618143233883
firstReactRender1593051726
initialActions107112
loadScripts70058790087769853
setupStore1254361224
numNetworkReqs231588201580
WebpackPower User HomeuiStartup1311872228429813771887
load75863314631447641090
domContentLoaded74762514511447491080
domInteractive41192673737111
firstPaint180681122193169453
backgroundConnect18413159184180361
firstReactRender22173942430
initialActions103111
loadScripts74462214391427471072
setupStore1243751519
numNetworkReqs1426824641160222
FirefoxBrowserifyStandard HomeuiStartup17901441252423119002284
load14921251208517815561893
domContentLoaded14911246208517815551887
domInteractive77352384297139
firstPaint------
backgroundConnect873425153114202
firstReactRender13111911415
initialActions103122
loadScripts14431229204615814981771
setupStore186213271455
numNetworkReqs241293211888
BrowserifyPower User HomeuiStartup27502130709164128963499
load15431284556353115231938
domContentLoaded15431284556353115231938
domInteractive15835827140149429
firstPaint------
backgroundConnect41511414853236011050
firstReactRender18146351822
initialActions213122
loadScripts15061256553052514811904
setupStore114864715196490
numNetworkReqs874120834104149
WebpackStandard HomeuiStartup16181389224718116851961
load13851169175711314561568
domContentLoaded13841169175711414511567
domInteractive852732448118143
firstPaint------
backgroundConnect69262334381145
firstReactRender15125771421
initialActions102022
loadScripts13461152172710614141497
setupStore165136251141
numNetworkReqs231289191876
WebpackPower User HomeuiStartup26712084408236528153386
load14911254231119515981827
domContentLoaded14901253231119515981826
domInteractive14438593124141477
firstPaint------
backgroundConnect40612318793214861008
firstReactRender21144452329
initialActions206122
loadScripts14521232228619215391792
setupStore15181628215170509
numNetworkReqs824119633105145
📊 Page Load Benchmark Results

Current Commit: 2d66e86 | Date: 2/9/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.03s (±43ms) 🟡 | historical mean value: 1.04s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 720ms (±41ms) 🟢 | historical mean value: 722ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 78ms (±27ms) 🟢 | historical mean value: 77ms ⬆️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.03s 43ms 1.01s 1.38s 1.06s 1.38s
domContentLoaded 720ms 41ms 699ms 1.06s 740ms 1.06s
firstPaint 78ms 27ms 60ms 312ms 88ms 312ms
firstContentfulPaint 78ms 27ms 60ms 312ms 88ms 312ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 58 Bytes (0%)
  • ui: 2.8 KiB (0.03%)
  • common: 1.75 KiB (0.02%)

@ameliejyc ameliejyc enabled auto-merge February 10, 2026 10:38
@ameliejyc ameliejyc added this pull request to the merge queue Feb 10, 2026
Merged via the queue into main with commit 7dad971 Feb 10, 2026
191 checks passed
@ameliejyc ameliejyc deleted the fix-network-manager-dapp-request-broken-ui branch February 10, 2026 15:48
@github-actions github-actions bot locked and limited conversation to collaborators Feb 10, 2026
@metamaskbot metamaskbot added the release-13.19.0 Issue or pull request that will be included in release 13.19.0 label Feb 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-13.19.0 Issue or pull request that will be included in release 13.19.0 size-XS team-core-extension-ux Core Extension UX team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Side panel view: opening a dapp request in side panel while Network Manager is open, does not display correctly

4 participants