Skip to content

Conversation

@andrepimenta
Copy link
Member

@andrepimenta andrepimenta commented Nov 7, 2025

Description

This PR adds a deep link handler for the Predict page, enabling redirection from https://link.metamask.io/predict to https://metamask.io/predict with query parameter preservation.

Open in GitHub Codespaces

Changelog

CHANGELOG entry: Add Predict deeplink handler

Related issues

Fixes:

Manual testing steps

  1. Go to https://link.metamask.io/predict
  2. Should be routed to https://metamask.io/predict
  3. Test with query parameters: https://link.metamask.io/predict?param=value
  4. Verify parameters are preserved in the redirect

Screenshots/Recordings

predict.extension.deeplink.mov

Pre-merge author checklist

  • I've followed MetaMask Contributor Docs and MetaMask Extension Coding Standards.
  • 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 format if applicable
  • I've applied the right labels on the PR (see labeling guidelines). 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.

Note

Adds deep link support for /predict, redirecting to metamask.io/predict with query params preserved, plus i18n strings and e2e tests.

  • Deep Links:
    • Add new route shared/lib/deep-links/routes/predict.ts that redirects /predict to BaseUrl.MetaMask/predict, preserving query params.
    • Register route in shared/lib/deep-links/routes/index.ts via addRoute(predict).
  • Localization:
    • Add deepLink_thePredictPage message key to app/_locales/en/messages.json and app/_locales/en_GB/messages.json.
  • Tests:
    • Extend test/e2e/tests/deep-link/deep-link.spec.ts with a case verifying signed/unsigned /predict redirects to ${BaseUrl.MetaMask}/predict.

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

- Create predict route handler to redirect link.metamask.io/predict to metamask.io/predict
- Register predict route in deep links routes map
- Add E2E test for predict route redirect (signed and unsigned flows)
- Add localization keys for predict page title (en, en_GB, ga)
@metamaskbot metamaskbot added the team-mobile-platform Mobile Platform team label Nov 7, 2025
@andrepimenta andrepimenta added no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed size-S team-predict Predict team labels Nov 7, 2025
@metamaskbot
Copy link
Collaborator

Builds ready [57a885d]
UI Startup Metrics (1209 ± 92 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup1209106415459212661390
load103788612878310881214
domContentLoaded103188112678210831206
domInteractive201482111846
firstPaint56492128040010281125
backgroundConnect2282152588232242
firstReactRender2918111133046
getState21767102639
initialActions001001
loadScripts808652102982858980
setupStore1172741319
numNetworkReqs1367719672
BrowserifyPower User HomeuiStartup19671771258027922862580
load1044914141818313231418
domContentLoaded1036908140818013181408
domInteractive281574184674
firstPaint62580143846910041438
backgroundConnect23922326613246266
firstReactRender30254563745
getState17815321117193211
initialActions001011
loadScripts810683118117810881181
setupStore15103771737
numNetworkReqs1207625071227250
WebpackStandard HomeuiStartup786668119184798947
load55951697071552717
domContentLoaded55251095768546704
domInteractive16127991436
firstPaint21253875205186672
backgroundConnect251275122851
firstReactRender291897103436
getState1162231316
initialActions001001
loadScripts54950894967544696
setupStore1253551325
numNetworkReqs1467520874
WebpackPower User HomeuiStartup11551044163414511871634
load59252779892678798
domContentLoaded57951776285645762
domInteractive27121453337145
firstPaint30654765229525765
backgroundConnect5691745672174
firstReactRender24222922529
getState1318615021141150
initialActions001001
loadScripts57551675282635752
setupStore1163381233
numNetworkReqs1066717139163171
FirefoxBrowserifyStandard HomeuiStartup14871279201412215371686
load1264111216348913201437
domContentLoaded1264111216348913201437
domInteractive1163432550123216
firstPaint------
backgroundConnect4524179205087
firstReactRender26227162732
getState9419719718
initialActions001001
loadScripts1238109616068612931384
setupStore147184181231
numNetworkReqs1266815857
BrowserifyPower User HomeuiStartup23782125294821225332948
load13781116177622616901776
domContentLoaded13771116177622616891776
domInteractive19456471141393471
firstPaint------
backgroundConnect10035463104129463
firstReactRender463168115868
getState1217117629145176
initialActions101011
loadScripts13451098173021216591730
setupStore18542122842
numNetworkReqs1307019956193199
WebpackStandard HomeuiStartup16221433207712616711923
load13871209164410114541601
domContentLoaded13871209164310114531601
domInteractive1023134141114151
firstPaint------
backgroundConnect50241362654117
firstReactRender29226983041
getState10417619844
initialActions002011
loadScripts1354119016049414151542
setupStore14680131348
numNetworkReqs1366817765
WebpackPower User HomeuiStartup25662213353140326243531
load15031283210723917632107
domContentLoaded15021283210623917622106
domInteractive18139704182374704
firstPaint------
backgroundConnect10131453103116453
firstReactRender42345364753
getState1417628347169283
initialActions102112
loadScripts14651263206122617142061
setupStore3171603931160
numNetworkReqs1336831578210315
📊 Page Load Benchmark Results

Current Commit: 57a885d | Date: 11/7/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

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

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.03s 38ms 1.01s 1.31s 1.06s 1.31s
domContentLoaded 718ms 35ms 698ms 983ms 739ms 983ms
firstPaint 76ms 11ms 60ms 164ms 84ms 164ms
firstContentfulPaint 76ms 11ms 60ms 164ms 84ms 164ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 58 Bytes (0%)
  • ui: 606 Bytes (0.01%)
  • common: 962 Bytes (0.01%)

@andrepimenta andrepimenta added this pull request to the merge queue Nov 7, 2025
@DDDDDanica
Copy link
Contributor

LGTM !

Merged via the queue into main with commit b0b0e76 Nov 7, 2025
173 checks passed
@andrepimenta andrepimenta deleted the feat/add-predict-deeplink-handler branch November 7, 2025 18:27
@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

no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed release-13.10.0 Issue or pull request that will be included in release 13.10.0 size-S team-mobile-platform Mobile Platform team team-predict Predict team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants