Skip to content

feat: add network picker deeplink cp-13.18.0#39676

Merged
Prithpal-Sooriya merged 8 commits intomainfrom
cursor/deeplink-network-picker-modal-6fcb
Feb 9, 2026
Merged

feat: add network picker deeplink cp-13.18.0#39676
Prithpal-Sooriya merged 8 commits intomainfrom
cursor/deeplink-network-picker-modal-6fcb

Conversation

@Prithpal-Sooriya
Copy link
Contributor

@Prithpal-Sooriya Prithpal-Sooriya commented Jan 30, 2026

Description

Add deeplink support to open the network picker modal on the home page when a specific query parameter is present.

Deeplink: https://link.metamask.io/home?openNetworkSelector=true

Open in GitHub Codespaces

Changelog

CHANGELOG entry: feat: add network picker deeplink

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/ASSETS-2571

Manual testing steps

  1. "Click" on deeplink: https://link.metamask.io/home?openNetworkSelector=true
  2. EXPECTED: Opens network picker

Screenshots/Recordings

Before

After

https://www.loom.com/share/2f9ed061070d4c07a12e49779482db8d

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.

Open in Cursor Open in Web


Note

Low Risk
Scoped to home-page query param handling and a single Redux UI toggle, with param validation and cleanup plus targeted tests.

Overview
Adds deep-link support for opening the network selector from https://link.metamask.io/home?openNetworkSelector=true.

Updates the shared home deep-link route handler to recognize openNetworkSelector (accepting true/1) and forward it as a normalized openNetworkSelector=true query to the in-app DEFAULT_ROUTE, covered by a new unit test.

Introduces useHomeDeepLinkEffects/HomeDeepLinkActions on the UI home page to read the query param, dispatch toggleNetworkMenu() when on the home route and the menu isn’t already open, then clear the deep-link params; adds React tests for the hook and ghost component across key scenarios.

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

Co-authored-by: prithpal.sooriya <prithpal.sooriya@consensys.net>
@cursor
Copy link

cursor bot commented Jan 30, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@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.

@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Jan 30, 2026

✨ Files requiring CODEOWNER review ✨

🔑 @MetaMask/accounts-engineers (2 files, +208 -3)
  • 📁 ui/
    • 📁 components/
      • 📁 multichain/
        • 📁 account-overview/
          • 📄 account-overview-tabs.test.tsx +138 -1
          • 📄 account-overview-tabs.tsx +70 -2

👨‍🔧 @MetaMask/core-extension-ux (2 files, +208 -3)
  • 📁 ui/
    • 📁 components/
      • 📁 multichain/
        • 📁 account-overview/
          • 📄 account-overview-tabs.test.tsx +138 -1
          • 📄 account-overview-tabs.tsx +70 -2

@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Jan 30, 2026

Builds ready [5c69415]
UI Startup Metrics (1284 ± 107 ms)
PlatformBuildTypePageMetricTest Title (ms)Persona (ms)Mean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--12841031160410713501490
load--1086883135010311481264
domContentLoaded--1079879134410111371257
domInteractive--241598182176
firstPaint--1396339367189262
backgroundConnect--22721028911230249
firstReactRender--16103441828
initialActions--108113
loadScripts--86667111141009261048
setupStore--1363051521
numNetworkReqs--221584181575
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--24221519599591125534848
load--1125939180316611901477
domContentLoaded--1106928178615911741443
domInteractive--39182804333155
firstPaint--2257814932912231309
backgroundConnect--58328527185256121887
firstReactRender--25165882742
initialActions--104113
loadScripts--86970314611469251185
setupStore--1574871731
numNetworkReqs--1254925449153239
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--817669106491877996
load--67158398780720830
domContentLoaded--66657998179716825
domInteractive--241480162272
firstPaint--936021039103184
backgroundConnect--38161332649104
firstReactRender--1493241525
initialActions--103111
loadScripts--66357897979714817
setupStore--1062831119
numNetworkReqs--221587181675
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--1259931234927014221814
load--71361811861127021007
domContentLoaded--70461111671126901000
domInteractive--37192393334106
firstPaint--1546749286205332
backgroundConnect--16012948159154337
firstReactRender--22184742431
initialActions--102111
loadScripts--7016101146110688991
setupStore--1142031318
numNetworkReqs--1194830754135262
19--------
FirefoxBrowserifyStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--13591114203618314541774
load--1098939179512711631343
domContentLoaded--1097938179512711631343
domInteractive--63322083986144
firstPaint--------
backgroundConnect--59242194474169
firstReactRender--1494371337
initialActions--103122
loadScripts--1069924168111311301254
setupStore--13523726932
numNetworkReqs--231287181879
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--29491981834187030734054
load--13781118236827114392051
domContentLoaded--13771118236827114382051
domInteractive--16953601136180542
firstPaint--------
backgroundConnect--52111649475646991311
firstReactRender--22153542429
initialActions--213123
loadScripts--12951092234321613531788
setupStore--18384989505158571
numNetworkReqs--89382564698198
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--16631374227118917802007
load--14171196170711915061642
domContentLoaded--14161196170711915051642
domInteractive--852923348128172
firstPaint--------
backgroundConnect--65231834183146
firstReactRender--14114841519
initialActions--103122
loadScripts--13771157163510814541564
setupStore--235298501499
numNetworkReqs--231286171876
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--318523378674105133184644
load--17211274708788417212624
domContentLoaded--17211273708688417212624
domInteractive--145361203153138487
firstPaint--------
backgroundConnect--42911229833875851152
firstReactRender--23166172533
initialActions--207123
loadScripts--16741250705188016522575
setupStore--16210788192208594
numNetworkReqs--85392895286213
19--------
📊 Page Load Benchmark Results

Current Commit: 5c69415 | Date: 1/30/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.04s (±41ms) 🟡 | historical mean value: 1.03s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 728ms (±38ms) 🟢 | historical mean value: 718ms ⬆️ (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.04s 41ms 1.02s 1.37s 1.07s 1.37s
domContentLoaded 728ms 38ms 706ms 1.03s 755ms 1.03s
firstPaint 77ms 10ms 64ms 164ms 84ms 164ms
firstContentfulPaint 77ms 10ms 64ms 164ms 84ms 164ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 58 Bytes (0%)
  • ui: 2.59 KiB (0.03%)
  • common: 908 Bytes (0.01%)

@Prithpal-Sooriya Prithpal-Sooriya changed the title Deeplink network picker modal feat: add network picker deeplink Feb 5, 2026
This commit introduces a new deep link handling mechanism for the `openNetworkSelector` parameter in the home route. The changes include:

- Updated the `HomeQueryParams` enum to rename `OpenNetworkPicker` to `OpenNetworkSelector`.
- Enhanced the `homeRoute.handler` to process the `openNetworkSelector` parameter correctly.
- Added unit tests for the `homeRoute` to validate the behavior of the `openNetworkSelector` parameter.
- Implemented a custom hook `useHomeDeepLinkEffects` in `AccountOverviewTabs` to manage the opening of the network selector based on the deep link parameters.

These updates improve the user experience by allowing the network selector to be opened directly via deep links, enhancing navigation and functionality within the application.
…effects

This commit adds a new `HomeDeepLinkActions` component that encapsulates the `useHomeDeepLinkEffects` hook, allowing for better management of deep link actions on the home route. The component is integrated into the home page layout, ensuring that deep link parameters are processed correctly. Additionally, unit tests are included to validate the behavior of the deep link handling logic, enhancing the overall functionality and user experience of the application.
@Prithpal-Sooriya Prithpal-Sooriya force-pushed the cursor/deeplink-network-picker-modal-6fcb branch from d639f87 to 1687cd8 Compare February 5, 2026 22:26
…ests

This commit updates the test for the `homeRoute.handler` to ensure it correctly handles the `openNetworkSelector` parameter. The logic for creating URL search parameters has been adjusted to use a more explicit check for `undefined`, improving clarity and correctness in the test cases. Additionally, the import statement for `DEFAULT_ROUTE` in `HomeDeepLinkActions.tsx` has been restored to maintain consistency in the codebase.
This commit modifies the `HomeDeepLinkActions.test.tsx` file to include a configuration for the `MemoryRouter` that suppresses warnings related to future React Router features. Additionally, the baseline console warnings have been updated to reflect the removal of warnings from the home deep link tests.
@Prithpal-Sooriya Prithpal-Sooriya marked this pull request as ready for review February 5, 2026 22:51
@Prithpal-Sooriya Prithpal-Sooriya requested a review from a team as a code owner February 5, 2026 22:51
Comment on lines +907 to +908
{/* Ghost component that manages the useHomeDeepLinkEffects */}
<HomeDeepLinkActions />
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Using a stable ghost component as this is a very heavy JS Class Component.

This allows us to keep the new underlying logic nice and composable using hooks, but has interoperability with this class component.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can probs kill the ghost component once this is migrated over to a functional component.

Copy link
Contributor

Choose a reason for hiding this comment

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

This is perfectly fine. Did the same approach on one of the excessively re-rendering components in the account overview component.

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.

@Prithpal-Sooriya Prithpal-Sooriya changed the title feat: add network picker deeplink feat: add network picker deeplink cp-13.18.0 Feb 6, 2026
@Prithpal-Sooriya Prithpal-Sooriya added this pull request to the merge queue Feb 9, 2026
Merged via the queue into main with commit 00976f3 Feb 9, 2026
354 of 358 checks passed
@Prithpal-Sooriya Prithpal-Sooriya deleted the cursor/deeplink-network-picker-modal-6fcb branch February 9, 2026 11:31
@github-actions github-actions bot locked and limited conversation to collaborators Feb 9, 2026
@metamaskbot metamaskbot added the release-13.19.0 Issue or pull request that will be included in release 13.19.0 label Feb 9, 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-M team-assets

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants