Skip to content

test(rewards): clarify referral dialog dismissal - #47885

Closed
davidmurdoch wants to merge 1 commit into
david/shared-modal-layerfrom
david/referral-dialog-review-followup
Closed

davidmurdoch wants to merge 1 commit into
david/shared-modal-layerfrom
david/referral-dialog-review-followup

Conversation

@davidmurdoch

Copy link
Copy Markdown
Contributor

Description

Follow-up to #47682. Track the missing MMDS priority-overlay support in MetaMask/metamask-design-system#1685 and link it from ReferralDialog, including when the native adapter can return to the shared modal shell.

Split the combined dismissal test into separate mouse, Escape, and native-cancel cases. Each dismissal now explicitly expects one callback. The Escape case also asserts that the keydown default is prevented and background document listeners are not notified. Document why the keydown handler is needed.

This changes documentation and tests; dialog behavior stays the same.

Validation: the five ReferralDialog unit tests and yarn lint:changed:fix passed. git diff --check passed. Tests used the existing installed dependencies in a sparse worktree. Manual Extension verification was not performed for this follow-up.

Changelog

CHANGELOG entry: null

Related issues

Related: #47682

Tracks: MetaMask/metamask-design-system#1685

Manual testing steps

  1. With an eligible wallet and the referral feature enabled, open a referral invitation over a destination dialog, such as Token Insights.
  2. Press Escape. Verify that the referral closes and the destination dialog remains open.
  3. Reopen the invitation and click its backdrop. Verify that only the referral closes.

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 where applicable.
  • I've documented the modal adapter and Escape handling.
  • I've applied the right labels on the PR.

Pre-merge reviewer checklist

  • I've manually tested the PR.
  • I confirm that this PR addresses the review follow-up and includes the necessary testing evidence.

@davidmurdoch davidmurdoch added team-extension-platform Extension Platform team no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed labels Nov 12, 2026
@davidmurdoch davidmurdoch self-assigned this Nov 12, 2026
@github-actions

Copy link
Copy Markdown
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.

@metamask-ci

metamask-ci Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor
Builds ready [8af104c]
⚡ Performance Benchmarks (Total: 🟢 8 pass · 🟡 2 warn · 🔴 3 fail)

Baseline (latest main): f693520 | Date: 11/3/2026 | Pipeline: 43251654214 | Baseline logs

Metricschrome-webpackfirefox-webpack
loadNewAccount
[Sentry log · main/release]
🔴 load_new_account(p95) [CI log]🔴 load_new_account(p95) [CI log]
onboardingImportWallet
[Sentry log · main/release]
🟢 [CI log]🔴 [CI log]

Regressions (🔴 3 failures)

Interaction Benchmarks · Samples: 5 🔴 2
Benchmarkchrome-webpackfirefox-webpack
loadNewAccount
[Sentry log · main/release]
🔴 [CI log]
🔴 load_new_account
🔴 [CI log]
🔴 load_new_account
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: +179%
  • ↑ loadNewAccount/total: +179%
  • ↓ loadNewAccount/inp: -48%
  • ↓ loadNewAccount/fcp: -32%
  • ↑ loadNewAccount/lcp: +564%
  • ↑ loadNewAccount/cls: +294%
  • ↑ confirmTx/longTaskCount: +33%
  • ↓ confirmTx/tbt: -15%
  • ↓ confirmTx/inp: -52%
  • ↓ confirmTx/fcp: -35%
  • ↑ confirmTx/lcp: +555%
  • ↓ confirmTx/cls: -14%
  • ↓ bridgeUserActions/longTaskTotalDuration: -31%
  • ↓ bridgeUserActions/longTaskMaxDuration: -37%
  • ↓ bridgeUserActions/tbt: -65%
  • ↓ bridgeUserActions/inp: -26%
  • ↓ bridgeUserActions/fcp: -36%
  • ↑ bridgeUserActions/lcp: +535%
  • ↑ bridgeUserActions/cls: +387%
  • ↑ loadNewAccount/load_new_account: +182%
  • ↑ loadNewAccount/total: +182%
  • ↓ loadNewAccount/inp: -25%
  • ↑ loadNewAccount/fcp: +20%
  • ↑ loadNewAccount/lcp: +1223%
  • ↓ confirmTx/longTaskCount: -100%
  • ↓ confirmTx/longTaskTotalDuration: -100%
  • ↓ confirmTx/longTaskMaxDuration: -100%
  • ↓ confirmTx/tbt: -100%
  • ↓ confirmTx/inp: -21%
  • ↑ confirmTx/fcp: +17%
  • ↑ confirmTx/lcp: +1269%
  • ↑ bridgeUserActions/bridge_load_page: +219%
  • ↑ bridgeUserActions/bridge_load_asset_picker: +113%
  • ↓ bridgeUserActions/longTaskCount: -100%
  • ↓ bridgeUserActions/longTaskTotalDuration: -100%
  • ↓ bridgeUserActions/longTaskMaxDuration: -100%
  • ↓ bridgeUserActions/tbt: -100%
  • ↑ bridgeUserActions/total: +28%
  • ↑ bridgeUserActions/inp: +62%
  • ↓ bridgeUserActions/fcp: -33%
  • ↑ bridgeUserActions/lcp: +1264%

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

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

📈 Results compared to the previous 5 runs on main

  • ↑ startupStandardHome/uiStartup: +50%
  • ↑ startupStandardHome/load: +76%
  • ↑ startupStandardHome/domContentLoaded: +77%
  • ↓ startupStandardHome/firstPaint: -45%
  • ↓ startupStandardHome/backgroundConnect: -11%
  • ↓ startupStandardHome/firstReactRender: -98%
  • ↓ startupStandardHome/initialActions: -29%
  • ↑ startupStandardHome/loadScripts: +75%
  • ↑ startupStandardHome/setupStore: +62%
  • ↑ startupStandardHome/longTaskTotalDuration: +72%
  • ↑ startupStandardHome/longTaskMaxDuration: +86%
  • ↑ startupStandardHome/tbt: +88%
  • ↓ startupStandardHome/inp: -11%
  • ↓ startupStandardHome/fcp: -55%
  • ↑ startupStandardHome/lcp: +103%
  • ↓ startupStandardHome/cls: -72%
  • ↓ startupStandardHome/domInteractive: -14%
  • ↑ startupStandardHome/backgroundConnect: +11%
  • ↓ startupStandardHome/firstReactRender: -98%
  • ↓ startupStandardHome/initialActions: -50%
  • ↓ startupStandardHome/fcp: -11%
User Journey Benchmarks · Samples: 5 · mock API 🔴 1
Benchmarkchrome-webpackfirefox-webpack
onboardingImportWallet
[Sentry log · main/release]
🟢 [CI log]🔴 [CI log]
🔴 total
onboardingNewWallet
[Sentry log · main/release]
🟢 [CI log]🟢 [CI log]

📈 Results compared to the previous 5 runs on main

  • ↑ onboardingImportWallet/srpButtonToSrpForm: +11%
  • ↑ onboardingImportWallet/confirmSrpToPwForm: +24%
  • ↑ onboardingImportWallet/pwFormToMetricsScreen: +58%
  • ↑ onboardingImportWallet/metricsToWalletReadyScreen: +16%
  • ↓ onboardingImportWallet/doneButtonToHomeScreen: -91%
  • ↓ onboardingImportWallet/openAccountMenuToAccountListLoaded: -73%
  • ↓ onboardingImportWallet/longTaskCount: -100%
  • ↓ onboardingImportWallet/longTaskTotalDuration: -100%
  • ↓ onboardingImportWallet/longTaskMaxDuration: -100%
  • ↓ onboardingImportWallet/tbt: -100%
  • ↓ onboardingImportWallet/total: -85%
  • ↑ onboardingNewWallet/createPwToRecoveryScreen: +18%
  • ↓ onboardingNewWallet/agreeButtonToOnboardingSuccess: -19%
  • ↓ onboardingNewWallet/doneButtonToAssetList: -76%
  • ↓ onboardingNewWallet/longTaskCount: -100%
  • ↓ onboardingNewWallet/longTaskTotalDuration: -100%
  • ↓ onboardingNewWallet/longTaskMaxDuration: -100%
  • ↓ onboardingNewWallet/tbt: -100%
  • ↓ onboardingNewWallet/total: -73%
Dapp Page Load Benchmarks · Samples: 100
Benchmarkchrome-webpack
dappPageLoad
[Sentry log · main/release]
🟢 [CI log]

📈 Results compared to the previous 5 runs on main

  • ↓ dappPageLoad/pageLoadTime: -52%
  • ↓ dappPageLoad/firstPaint: -33%
  • ↓ dappPageLoad/firstContentfulPaint: -33%
Bundle Size Diffs [🚨 Warning! Bundle size has increased!]
Status Bundle Total Diff Change
🚨 background 15.22 MiB +1.34 KiB +0.01%
🚨 ui 19.53 MiB +29.47 KiB +0.15%
✅ common 0 Bytes 0 Bytes 0.00%
✅ other 4.46 MiB +109 Bytes 0.00%
✅ content scripts 3.22 MiB +218 Bytes +0.01%
🚨 unzipped 79.96 MiB +31.5 KiB +0.04%
🚨 zip 24.02 MiB +8.91 KiB +0.04%

@sonarqubecloud

Copy link
Copy Markdown

@davidmurdoch

Copy link
Copy Markdown
Contributor Author

Superseded by #47890, which now targets david/shared-modal-layer (#47682) directly and includes all changes from this PR: the separate mouse/Escape/native-cancellation tests and the MMDS tracking documentation. No commits or branches were deleted. The remaining ordinary PR chain is #47665 → #47682 → #47890; native stack metadata was removed to preserve the existing auto-merge on #47665.

@github-actions github-actions Bot locked and limited conversation to collaborators Nov 12, 2026

This branch was previously deployed

1 inactive deployment
pr-comment — 8af104c2 Deployed Nov 12, 2026 by davidmurdoch via Publish prerelease / Publish prerelease #174374
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 size-S team-extension-platform Extension Platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant