metamask-extension icon indicating copy to clipboard operation
metamask-extension copied to clipboard

feat(support): include canonical profile id in support request URLs

Open gauthierpetetin opened this issue 5 months ago • 5 comments

Description

Add metamask_canonical_profile_id to support links when users consent to share data, using a shared buildSupportLinkWithUserData helper.

Changelog

CHANGELOG entry: Adds metamask_canonical_profile_id to support links when users consent to share data

Related issues

Fixes: https://github.com/MetaMask/metamask-extension/issues/43777

Manual testing steps

  1. Go to menu > Support > Confirm (Share device details with support): this opens a new tab with the support website => confirm metamask_canonical_profile_id param is defined in the url
  2. Go to menu > Settings > About MetaMask > Visit our support center > Confirm (Share device details with support): this opens a new tab with the support website => confirm metamask_canonical_profile_id param is defined in the url
  3. Build Extension with ENABLE_SETTINGS_PAGE_DEV_OPTIONS=true in .metamaskrc. Go to menu > Settings > Debug > Generate a Page Crash > Contact support > Confirm (Share device details with support): this opens a new tab with the support website => confirm metamask_canonical_profile_id param is defined in the url

Screenshots/Recordings

NA

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, consent-gated change to support link query params with dedicated tests; no auth or payment logic touched.

Overview Adds metamask_canonical_profile_id to support URLs when the user accepts sharing device details, so support can correlate requests with the canonical identity profile.

Support link query building is centralized in buildSupportLinkWithUserData (shared/lib/build-support-link.ts), replacing duplicated URL/searchParams logic. The helper always sets metamask_version and optionally appends profile, canonical profile, MetaMetrics, and Shield IDs when values exist.

VisitSupportDataConsentModal and useHandleSubscriptionSupportAction now read canonicalProfileId from session data and pass it through the helper on accept/contact-support flows. Modal and helper unit tests assert the new param and that reject still omits identifying query params.

Reviewed by Cursor Bugbot for commit 0e5d50aa07afc3aff09581d0cfa47829a504af25. Bugbot is set up for automated code reviews on this repo. Configure here.

gauthierpetetin avatar Jun 23 '26 10:06 gauthierpetetin

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.

github-actions[bot] avatar Jun 23 '26 10:06 github-actions[bot]

✨ Files requiring CODEOWNER review ✨

🔐 @MetaMask/web3auth (1 files, +13 -14)
  • 📁 ui/
    • 📁 hooks/
      • 📁 subscription/
        • 📄 useSubscription.ts +13 -14

metamask-ci avatar Jun 23 '26 10:06 metamask-ci

Builds ready [b4ae065]
Deprecated Browserify fallback builds
⚡ Performance Benchmarks (Total: 🟢 15 pass · 🟡 9 warn · 🔴 0 fail)

Baseline (latest main): 0feee37 | Date: 6/23/2026 | Pipeline: 28018557016 | Baseline logs

Interaction Benchmarks · Samples: 5
Benchmarkchrome-webpackfirefox-webpack
loadNewAccount
[Sentry log · main/release]
🟡 [CI log]🟡 [CI log]
confirmTx
[Sentry log · main/release]
🟢 [CI log]🟡 [CI log]
bridgeUserActions
[Sentry log · main/release]
🟢 [CI log]🟢 [CI log]

📈 Results compared to the previous 5 runs on main

  • ↓ loadNewAccount/inp: -10%
  • ↑ confirmTx/inp: +27%
  • ↓ bridgeUserActions/bridge_load_page: -16%
  • ↑ bridgeUserActions/longTaskCount: +25%
  • ↑ bridgeUserActions/longTaskTotalDuration: +11%
  • ↓ bridgeUserActions/longTaskMaxDuration: -14%
  • ↓ bridgeUserActions/tbt: -19%
  • ↓ loadNewAccount/inp: -18%
  • ↑ loadNewAccount/lcp: +1171%
  • ↑ confirmTx/confirm_tx: +12%
  • ↓ confirmTx/longTaskCount: -100%
  • ↓ confirmTx/longTaskTotalDuration: -100%
  • ↓ confirmTx/longTaskMaxDuration: -100%
  • ↓ confirmTx/tbt: -100%
  • ↑ confirmTx/total: +12%
  • ↑ confirmTx/inp: +67%
  • ↑ confirmTx/lcp: +1253%
  • ↑ bridgeUserActions/bridge_load_page: +190%
  • ↑ bridgeUserActions/bridge_load_asset_picker: +12%
  • ↓ bridgeUserActions/longTaskCount: -100%
  • ↓ bridgeUserActions/longTaskTotalDuration: -100%
  • ↓ bridgeUserActions/longTaskMaxDuration: -100%
  • ↓ bridgeUserActions/tbt: -100%
  • ↑ bridgeUserActions/total: +13%
  • ↓ bridgeUserActions/inp: -12%
  • ↓ bridgeUserActions/fcp: -47%
  • ↑ bridgeUserActions/lcp: +1180%

🌐 Core Web Vitals — 🟢 good · 🟡 needs improvement · 🔴 poor (web.dev thresholds)

  • 🟡 loadNewAccount/FCP: p75 1.9s
  • 🟡 loadNewAccount/FCP: p75 1.8s
  • 🟡 confirmTx/FCP: p75 1.9s
Startup Benchmarks · Samples: 100
Benchmarkchrome-webpackfirefox-webpack
startupStandardHome
[Sentry log · main/release]
🟢 [CI log]🟢 [CI log]
startupPowerUserHome
[Sentry log · main/release]
–🟡 [CI log]

📈 Results compared to the previous 5 runs on main

  • ↓ startupStandardHome/domInteractive: -17%
  • ↓ startupStandardHome/fcp: -16%
  • ↑ startupPowerUserHome/uiStartup: +11%
  • ↑ startupPowerUserHome/domInteractive: +16%
  • ↓ startupPowerUserHome/backgroundConnect: -13%
  • ↑ startupPowerUserHome/inp: +23%
  • ↑ startupPowerUserHome/fcp: +12%

🌐 Core Web Vitals — 🟢 good · 🟡 needs improvement · 🔴 poor (web.dev thresholds)

  • 🟡 startupPowerUserHome/INP: p75 248ms
  • 🟡 startupPowerUserHome/LCP: p75 3.8s
User Journey Benchmarks · Samples: 5 · mock API
Benchmarkchrome-webpackfirefox-webpack
onboardingImportWallet
[Sentry log · main/release]
🟢 [CI log]🟢 [CI log]
onboardingNewWallet
[Sentry log · main/release]
🟢 [CI log]🟡 [CI log]
🟡 total
assetDetails
[Sentry log · main/release]
🟢 [CI log]🟡 [CI log]
solanaAssetDetails
[Sentry log · main/release]
🟢 [CI log]🟡 [CI log]
importSrpHome
[Sentry log · main/release]
🟢 [CI log]🟡 [CI log]
sendTransactions
[Sentry log · main/release]
🟡 [CI log]🟢 [CI log]
swap
[Sentry log · main/release]
🟢 [CI log]🟢 [CI log]

📈 Results compared to the previous 5 runs on main

  • ↓ onboardingImportWallet/metricsToWalletReadyScreen: -15%
  • ↓ onboardingImportWallet/doneButtonToHomeScreen: -81%
  • ↓ onboardingImportWallet/openAccountMenuToAccountListLoaded: -100%
  • ↓ onboardingImportWallet/longTaskCount: -77%
  • ↓ onboardingImportWallet/longTaskTotalDuration: -89%
  • ↓ onboardingImportWallet/longTaskMaxDuration: -85%
  • ↓ onboardingImportWallet/tbt: -95%
  • ↓ onboardingImportWallet/total: -85%
  • ↑ onboardingNewWallet/createPwToRecoveryScreen: +10%
  • ↑ onboardingNewWallet/skipBackupToMetricsScreen: +12%
  • ↑ onboardingNewWallet/agreeButtonToOnboardingSuccess: +15%
  • ↓ onboardingNewWallet/doneButtonToAssetList: -37%
  • ↓ onboardingNewWallet/longTaskCount: -44%
  • ↓ onboardingNewWallet/longTaskTotalDuration: -49%
  • ↓ onboardingNewWallet/longTaskMaxDuration: -20%
  • ↓ onboardingNewWallet/tbt: -44%
  • ↓ onboardingNewWallet/total: -32%
  • ↓ solanaAssetDetails/assetClickToPriceChart: -65%
  • ↓ solanaAssetDetails/total: -65%
  • ↑ solanaAssetDetails/cls: +17%
  • ↓ importSrpHome/openAccountMenuAfterLogin: -19%
  • ↓ importSrpHome/homeAfterImportWithNewWallet: -35%
  • ↓ importSrpHome/longTaskCount: -36%
  • ↓ importSrpHome/longTaskTotalDuration: -44%
  • ↓ importSrpHome/longTaskMaxDuration: -22%
  • ↓ importSrpHome/tbt: -52%
  • ↓ importSrpHome/total: -34%
  • ↓ importSrpHome/inp: -35%
  • ↓ importSrpHome/cls: -57%
  • ↑ sendTransactions/selectTokenToSendFormLoaded: +39%
  • ↑ sendTransactions/longTaskCount: +25%
  • ↓ sendTransactions/longTaskTotalDuration: -15%
  • ↓ sendTransactions/longTaskMaxDuration: -12%
  • ↓ sendTransactions/tbt: -27%
  • ↓ sendTransactions/inp: -17%
  • ↓ sendTransactions/cls: -90%

🌐 Core Web Vitals — 🟢 good · 🟡 needs improvement · 🔴 poor (web.dev thresholds)

  • 🟡 sendTransactions/FCP: p75 1.8s
  • 🟡 assetDetails/INP: p75 216ms
  • 🟡 assetDetails/FCP: p75 2.0s
  • 🟡 solanaAssetDetails/FCP: p75 2.0s
  • 🟡 importSrpHome/FCP: p75 1.9s
Dapp Page Load Benchmarks · Samples: 100
Benchmarkchrome-webpack
dappPageLoad
[Sentry log · main/release]
🟢 [CI log]
Bundle size diffs
  • background: 68 Bytes (0%)
  • ui: 626 Bytes (0%)
  • common: 0 Bytes (0%)
  • other: 0 Bytes (0%)
  • contentScripts: 14 Bytes (0%)
  • zip: 252 Bytes (0%)

metamask-ci avatar Jun 23 '26 10:06 metamask-ci

Builds ready [0e5d50a]
Deprecated Browserify fallback builds
⚡ Performance Benchmarks (Total: 🟢 10 pass · 🟡 14 warn · 🔴 0 fail)

Baseline (latest main): 6dcfdc2 | Date: 6/23/2026 | Pipeline: 28026153521 | Baseline logs

Interaction Benchmarks · Samples: 5
Benchmarkchrome-webpackfirefox-webpack
loadNewAccount
[Sentry log · main/release]
🟡 [CI log]🟢 [CI log]
confirmTx
[Sentry log · main/release]
🟡 [CI log]🟡 [CI log]
bridgeUserActions
[Sentry log · main/release]
🟢 [CI log]🟡 [CI log]

📈 Results compared to the previous 5 runs on main

  • ↑ loadNewAccount/load_new_account: +12%
  • ↑ loadNewAccount/total: +12%
  • ↓ loadNewAccount/inp: -21%
  • ↑ confirmTx/longTaskCount: +33%
  • ↑ confirmTx/longTaskTotalDuration: +30%
  • ↑ confirmTx/tbt: +16%
  • ↑ confirmTx/fcp: +10%
  • ↑ bridgeUserActions/longTaskCount: +67%
  • ↑ bridgeUserActions/longTaskTotalDuration: +56%
  • ↑ bridgeUserActions/tbt: +20%
  • ↓ bridgeUserActions/inp: -17%
  • ↑ loadNewAccount/inp: +14%
  • ↓ loadNewAccount/fcp: -48%
  • ↑ loadNewAccount/lcp: +1150%
  • ↑ confirmTx/confirm_tx: +12%
  • ↓ confirmTx/longTaskCount: -100%
  • ↓ confirmTx/longTaskTotalDuration: -100%
  • ↓ confirmTx/longTaskMaxDuration: -100%
  • ↓ confirmTx/tbt: -100%
  • ↑ confirmTx/total: +12%
  • ↑ confirmTx/lcp: +1165%
  • ↑ bridgeUserActions/bridge_load_page: +200%
  • ↑ bridgeUserActions/bridge_load_asset_picker: +33%
  • ↑ bridgeUserActions/bridge_search_token: +14%
  • ↓ bridgeUserActions/longTaskCount: -100%
  • ↓ bridgeUserActions/longTaskTotalDuration: -100%
  • ↓ bridgeUserActions/longTaskMaxDuration: -100%
  • ↓ bridgeUserActions/tbt: -100%
  • ↑ bridgeUserActions/total: +47%
  • ↑ bridgeUserActions/inp: +30%
  • ↑ bridgeUserActions/lcp: +1192%

🌐 Core Web Vitals — 🟢 good · 🟡 needs improvement · 🔴 poor (web.dev thresholds)

  • 🟡 loadNewAccount/FCP: p75 1.8s
  • 🟡 confirmTx/FCP: p75 1.9s
  • 🟡 confirmTx/FCP: p75 1.8s
  • 🟡 bridgeUserActions/FCP: p75 1.9s
Startup Benchmarks · Samples: 100
Benchmarkchrome-webpackfirefox-webpack
startupStandardHome
[Sentry log · main/release]
🟢 [CI log]🟡 [CI log]
🟡 loadScripts
startupPowerUserHome
[Sentry log · main/release]
–🟡 [CI log]

📈 Results compared to the previous 5 runs on main

  • ↓ startupStandardHome/uiStartup: -35%
  • ↓ startupStandardHome/load: -35%
  • ↓ startupStandardHome/domContentLoaded: -36%
  • ↓ startupStandardHome/domInteractive: -32%
  • ↓ startupStandardHome/firstPaint: -20%
  • ↓ startupStandardHome/backgroundConnect: -36%
  • ↓ startupStandardHome/firstReactRender: -34%
  • ↓ startupStandardHome/initialActions: -33%
  • ↓ startupStandardHome/loadScripts: -36%
  • ↓ startupStandardHome/setupStore: -31%
  • ↓ startupStandardHome/numNetworkReqs: -29%
  • ↓ startupStandardHome/longTaskCount: -33%
  • ↓ startupStandardHome/longTaskTotalDuration: -42%
  • ↓ startupStandardHome/longTaskMaxDuration: -39%
  • ↓ startupStandardHome/tbt: -45%
  • ↓ startupStandardHome/inp: -28%
  • ↓ startupStandardHome/fcp: -34%
  • ↑ startupStandardHome/lcp: +186%
  • ↑ startupStandardHome/domInteractive: +14%
  • ↑ startupStandardHome/fcp: +15%
  • ↓ startupPowerUserHome/backgroundConnect: -15%

🌐 Core Web Vitals — 🟢 good · 🟡 needs improvement · 🔴 poor (web.dev thresholds)

  • 🟡 startupPowerUserHome/INP: p75 224ms
  • 🟡 startupPowerUserHome/LCP: p75 3.6s
User Journey Benchmarks · Samples: 5 · mock API
Benchmarkchrome-webpackfirefox-webpack
onboardingImportWallet
[Sentry log · main/release]
🟢 [CI log]🟢 [CI log]
onboardingNewWallet
[Sentry log · main/release]
🟢 [CI log]🟡 [CI log]
🟡 total
assetDetails
[Sentry log · main/release]
🟡 [CI log]🟡 [CI log]
solanaAssetDetails
[Sentry log · main/release]
🟡 [CI log]🟡 [CI log]
importSrpHome
[Sentry log · main/release]
🟢 [CI log]🟡 [CI log]
sendTransactions
[Sentry log · main/release]
🟡 [CI log]🟡 [CI log]
swap
[Sentry log · main/release]
🟢 [CI log]🟢 [CI log]

📈 Results compared to the previous 5 runs on main

  • ↓ onboardingImportWallet/metricsToWalletReadyScreen: -23%
  • ↓ onboardingImportWallet/doneButtonToHomeScreen: -81%
  • ↓ onboardingImportWallet/openAccountMenuToAccountListLoaded: -92%
  • ↓ onboardingImportWallet/longTaskCount: -52%
  • ↓ onboardingImportWallet/longTaskTotalDuration: -85%
  • ↓ onboardingImportWallet/longTaskMaxDuration: -88%
  • ↓ onboardingImportWallet/tbt: -98%
  • ↓ onboardingImportWallet/total: -84%
  • ↑ onboardingNewWallet/createPwToRecoveryScreen: +13%
  • ↓ onboardingNewWallet/doneButtonToAssetList: -16%
  • ↓ onboardingNewWallet/longTaskCount: -50%
  • ↓ onboardingNewWallet/longTaskTotalDuration: -55%
  • ↓ onboardingNewWallet/longTaskMaxDuration: -28%
  • ↓ onboardingNewWallet/tbt: -55%
  • ↓ onboardingNewWallet/total: -14%
  • ↓ solanaAssetDetails/assetClickToPriceChart: -60%
  • ↓ solanaAssetDetails/total: -60%
  • ↑ solanaAssetDetails/inp: +12%
  • ↑ solanaAssetDetails/fcp: +16%
  • ↓ importSrpHome/loginToHomeScreen: -19%
  • ↓ importSrpHome/homeAfterImportWithNewWallet: -34%
  • ↓ importSrpHome/longTaskCount: -20%
  • ↓ importSrpHome/longTaskTotalDuration: -40%
  • ↓ importSrpHome/longTaskMaxDuration: -20%
  • ↓ importSrpHome/tbt: -45%
  • ↓ importSrpHome/total: -32%
  • ↓ importSrpHome/inp: -38%
  • ↓ importSrpHome/cls: -46%
  • ↓ sendTransactions/longTaskCount: -100%
  • ↓ sendTransactions/longTaskTotalDuration: -100%
  • ↓ sendTransactions/longTaskMaxDuration: -100%
  • ↓ sendTransactions/tbt: -100%
  • ↓ sendTransactions/inp: -30%
  • ↑ sendTransactions/fcp: +15%
  • ↓ sendTransactions/cls: -91%

🌐 Core Web Vitals — 🟢 good · 🟡 needs improvement · 🔴 poor (web.dev thresholds)

  • 🟡 assetDetails/FCP: p75 1.8s
  • 🟡 solanaAssetDetails/FCP: p75 1.8s
  • 🟡 sendTransactions/FCP: p75 2.1s
  • 🟡 assetDetails/FCP: p75 1.9s
  • 🟡 solanaAssetDetails/FCP: p75 1.8s
  • 🟡 importSrpHome/FCP: p75 2.0s
  • 🟡 sendTransactions/FCP: p75 1.9s
Dapp Page Load Benchmarks · Samples: 100
Benchmarkchrome-webpack
dappPageLoad
[Sentry log · main/release]
🟢 [CI log]
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 2.87 KiB (0.03%)
  • ui: 826 Bytes (0%)
  • common: 0 Bytes (0%)
  • other: 0 Bytes (0%)
  • contentScripts: 38 Bytes (0%)
  • zip: -2.32 KiB (-0.01%)

metamask-ci avatar Jun 23 '26 12:06 metamask-ci