Skip to content

Conversation

@runway-github
Copy link
Contributor

@runway-github runway-github bot commented Nov 28, 2025

Description

Enables the confirmation handler to listen from pages other than the
home page.

There's a list of exempted routes including the confirmation routes.

Depends on #38361

Open in GitHub Codespaces

Changelog

CHANGELOG entry: feat: confirmations for sidepanel

Related issues

Fixes:

Manual testing steps

  1. Switch to sidepanel
  2. Test requests and approvals

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

Enables confirmation routing across routes (incl. sidepanel), centralizes modal handling with a network menu close action, and updates manifests/builds for side panel support.

  • UI:
    • Confirmation routing: ConfirmationHandler now runs outside DEFAULT_ROUTE, adds exempt routes, and closes modals before navigating.
    • Modals: New useModalState hook and Modals container to render NetworkListMenu; routes integrate Modals and remove inline network menu handling.
    • App state: Add CLOSE_NETWORK_MENU action/reducer; export closeNetworkMenu; add selector selectIsNetworkMenuOpen.
    • Cleanup: Remove unused sidepanel/env and swaps props in home.container.
  • Manifests/Build:
    • Add "sidePanel" permission and Chrome side_panel.default_path.
    • Set IS_SIDEPANEL: true for main build.

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

3c42ac3

<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

Enables the confirmation handler to listen from pages other than the
home page.

There's a list of exempted routes including the confirmation routes.


Depends on #38361 

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/38375?quickstart=1)

## **Changelog**

<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`

If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`

(This helps the Release Engineer do their job more quickly and
accurately)
-->

CHANGELOG entry: feat: confirmations for sidepanel

## **Related issues**

Fixes:

## **Manual testing steps**

1. Switch to sidepanel
2. Test requests and approvals

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **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.



<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Enable confirmation navigation from any route (incl. sidepanel), add
side panel manifest/config, and centralize network menu modal with a
close action.
> 
> - **Confirmations & Navigation**:
> - Run confirmation redirection from any route via
`ConfirmationHandler` with an exempted-routes list; closes open modals
before navigating.
>   - Remove reliance on home/default route checks.
> - **Modals Refactor**:
> - Add `useModalState` hook and `CLOSE_NETWORK_MENU` action; update
reducer to support explicit close.
> - Introduce `Modals` aggregator to render `NetworkListMenu`; integrate
into `routes.component` and remove inline menu handling.
>   - Export selector `selectIsNetworkMenuOpen`.
> - **Sidepanel Enablement**:
> - Add `"sidePanel"` permission and Chrome `side_panel.default_path` in
`manifest`.
>   - Set `IS_SIDEPANEL: true` for main build.
> - **Cleanup**:
> - Remove unused sidepanel/env and swaps-related props from
`home.container`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
c08536b. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
@runway-github runway-github bot requested a review from a team as a code owner November 28, 2025 11:21
@github-actions
Copy link
Contributor

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-bots Bot team (for MetaMask Bot, Runway Bot, etc.) label Nov 28, 2025
@metamaskbot
Copy link
Collaborator

✨ Files requiring CODEOWNER review ✨

👨‍🔧 @MetaMask/core-extension-ux (1 files, +0 -12)
  • 📁 ui/
    • 📁 pages/
      • 📁 home/
        • 📄 home.container.js +0 -12

@metamaskbot
Copy link
Collaborator

Builds ready [a91ea96]
UI Startup Metrics (1276 ± 116 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup12761059181911613351472
load1063881149410411281245
domContentLoaded1056878148010111071238
domInteractive2816124242397
firstPaint51586128740810401173
backgroundConnect22619927516235261
firstReactRender3521111144264
getState40161582343106
initialActions104112
loadScripts8366721249998881015
setupStore1273551425
numNetworkReqs1257820572
BrowserifyPower User HomeuiStartup20251646284826722482545
load96384415111519581408
domContentLoaded94983615031519391398
domInteractive33161792930114
firstPaint65011615123899201386
backgroundConnect242177742121213579
firstReactRender58401181563100
getState20014664381205256
initialActions103112
loadScripts76065512901477441194
setupStore1964992138
numNetworkReqs1617140375201335
WebpackStandard HomeuiStartup8457051187918791031
load65357091677692818
domContentLoaded64856591277689810
domInteractive2615102212287
firstPaint22583888172211666
backgroundConnect1153961227
firstReactRender28205173341
getState281371123848
initialActions102111
loadScripts64556390975686806
setupStore1062941218
numNetworkReqs1257721575
WebpackPower User HomeuiStartup16671253292628919232153
load6725751200109671948
domContentLoaded6615711192109660930
domInteractive34161602930115
firstPaint314108944210349711
backgroundConnect74662816021545
firstReactRender6444125116983
getState18914774058193227
initialActions105112
loadScripts6595691184107658922
setupStore20857122151
numNetworkReqs1656840078205388
FirefoxBrowserifyStandard HomeuiStartup12781064173514513531578
load1061898147711011081325
domContentLoaded1061893147711011081325
domInteractive65301493290125
firstPaint------
backgroundConnect42201502742112
firstReactRender23184452434
getState116138141021
initialActions103122
loadScripts1035883145110110801274
setupStore115111131030
numNetworkReqs1156616661
BrowserifyPower User HomeuiStartup26341976457460227404152
load1157970245520111241547
domContentLoaded1157970245420111241547
domInteractive12032532111110457
firstPaint------
backgroundConnect962553779101286
firstReactRender63372723359128
getState29468913236378815
initialActions2031323
loadScripts1122951232418911001516
setupStore15551041192200681
numNetworkReqs99593196280238
WebpackStandard HomeuiStartup15781314204216516651913
load12941084164111213521506
domContentLoaded12941084164111213511505
domInteractive71281943796131
firstPaint------
backgroundConnect54192003366115
firstReactRender28217792941
getState157118181531
initialActions103122
loadScripts12641065161610413241452
setupStore14577141342
numNetworkReqs1256917763
WebpackPower User HomeuiStartup29322124555070929474664
load14081180274032513962453
domContentLoaded14081180274032513962452
domInteractive1072957911594379
firstPaint------
backgroundConnect1092755976121248
firstReactRender65421832367128
getState312751273258446829
initialActions208123
loadScripts13651095254629213572199
setupStore109675317195660
numNetworkReqs102643156082247
📊 Page Load Benchmark Results

Current Commit: a91ea96 | Date: 11/28/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: 722ms (±36ms) 🟢 | historical mean value: 723ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 76ms (±10ms) 🟢 | historical mean value: 78ms ⬇️ (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 722ms 36ms 701ms 989ms 751ms 989ms
firstPaint 76ms 10ms 60ms 164ms 84ms 164ms
firstContentfulPaint 76ms 10ms 60ms 164ms 84ms 164ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

@gauthierpetetin gauthierpetetin merged commit 20fc3c6 into release/13.12.0 Nov 28, 2025
175 of 176 checks passed
@gauthierpetetin gauthierpetetin deleted the runway-cherry-pick-13.12.0-1764328904 branch November 28, 2025 12:22
@github-actions github-actions bot locked and limited conversation to collaborators Nov 28, 2025
@metamaskbot metamaskbot added the release-13.12.0 Issue or pull request that will be included in release 13.12.0 label Nov 28, 2025
@metamaskbot
Copy link
Collaborator

No release label on PR. Adding release label release-13.12.0 on PR, as PR was cherry-picked in branch 13.12.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-13.12.0 Issue or pull request that will be included in release 13.12.0 team-bots Bot team (for MetaMask Bot, Runway Bot, etc.)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants