Skip to content

feat: perps toast display for order close and modify#41489

Merged
aganglada merged 6 commits intomainfrom
feat/toast-order-close-modify
Apr 7, 2026
Merged

feat: perps toast display for order close and modify#41489
aganglada merged 6 commits intomainfrom
feat/toast-order-close-modify

Conversation

@geositta
Copy link
Copy Markdown
Contributor

@geositta geositta commented Apr 5, 2026

Description

This pull request fixes missing toast feedback for perps actions launched from modal-based position management flows. Users already saw toast feedback when opening long or short positions from the main trading flow, but modal actions like close and reverse position could complete without equivalent feedback, creating an inconsistent and lower-confidence UX.

The change wires close-position and reverse-position modals into the perps toast system, so users now get in-progress, success, and failure feedback for those actions. It also refines close-position copy to match the product model more closely by distinguishing full close from partial close, including parity-aligned partial-close messaging such as “Partially closing position” and “Position partially closed.” Existing TP/SL and margin toast behavior remains intact, and regression coverage was expanded to lock in the new toast states and copy.

Changelog

CHANGELOG entry: null

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/TAT-2840

Manual testing steps

Feature: Perps modal toast parity
Scenario: Open a Long from Perps home shows existing open-order toasts
Given I am on the Perps home screen
And I have enough balance to open a position
When I open a Long position from the home screen
Then I should see the existing order submission toast behavior
And after the action completes I should see the existing success toast behavior

Scenario: Open a Short from Explore search shows existing open-order toasts
  Given I am on the Explore search flow
  And I navigate to a Perps market
  And I have enough balance to open a position
  When I open a Short position from the search flow
  Then I should see the existing order submission toast behavior
  And after the action completes I should see the existing success toast behavior

Scenario: Full close of a Long from the close-position modal shows full-close copy
  Given I already have an open Long position
  And I open the Close Position modal from market details
  And the close slider is set to 100%
  When I submit the close action
  Then I should see an in-progress toast with the text "Closing position"
  And after success I should see a success toast with the text "Position closed"
  And if a PnL subtitle is available I should see "Your PnL is ..."

Scenario: Full close of a Short from the close-position modal shows full-close copy
  Given I already have an open Short position
  And I open the Close Position modal from market details
  And the close slider is set to 100%
  When I submit the close action
  Then I should see an in-progress toast with the text "Closing position"
  And after success I should see a success toast with the text "Position closed"
  And if a PnL subtitle is available I should see "Your PnL is ..."

Scenario: Partial close of a Long shows partial-close copy
  Given I already have an open Long position
  And I open the Close Position modal from market details
  And the close slider is set below 100%
  When I submit the close action
  Then I should see an in-progress toast with the text "Partially closing position"
  And the toast subtitle should describe the partial close amount and asset
  And after success I should see a success toast with the text "Position partially closed"
  And if a PnL subtitle is available I should see "Your PnL is ..."
  And I should not see the text "Position closed"

Scenario: Partial close of a Short shows partial-close copy
  Given I already have an open Short position
  And I open the Close Position modal from market details
  And the close slider is set below 100%
  When I submit the close action
  Then I should see an in-progress toast with the text "Partially closing position"
  And the toast subtitle should describe the partial close amount and asset
  And after success I should see a success toast with the text "Position partially closed"
  And I should not see the text "Position closed"

Scenario: Partial close failure shows partial-close failure copy
  Given I already have an open position
  And I open the Close Position modal
  And the close slider is set below 100%
  When the partial close request fails
  Then I should see an error toast with the text "Failed to partially close position"
  And I should see the subtitle "Your position is still active"

Scenario: Full close failure shows full-close failure copy
  Given I already have an open position
  And I open the Close Position modal
  And the close slider is set to 100%
  When the full close request fails
  Then I should see an error toast with the text "Failed to close position"
  And I should see the relevant failure description returned by the flow

Scenario: Partial close minimum-notional failure still uses partial-close failure toast
  Given I already have an open position
  And I open the Close Position modal
  And the close slider is set below 100%
  When the partial close fails due to minimum notional
  Then I should see an error toast with the text "Failed to partially close position"
  And I should see the subtitle "Your position is still active"
  And the modal body should still show the minimum-notional warning

Scenario: Reverse position still shows extension reverse toasts
  Given I already have an open Long or Short position
  And I open the Reverse Position modal
  When I confirm reverse position
  Then I should see an in-progress toast with the text "Reversing position"
  And after success I should see a success toast with the text "Position reversed"
  And on failure I should see an error toast with the text "Failed to reverse position"

Scenario: TP/SL modal still shows existing TP/SL toast behavior
  Given I already have an open position
  And I open the TP/SL modal
  When I save TP/SL changes
  Then I should see the existing TP/SL success or failure toast behavior
  And the close-position toast copy should not appear

Scenario: Edit margin modal still shows existing margin toast behavior
  Given I already have an open position
  And I open the Add Margin or Remove Margin modal
  When I save the margin change
  Then I should see the existing margin success or failure toast behavior
  And the close-position toast copy should not appear

Screenshots/Recordings

Before

After

modifyClose.mov

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
Low risk UX change that adds/adjusts perps toast notifications and refactors PnL ratio calculation; no changes to trading requests beyond parameter construction and messaging. Main risk is incorrect toast copy/triggering for partial vs full close edge cases.

Overview
Adds perps toast parity for modal-based position management by emitting in-progress/success/failure toasts from ClosePositionModal and ReversePositionModal.

Close-toasts now distinguish full close vs partial close (new i18n keys/copy and a “position still active” failure subtitle), include an optional PnL subtitle when computable, and the PnL ratio logic is centralized into getPositionPnlRatio (reused by the order entry page). Test coverage is expanded to assert toast key mapping/presentation and modal toast emission for success/failure paths.

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 5, 2026

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-perps Perps team label Apr 5, 2026
@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 bot commented Apr 5, 2026

✨ Files requiring CODEOWNER review ✨

👨‍🔧 @MetaMask/perps (9 files, +830 -52)
  • 📁 ui/
    • 📁 components/
      • 📁 app/
        • 📁 perps/
          • 📁 close-position/
            • 📄 close-position-modal.test.tsx +322 -1
            • 📄 close-position-modal.tsx +243 -32
          • 📁 perps-toast/
            • 📄 perps-toast-provider.test.tsx +113 -0
            • 📄 perps-toast.constants.ts +6 -0
            • 📄 perps-toast.presentation.tsx +10 -0
          • 📁 reverse-position/
            • 📄 reverse-position-modal.test.tsx +84 -0
            • 📄 reverse-position-modal.tsx +12 -1
            • 📄 utils.ts +38 -0
    • 📁 pages/
      • 📁 perps/
        • 📄 perps-order-entry-page.tsx +2 -18

@github-actions github-actions bot added the size-L label Apr 5, 2026
@geositta geositta changed the title Feat/toast order close modify perps(Feat) toast display for order close and modify Apr 5, 2026
@geositta geositta changed the title perps(Feat) toast display for order close and modify feat: perps toast display for order close and modify Apr 5, 2026
@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 bot commented Apr 5, 2026

Builds ready [e170625]
⚡ Performance Benchmarks (Total: 🟢 6 pass · 🟡 12 warn · 🔴 0 fail)

Baseline (latest main): f34f804 | Date: 9/10/58222 | Pipeline: 24011362894 | Baseline logs

Interaction Benchmarks
Benchmarkchrome-browserify
loadNewAccount🟡 [Show logs]
confirmTx🟡 [Show logs]
bridgeUserActions🟡 [Show logs]

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

  • 🟡 loadNewAccount/FCP: p75 2.5s
  • 🟡 confirmTx/FCP: p75 2.5s
  • 🟡 bridgeUserActions/FCP: p75 2.5s
Startup Benchmarks
Benchmarkchrome-browserifychrome-webpackfirefox-browserifyfirefox-webpack
startupStandardHome🟢 [Show logs]🟢 [Show logs]🟢 [Show logs]🟢 [Show logs]
startupPowerUserHome🟡 [Show logs]🟡 [Show logs]🟡 [Show logs]🟡 [Show logs]

📈 Results compared to the previous 5 runs on main

  • startupStandardHome/load: -12%
  • startupStandardHome/domContentLoaded: -13%
  • startupStandardHome/domInteractive: +13%
  • startupStandardHome/backgroundConnect: +12%
  • startupStandardHome/initialActions: -38%
  • startupStandardHome/loadScripts: -16%
  • startupStandardHome/numNetworkReqs: -13%
  • startupPowerUserHome/backgroundConnect: +58%
  • startupPowerUserHome/setupStore: +22%
  • startupPowerUserHome/numNetworkReqs: +16%
  • startupStandardHome/uiStartup: -19%
  • startupStandardHome/load: -18%
  • startupStandardHome/domContentLoaded: -18%
  • startupStandardHome/backgroundConnect: -39%
  • startupStandardHome/firstReactRender: -24%
  • startupStandardHome/loadScripts: -17%
  • startupStandardHome/setupStore: -14%
  • startupStandardHome/numNetworkReqs: -29%
  • startupPowerUserHome/numNetworkReqs: -45%
  • startupStandardHome/domInteractive: -59%
  • startupStandardHome/initialActions: -38%
  • startupStandardHome/numNetworkReqs: -16%
  • startupPowerUserHome/backgroundConnect: -20%
  • startupStandardHome/domInteractive: -37%
  • startupStandardHome/backgroundConnect: -21%
  • startupStandardHome/initialActions: -44%
  • startupStandardHome/setupStore: -54%
  • startupStandardHome/numNetworkReqs: -18%
  • startupPowerUserHome/backgroundConnect: -22%

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

  • 🔴 startupPowerUserHome/INP: p75 688ms
  • 🔴 startupPowerUserHome/INP: p75 632ms
  • 🟡 startupPowerUserHome/LCP: p75 3.6s
  • 🟡 startupPowerUserHome/LCP: p75 3.5s
User Journey Benchmarks
Benchmarkchrome-browserify
onboardingImportWallet🟢 [Show logs]
onboardingNewWallet🟢 [Show logs]
assetDetails🟡 [Show logs]
solanaAssetDetails🟡 [Show logs]
importSrpHome🟡 [Show logs]
sendTransactions🟡 [Show logs]
swap🟡 [Show logs]

📈 Results compared to the previous 5 runs on main

  • onboardingImportWallet/metricsToWalletReadyScreen: -37%
  • onboardingImportWallet/doneButtonToHomeScreen: -74%
  • onboardingImportWallet/openAccountMenuToAccountListLoaded: +43%
  • onboardingImportWallet/total: -37%
  • onboardingNewWallet/doneButtonToAssetList: -33%
  • onboardingNewWallet/total: -27%
  • assetDetails/assetClickToPriceChart: -65%
  • assetDetails/total: -65%
  • solanaAssetDetails/assetClickToPriceChart: -64%
  • solanaAssetDetails/total: -64%
  • importSrpHome/loginToHomeScreen: +12%
  • importSrpHome/openAccountMenuAfterLogin: -21%
  • importSrpHome/homeAfterImportWithNewWallet: -35%
  • importSrpHome/total: -30%
  • sendTransactions/openSendPageFromHome: +89%
  • sendTransactions/total: +10%
  • swap/openSwapPageFromHome: -85%
  • swap/fetchAndDisplaySwapQuotes: +31%
  • swap/total: +14%

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

  • 🟡 assetDetails/INP: p75 224ms
  • 🟡 assetDetails/FCP: p75 2.5s
  • 🟡 solanaAssetDetails/FCP: p75 2.5s
  • 🟡 importSrpHome/INP: p75 248ms
  • 🟡 importSrpHome/FCP: p75 2.6s
  • 🟡 sendTransactions/INP: p75 224ms
  • 🟡 sendTransactions/FCP: p75 2.5s
  • 🟡 swap/FCP: p75 2.5s
🌐 Dapp Page Load Benchmarks

Current Commit: e170625 | Date: 4/5/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.02s (±38ms) 🟡 | historical mean value: 1.04s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 719ms (±36ms) 🟢 | historical mean value: 728ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 85ms (±10ms) 🟢 | historical mean value: 86ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.02s 38ms 997ms 1.31s 1.05s 1.31s
domContentLoaded 719ms 36ms 694ms 997ms 742ms 997ms
firstPaint 85ms 10ms 72ms 156ms 96ms 156ms
firstContentfulPaint 85ms 10ms 72ms 156ms 96ms 156ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 58 Bytes (0%)
  • ui: 1.9 KiB (0.02%)
  • common: 1.04 KiB (0.01%)

@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 bot commented Apr 5, 2026

Builds ready [d7d2974]
⚡ Performance Benchmarks (Total: 🟢 6 pass · 🟡 12 warn · 🔴 0 fail)

Baseline (latest main): f34f804 | Date: 9/10/58222 | Pipeline: 24012113352 | Baseline logs

Interaction Benchmarks
Benchmarkchrome-browserify
loadNewAccount🟡 [Show logs]
confirmTx🟡 [Show logs]
bridgeUserActions🟡 [Show logs]

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

  • 🟡 loadNewAccount/FCP: p75 2.5s
  • 🟡 confirmTx/FCP: p75 2.5s
  • 🟡 bridgeUserActions/FCP: p75 2.5s
Startup Benchmarks
Benchmarkchrome-browserifychrome-webpackfirefox-browserifyfirefox-webpack
startupStandardHome🟢 [Show logs]🟢 [Show logs]🟢 [Show logs]🟢 [Show logs]
startupPowerUserHome🟡 [Show logs]🟡 [Show logs]🟡 [Show logs]🟡 [Show logs]

📈 Results compared to the previous 5 runs on main

  • startupStandardHome/load: -10%
  • startupStandardHome/domContentLoaded: -13%
  • startupStandardHome/domInteractive: +11%
  • startupStandardHome/backgroundConnect: +14%
  • startupStandardHome/initialActions: -38%
  • startupStandardHome/loadScripts: -16%
  • startupStandardHome/numNetworkReqs: -11%
  • startupPowerUserHome/domInteractive: -11%
  • startupPowerUserHome/backgroundConnect: +56%
  • startupPowerUserHome/numNetworkReqs: -23%
  • startupStandardHome/uiStartup: -12%
  • startupStandardHome/load: -11%
  • startupStandardHome/domContentLoaded: -11%
  • startupStandardHome/firstPaint: +16%
  • startupStandardHome/backgroundConnect: -32%
  • startupStandardHome/firstReactRender: -24%
  • startupStandardHome/loadScripts: -11%
  • startupStandardHome/numNetworkReqs: -29%
  • startupPowerUserHome/domInteractive: -22%
  • startupPowerUserHome/numNetworkReqs: -27%
  • startupStandardHome/domInteractive: -61%
  • startupStandardHome/initialActions: -38%
  • startupStandardHome/numNetworkReqs: -18%
  • startupPowerUserHome/backgroundConnect: -18%
  • startupPowerUserHome/setupStore: +37%
  • startupStandardHome/domInteractive: -35%
  • startupStandardHome/backgroundConnect: -20%
  • startupStandardHome/initialActions: -44%
  • startupStandardHome/setupStore: -60%
  • startupStandardHome/numNetworkReqs: -18%
  • startupPowerUserHome/backgroundConnect: -31%
  • startupPowerUserHome/firstReactRender: -11%

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

  • 🔴 startupPowerUserHome/INP: p75 688ms
  • 🔴 startupPowerUserHome/INP: p75 648ms
  • 🟡 startupPowerUserHome/LCP: p75 3.9s
  • 🟡 startupPowerUserHome/LCP: p75 3.6s
User Journey Benchmarks
Benchmarkchrome-browserify
onboardingImportWallet🟢 [Show logs]
onboardingNewWallet🟢 [Show logs]
assetDetails🟡 [Show logs]
solanaAssetDetails🟡 [Show logs]
importSrpHome🟡 [Show logs]
sendTransactions🟡 [Show logs]
swap🟡 [Show logs]

📈 Results compared to the previous 5 runs on main

  • onboardingImportWallet/srpButtonToSrpForm: -10%
  • onboardingImportWallet/metricsToWalletReadyScreen: -16%
  • onboardingImportWallet/doneButtonToHomeScreen: -76%
  • onboardingImportWallet/openAccountMenuToAccountListLoaded: +34%
  • onboardingImportWallet/total: -38%
  • onboardingNewWallet/skipBackupToMetricsScreen: -15%
  • onboardingNewWallet/agreeButtonToOnboardingSuccess: +26%
  • onboardingNewWallet/doneButtonToAssetList: -42%
  • onboardingNewWallet/total: -35%
  • assetDetails/assetClickToPriceChart: -60%
  • assetDetails/total: -60%
  • solanaAssetDetails/assetClickToPriceChart: -58%
  • solanaAssetDetails/total: -58%
  • importSrpHome/openAccountMenuAfterLogin: -73%
  • importSrpHome/homeAfterImportWithNewWallet: -40%
  • importSrpHome/total: -36%
  • sendTransactions/openSendPageFromHome: +48%
  • swap/openSwapPageFromHome: -86%
  • swap/fetchAndDisplaySwapQuotes: +31%
  • swap/total: +13%

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

  • 🟡 assetDetails/INP: p75 208ms
  • 🟡 assetDetails/FCP: p75 2.5s
  • 🟡 solanaAssetDetails/FCP: p75 2.5s
  • 🟡 importSrpHome/FCP: p75 2.5s
  • 🟡 sendTransactions/INP: p75 208ms
  • 🟡 sendTransactions/FCP: p75 2.6s
  • 🟡 swap/FCP: p75 2.5s
🌐 Dapp Page Load Benchmarks

Current Commit: d7d2974 | Date: 4/5/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.05s (±38ms) 🟡 | historical mean value: 1.04s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 741ms (±36ms) 🟢 | historical mean value: 728ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 86ms (±11ms) 🟢 | historical mean value: 86ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.05s 38ms 1.02s 1.34s 1.07s 1.34s
domContentLoaded 741ms 36ms 715ms 1.01s 760ms 1.01s
firstPaint 86ms 11ms 68ms 172ms 96ms 172ms
firstContentfulPaint 86ms 11ms 68ms 172ms 96ms 172ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 58 Bytes (0%)
  • ui: 2.53 KiB (0.03%)
  • common: 1.04 KiB (0.01%)

@geositta geositta marked this pull request as ready for review April 5, 2026 23:22
@geositta geositta requested a review from a team as a code owner April 5, 2026 23:22
@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 bot commented Apr 5, 2026

Builds ready [bfeb944]
⚡ Performance Benchmarks (Total: 🟢 6 pass · 🟡 12 warn · 🔴 0 fail)

Baseline (latest main): f34f804 | Date: 9/10/58222 | Pipeline: 24012742114 | Baseline logs

Interaction Benchmarks
Benchmarkchrome-browserify
loadNewAccount🟡 [Show logs]
confirmTx🟡 [Show logs]
bridgeUserActions🟡 [Show logs]

📈 Results compared to the previous 5 runs on main

  • loadNewAccount/load_new_account: -19%
  • loadNewAccount/total: -19%

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

  • 🟡 loadNewAccount/FCP: p75 2.5s
  • 🟡 confirmTx/FCP: p75 2.5s
  • 🟡 bridgeUserActions/FCP: p75 2.5s
Startup Benchmarks
Benchmarkchrome-browserifychrome-webpackfirefox-browserifyfirefox-webpack
startupStandardHome🟢 [Show logs]🟢 [Show logs]🟢 [Show logs]🟢 [Show logs]
startupPowerUserHome🟡 [Show logs]🟡 [Show logs]🟡 [Show logs]🟡 [Show logs]

📈 Results compared to the previous 5 runs on main

  • startupStandardHome/load: -10%
  • startupStandardHome/domContentLoaded: -12%
  • startupStandardHome/domInteractive: +12%
  • startupStandardHome/backgroundConnect: +17%
  • startupStandardHome/initialActions: -38%
  • startupStandardHome/loadScripts: -16%
  • startupStandardHome/setupStore: +14%
  • startupPowerUserHome/backgroundConnect: +89%
  • startupPowerUserHome/setupStore: +22%
  • startupPowerUserHome/numNetworkReqs: +14%
  • startupStandardHome/uiStartup: -14%
  • startupStandardHome/load: -13%
  • startupStandardHome/domContentLoaded: -12%
  • startupStandardHome/backgroundConnect: -35%
  • startupStandardHome/firstReactRender: -24%
  • startupStandardHome/loadScripts: -12%
  • startupStandardHome/numNetworkReqs: -29%
  • startupPowerUserHome/domInteractive: -22%
  • startupPowerUserHome/firstPaint: -19%
  • startupStandardHome/domInteractive: -59%
  • startupStandardHome/initialActions: -38%
  • startupStandardHome/numNetworkReqs: -16%
  • startupPowerUserHome/backgroundConnect: -15%
  • startupStandardHome/domInteractive: -33%
  • startupStandardHome/backgroundConnect: -17%
  • startupStandardHome/initialActions: -44%
  • startupStandardHome/setupStore: -57%
  • startupPowerUserHome/backgroundConnect: -19%
  • startupPowerUserHome/setupStore: -30%

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

  • 🔴 startupPowerUserHome/INP: p75 656ms
  • 🔴 startupPowerUserHome/INP: p75 696ms
  • 🟡 startupPowerUserHome/LCP: p75 3.6s
  • 🟡 startupPowerUserHome/LCP: p75 3.9s
User Journey Benchmarks
Benchmarkchrome-browserify
onboardingImportWallet🟢 [Show logs]
onboardingNewWallet🟢 [Show logs]
assetDetails🟡 [Show logs]
solanaAssetDetails🟡 [Show logs]
importSrpHome🟡 [Show logs]
sendTransactions🟡 [Show logs]
swap🟡 [Show logs]

📈 Results compared to the previous 5 runs on main

  • onboardingImportWallet/metricsToWalletReadyScreen: -29%
  • onboardingImportWallet/doneButtonToHomeScreen: -69%
  • onboardingImportWallet/openAccountMenuToAccountListLoaded: +34%
  • onboardingImportWallet/total: -40%
  • onboardingNewWallet/skipBackupToMetricsScreen: -19%
  • onboardingNewWallet/agreeButtonToOnboardingSuccess: +14%
  • onboardingNewWallet/doneButtonToAssetList: -40%
  • onboardingNewWallet/total: -34%
  • assetDetails/assetClickToPriceChart: -70%
  • assetDetails/total: -70%
  • solanaAssetDetails/assetClickToPriceChart: -59%
  • solanaAssetDetails/total: -59%
  • importSrpHome/openAccountMenuAfterLogin: -75%
  • importSrpHome/homeAfterImportWithNewWallet: -40%
  • importSrpHome/total: -33%
  • sendTransactions/openSendPageFromHome: +101%
  • sendTransactions/selectTokenToSendFormLoaded: +10%
  • sendTransactions/reviewTransactionToConfirmationPage: +15%
  • sendTransactions/total: +16%
  • swap/openSwapPageFromHome: -85%
  • swap/fetchAndDisplaySwapQuotes: +31%
  • swap/total: +14%

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

  • 🟡 assetDetails/INP: p75 224ms
  • 🟡 assetDetails/FCP: p75 2.4s
  • 🟡 solanaAssetDetails/FCP: p75 2.5s
  • 🟡 importSrpHome/INP: p75 224ms
  • 🟡 importSrpHome/FCP: p75 2.5s
  • 🟡 sendTransactions/INP: p75 224ms
  • 🟡 sendTransactions/FCP: p75 2.6s
  • 🟡 swap/FCP: p75 2.6s
🌐 Dapp Page Load Benchmarks

Current Commit: bfeb944 | Date: 4/5/2026

📄 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: 721ms (±36ms) 🟢 | historical mean value: 728ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 84ms (±10ms) 🟢 | historical mean value: 86ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.03s 38ms 1.00s 1.31s 1.06s 1.31s
domContentLoaded 721ms 36ms 700ms 989ms 754ms 989ms
firstPaint 84ms 10ms 68ms 160ms 96ms 160ms
firstContentfulPaint 84ms 10ms 68ms 160ms 96ms 160ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 58 Bytes (0%)
  • ui: 2.53 KiB (0.03%)
  • common: 1.04 KiB (0.01%)

@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 bot commented Apr 6, 2026

Builds ready [6f71060]
⚡ Performance Benchmarks (Total: 🟢 6 pass · 🟡 12 warn · 🔴 0 fail)

Baseline (latest main): f34f804 | Date: 9/10/58222 | Pipeline: 24014391498 | Baseline logs

Interaction Benchmarks
Benchmarkchrome-browserify
loadNewAccount🟡 [Show logs]
confirmTx🟡 [Show logs]
bridgeUserActions🟡 [Show logs]

📈 Results compared to the previous 5 runs on main

  • bridgeUserActions/bridge_load_page: +15%
  • bridgeUserActions/bridge_load_asset_picker: -12%
  • bridgeUserActions/total: -21%

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

  • 🟡 loadNewAccount/FCP: p75 2.6s
  • 🟡 confirmTx/FCP: p75 2.6s
  • 🟡 bridgeUserActions/FCP: p75 2.5s
Startup Benchmarks
Benchmarkchrome-browserifychrome-webpackfirefox-browserifyfirefox-webpack
startupStandardHome🟢 [Show logs]🟢 [Show logs]🟢 [Show logs]🟢 [Show logs]
startupPowerUserHome🟡 [Show logs]🟡 [Show logs]🟡 [Show logs]🟡 [Show logs]

📈 Results compared to the previous 5 runs on main

  • startupStandardHome/uiStartup: -14%
  • startupStandardHome/load: -17%
  • startupStandardHome/domContentLoaded: -19%
  • startupStandardHome/initialActions: -38%
  • startupStandardHome/loadScripts: -22%
  • startupPowerUserHome/uiStartup: -13%
  • startupPowerUserHome/backgroundConnect: +62%
  • startupPowerUserHome/numNetworkReqs: -54%
  • startupStandardHome/uiStartup: -18%
  • startupStandardHome/load: -16%
  • startupStandardHome/domContentLoaded: -16%
  • startupStandardHome/backgroundConnect: -37%
  • startupStandardHome/firstReactRender: -24%
  • startupStandardHome/loadScripts: -16%
  • startupStandardHome/setupStore: -14%
  • startupStandardHome/numNetworkReqs: -22%
  • startupPowerUserHome/domInteractive: -23%
  • startupPowerUserHome/numNetworkReqs: +35%
  • startupStandardHome/domInteractive: -57%
  • startupStandardHome/initialActions: -38%
  • startupStandardHome/numNetworkReqs: -18%
  • startupPowerUserHome/uiStartup: -14%
  • startupPowerUserHome/backgroundConnect: -45%
  • startupPowerUserHome/setupStore: +46%
  • startupStandardHome/domInteractive: -43%
  • startupStandardHome/backgroundConnect: -20%
  • startupStandardHome/initialActions: -44%
  • startupStandardHome/setupStore: -57%
  • startupStandardHome/numNetworkReqs: -18%
  • startupPowerUserHome/backgroundConnect: -17%
  • startupPowerUserHome/setupStore: -21%

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

  • 🔴 startupPowerUserHome/INP: p75 712ms
  • 🔴 startupPowerUserHome/INP: p75 640ms
  • 🟡 startupPowerUserHome/LCP: p75 3.4s
  • 🟡 startupPowerUserHome/LCP: p75 3.8s
User Journey Benchmarks
Benchmarkchrome-browserify
onboardingImportWallet🟢 [Show logs]
onboardingNewWallet🟢 [Show logs]
assetDetails🟡 [Show logs]
solanaAssetDetails🟡 [Show logs]
importSrpHome🟡 [Show logs]
sendTransactions🟡 [Show logs]
swap🟡 [Show logs]

📈 Results compared to the previous 5 runs on main

  • onboardingImportWallet/metricsToWalletReadyScreen: -38%
  • onboardingImportWallet/doneButtonToHomeScreen: -71%
  • onboardingImportWallet/openAccountMenuToAccountListLoaded: +23%
  • onboardingImportWallet/total: -39%
  • onboardingNewWallet/skipBackupToMetricsScreen: -19%
  • onboardingNewWallet/doneButtonToAssetList: -35%
  • onboardingNewWallet/total: -29%
  • assetDetails/assetClickToPriceChart: -69%
  • assetDetails/total: -69%
  • solanaAssetDetails/assetClickToPriceChart: -59%
  • solanaAssetDetails/total: -59%
  • importSrpHome/openAccountMenuAfterLogin: -71%
  • importSrpHome/homeAfterImportWithNewWallet: -37%
  • importSrpHome/total: -32%
  • sendTransactions/openSendPageFromHome: +57%
  • swap/openSwapPageFromHome: -86%
  • swap/fetchAndDisplaySwapQuotes: +31%
  • swap/total: +14%

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

  • 🟡 assetDetails/INP: p75 216ms
  • 🟡 assetDetails/FCP: p75 2.5s
  • 🟡 solanaAssetDetails/FCP: p75 2.5s
  • 🟡 importSrpHome/INP: p75 208ms
  • 🟡 importSrpHome/FCP: p75 2.4s
  • 🟡 sendTransactions/INP: p75 216ms
  • 🟡 sendTransactions/FCP: p75 2.5s
  • 🟡 swap/FCP: p75 2.5s
🌐 Dapp Page Load Benchmarks

Current Commit: 6f71060 | Date: 4/6/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.04s (±41ms) 🟡 | historical mean value: 1.04s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 727ms (±38ms) 🟢 | historical mean value: 728ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 85ms (±11ms) 🟢 | historical mean value: 86ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.04s 41ms 1.01s 1.33s 1.07s 1.33s
domContentLoaded 727ms 38ms 703ms 1.01s 754ms 1.01s
firstPaint 85ms 11ms 68ms 172ms 96ms 172ms
firstContentfulPaint 85ms 11ms 68ms 172ms 96ms 172ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 58 Bytes (0%)
  • ui: 2.53 KiB (0.03%)
  • common: 1.04 KiB (0.01%)

@aganglada aganglada added this pull request to the merge queue Apr 7, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 7, 2026
@aganglada aganglada added this pull request to the merge queue Apr 7, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 7, 2026
@aganglada aganglada enabled auto-merge April 7, 2026 11:02
@geositta geositta force-pushed the feat/toast-order-close-modify branch from a2619e4 to 953695f Compare April 7, 2026 11:29
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 7, 2026

@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 bot commented Apr 7, 2026

Builds ready [953695f]
⚡ Performance Benchmarks (Total: 🟢 7 pass · 🟡 12 warn · 🔴 0 fail)

Baseline (latest main): f34f804 | Date: 9/10/58222 | Pipeline: 24079060575 | Baseline logs

Interaction Benchmarks · Samples: 5
Benchmarkchrome-browserify
loadNewAccount🟡 [Show logs]
confirmTx🟡 [Show logs]
bridgeUserActions🟡 [Show logs]

📈 Results compared to the previous 5 runs on main

  • bridgeUserActions/bridge_load_asset_picker: +14%

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

  • 🟡 loadNewAccount/FCP: p75 2.4s
  • 🟡 confirmTx/FCP: p75 2.4s
  • 🟡 bridgeUserActions/FCP: p75 2.5s
Startup Benchmarks · Samples: 100
Benchmarkchrome-browserifychrome-webpackfirefox-browserifyfirefox-webpack
startupStandardHome🟢 [Show logs]🟢 [Show logs]🟢 [Show logs]🟢 [Show logs]
startupPowerUserHome🟡 [Show logs]🟡 [Show logs]🟡 [Show logs]🟡 [Show logs]

📈 Results compared to the previous 5 runs on main

  • startupStandardHome/load: -10%
  • startupStandardHome/domContentLoaded: -12%
  • startupStandardHome/backgroundConnect: +14%
  • startupStandardHome/initialActions: -38%
  • startupStandardHome/loadScripts: -16%
  • startupStandardHome/numNetworkReqs: -13%
  • startupPowerUserHome/uiStartup: -18%
  • startupPowerUserHome/backgroundConnect: +75%
  • startupPowerUserHome/setupStore: +11%
  • startupStandardHome/uiStartup: -11%
  • startupStandardHome/load: -11%
  • startupStandardHome/domContentLoaded: -11%
  • startupStandardHome/backgroundConnect: -33%
  • startupStandardHome/firstReactRender: -20%
  • startupStandardHome/loadScripts: -11%
  • startupStandardHome/numNetworkReqs: -29%
  • startupPowerUserHome/domInteractive: -17%
  • startupPowerUserHome/numNetworkReqs: +35%
  • startupStandardHome/domInteractive: -57%
  • startupStandardHome/initialActions: -38%
  • startupStandardHome/setupStore: +21%
  • startupStandardHome/numNetworkReqs: -16%
  • startupPowerUserHome/domInteractive: +27%
  • startupPowerUserHome/backgroundConnect: -41%
  • startupPowerUserHome/setupStore: -35%
  • startupStandardHome/domInteractive: -35%
  • startupStandardHome/backgroundConnect: -14%
  • startupStandardHome/initialActions: -44%
  • startupStandardHome/setupStore: -51%
  • startupStandardHome/numNetworkReqs: -16%
  • startupPowerUserHome/uiStartup: -11%
  • startupPowerUserHome/domInteractive: -17%
  • startupPowerUserHome/backgroundConnect: -30%
  • startupPowerUserHome/firstReactRender: -11%
  • startupPowerUserHome/setupStore: -24%

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

  • 🔴 startupPowerUserHome/INP: p75 704ms
  • 🔴 startupPowerUserHome/INP: p75 688ms
  • 🟡 startupPowerUserHome/LCP: p75 3.7s
  • 🟡 startupPowerUserHome/LCP: p75 3.5s
User Journey Benchmarks · Samples: 5 · mock API
Benchmarkchrome-browserify
onboardingImportWallet🟢 [Show logs]
onboardingNewWallet🟢 [Show logs]
assetDetails🟡 [Show logs]
solanaAssetDetails🟡 [Show logs]
importSrpHome🟡 [Show logs]
sendTransactions🟡 [Show logs]
swap🟡 [Show logs]

📈 Results compared to the previous 5 runs on main

  • onboardingImportWallet/metricsToWalletReadyScreen: -17%
  • onboardingImportWallet/doneButtonToHomeScreen: -75%
  • onboardingImportWallet/openAccountMenuToAccountListLoaded: +32%
  • onboardingImportWallet/total: -40%
  • onboardingNewWallet/skipBackupToMetricsScreen: -12%
  • onboardingNewWallet/doneButtonToAssetList: -26%
  • onboardingNewWallet/total: -22%
  • assetDetails/assetClickToPriceChart: -66%
  • assetDetails/total: -66%
  • solanaAssetDetails/assetClickToPriceChart: -54%
  • solanaAssetDetails/total: -54%
  • importSrpHome/openAccountMenuAfterLogin: -73%
  • importSrpHome/homeAfterImportWithNewWallet: -36%
  • importSrpHome/total: -31%
  • sendTransactions/openSendPageFromHome: +67%
  • sendTransactions/reviewTransactionToConfirmationPage: +15%
  • sendTransactions/total: +15%
  • swap/openSwapPageFromHome: -87%
  • swap/fetchAndDisplaySwapQuotes: +32%
  • swap/total: +14%

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

  • 🟡 assetDetails/INP: p75 224ms
  • 🟡 assetDetails/FCP: p75 2.5s
  • 🟡 solanaAssetDetails/FCP: p75 2.5s
  • 🟡 importSrpHome/INP: p75 208ms
  • 🟡 importSrpHome/FCP: p75 2.5s
  • 🟡 sendTransactions/INP: p75 224ms
  • 🟡 sendTransactions/FCP: p75 2.5s
  • 🟡 swap/FCP: p75 2.6s
Dapp Page Load Benchmarks · Samples: 100
Benchmarkchrome-browserify
dappPageLoad🟢 [Show logs]
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 58 Bytes (0%)
  • ui: 2.53 KiB (0.03%)
  • common: 1.04 KiB (0.01%)

@aganglada aganglada added this pull request to the merge queue Apr 7, 2026
Merged via the queue into main with commit 6bdbc88 Apr 7, 2026
398 of 402 checks passed
@aganglada aganglada deleted the feat/toast-order-close-modify branch April 7, 2026 15:52
@github-actions github-actions bot locked and limited conversation to collaborators Apr 7, 2026
@metamaskbot metamaskbot added the release-13.27.0 Issue or pull request that will be included in release 13.27.0 label Apr 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-13.27.0 Issue or pull request that will be included in release 13.27.0 size-L team-perps Perps team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants