Skip to content

fix(perps): Cannot use +/- to define TP/SL thresholds#41919

Merged
abretonc7s merged 4 commits into
mainfrom
fix/tat-2947-fix-tpsl-sign-input
Apr 22, 2026
Merged

fix(perps): Cannot use +/- to define TP/SL thresholds#41919
abretonc7s merged 4 commits into
mainfrom
fix/tat-2947-fix-tpsl-sign-input

Conversation

@abretonc7s
Copy link
Copy Markdown
Contributor

@abretonc7s abretonc7s commented Apr 18, 2026

Description

Fixes a bug where users could not type + or - to set TP/SL thresholds as signed RoE percentages. Three interrelated bugs: formatRoePercent stripped the sign, percentToPriceForEdit/percentToPrice used an isTP flag that inverted SL math instead of a unified signed convention, and the input regex rejected + as a leading character.

After the fix: positive % = profitable direction, negative % = loss direction. Both TP and SL use the same formula. Typing +15 or -10 is accepted and converts to the correct price.

Changelog

CHANGELOG entry: Fixed a bug where typing + or - in TP/SL percent fields was rejected or produced prices on the wrong side of the entry price.

Related issues

Fixes: TAT-2947

Manual testing steps

  1. Open MetaMask with an active perps position (long ETH or any asset).
  2. Tap the "Auto close" row to open the TP/SL modal.
  3. In the Take Profit percent field, type +15 — verify it is accepted and a price above entry appears.
  4. In the Stop Loss percent field, type -5 — verify it is accepted and a price below entry appears.
  5. Verify the sign shown in the percent field matches the input (not stripped on blur).
  6. Click an SL preset (e.g. "-5%") — verify the resulting price is below entry.

Screenshots/Recordings

Before: + prefix rejected, SL sign inverted. After: +15 accepted in TP, -5 creates SL below entry.

TP accepts + prefix and populates price above entry — Before: + was rejected (blocked by regex). After: +15 accepted, price $2541.84 set above entry.
Before
before
After
after
SL with -5% creates price below entry (correct loss direction) — Before: -5 inverted to place SL above entry. After: -5% RoE → $2380.45, below entry ~$2384.
Before
before
After
after

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.

Validation Recipe

recipe.json
{
  "title": "TAT-2947: TP/SL signed percent input — +/- sign acceptance and correct price derivation",
  "description": "Verifies that the TP/SL modal accepts + prefix and that - prefix sets prices on the correct side of entry. Requires an open ETH long position.",
  "initial_conditions": {},
  "validate": {
    "workflow": {
      "pre_conditions": ["wallet.unlocked", "perps.feature_enabled"],
      "entry": "setup-dismiss-any-modal",
      "teardown": [
        {
          "id": "teardown-close-modal",
          "action": "eval_sync",
          "expression": "(()=>{const closeBtn=document.querySelector('[data-testid=\"perps-update-tpsl-modal\"] [aria-label=\"Close\"]');if(closeBtn)closeBtn.click();return JSON.stringify({ok:true});})()",
          "assert": { "operator": "eq", "field": "ok", "value": true }
        }
      ],
      "nodes": {
        "setup-dismiss-any-modal": { "action": "eval_sync", "...": "..." },
        "setup-navigate-market": { "action": "call", "ref": "perps/navigate-to-market-detail", "...": "..." },
        "ac1-type-plus-in-tp": { "action": "eval_sync", "...": "types +15 in TP percent input" },
        "ac1-assert-tp-value-accepted": { "action": "eval_sync", "assert": { "operator": "eq", "field": "accepted", "value": true } },
        "ac2-type-minus-in-sl": { "action": "eval_sync", "...": "types -5 in SL percent input" },
        "ac2-assert-sl-price-below-entry": { "action": "eval_sync", "assert": { "operator": "eq", "field": "belowEntry", "value": true } }
      }
    }
  }
}

Recipe Workflow

workflow.mmd
graph TD
  setup-dismiss-any-modal --> setup-navigate-market
  setup-navigate-market --> setup-read-entry-price
  setup-read-entry-price --> setup-open-tpsl-modal
  setup-open-tpsl-modal --> setup-wait-modal
  setup-wait-modal --> ac1-type-plus-in-tp
  ac1-type-plus-in-tp --> ac1-assert-tp-value-accepted
  ac1-assert-tp-value-accepted --> ac1-assert-tp-price-set
  ac1-assert-tp-price-set --> ac1-screenshot-tp
  ac1-screenshot-tp --> gate-clear-tp
  gate-clear-tp --> ac2-type-minus-in-sl
  ac2-type-minus-in-sl --> ac2-assert-sl-price-below-entry
  ac2-assert-sl-price-below-entry --> ac2-screenshot-sl
  ac2-screenshot-sl --> ac3-screenshot-final
  ac3-screenshot-final --> done
Loading

Note

Medium Risk
Changes TP/SL percent-to-price and price-to-percent math and input validation; incorrect sign handling could place TP/SL on the wrong side of entry for some directions/leverage combinations.

Overview
Fixes TP/SL RoE% inputs to use a signed convention across both order entry AutoCloseSection and the UpdateTPSLModalContent: positive values mean profit direction and negative values mean loss direction, for both long and short.

Updates percent/price conversion helpers to drop the old isTP-based sign inversion, preserves negative signs in formatRoePercent (including avoiding -0), and expands percent input validation to accept leading + (including intermediate +/+. states). Tests are updated/added to cover signed SL values, + prefixes, and preset SL negation behavior.

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

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

@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 Bot commented Apr 18, 2026

Builds ready [52a4c14] [reused from 4ede4f5]
⚡ Performance Benchmarks (Total: 🟢 6 pass · 🟡 9 warn · 🔴 0 fail)

Baseline (latest main): 71bd826 | Date: 10/14/58243 | Pipeline: 24600411593 | 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_page: +12%
  • bridgeUserActions/bridge_load_asset_picker: -43%
  • bridgeUserActions/total: -12%

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

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

📈 Results compared to the previous 5 runs on main

  • startupStandardHome/uiStartup: -23%
  • startupStandardHome/load: -12%
  • startupStandardHome/domContentLoaded: -14%
  • startupStandardHome/firstReactRender: -18%
  • startupStandardHome/initialActions: -33%
  • startupStandardHome/loadScripts: -17%
  • startupStandardHome/numNetworkReqs: -37%
  • startupStandardHome/uiStartup: -19%
  • startupStandardHome/load: -14%
  • startupStandardHome/domContentLoaded: -13%
  • startupStandardHome/backgroundConnect: -33%
  • startupStandardHome/firstReactRender: -30%
  • startupStandardHome/loadScripts: -14%
  • startupStandardHome/setupStore: -13%
  • startupStandardHome/numNetworkReqs: -44%
  • startupStandardHome/backgroundConnect: +20%
  • startupStandardHome/firstReactRender: +11%
  • startupStandardHome/initialActions: -33%
  • startupStandardHome/numNetworkReqs: -29%
  • startupStandardHome/uiStartup: -14%
  • startupStandardHome/domInteractive: -47%
  • startupStandardHome/initialActions: +14%
  • startupStandardHome/setupStore: -44%
  • startupStandardHome/numNetworkReqs: -29%
User Journey Benchmarks · Samples: 5 · mock API
Benchmarkchrome-browserify
onboardingImportWallet🟡 [Show logs]
onboardingNewWallet🟡 [Show logs]
assetDetails🟡 [Show logs]
solanaAssetDetails🟡 [Show logs]
importSrpHome🟡 [Show logs] · 🟡 cls
sendTransactions🟢 [Show logs]
swap🟡 [Show logs]

📈 Results compared to the previous 5 runs on main

  • onboardingImportWallet/srpButtonToSrpForm: -85%
  • onboardingImportWallet/metricsToWalletReadyScreen: -31%
  • onboardingImportWallet/openAccountMenuToAccountListLoaded: -23%
  • onboardingImportWallet/total: -19%
  • onboardingNewWallet/srpButtonToPwForm: -77%
  • onboardingNewWallet/skipBackupToMetricsScreen: -67%
  • onboardingNewWallet/agreeButtonToOnboardingSuccess: +47%
  • onboardingNewWallet/doneButtonToAssetList: +10%
  • assetDetails/assetClickToPriceChart: -64%
  • assetDetails/total: -64%
  • solanaAssetDetails/assetClickToPriceChart: -73%
  • solanaAssetDetails/total: -73%
  • importSrpHome/loginToHomeScreen: -21%
  • importSrpHome/openAccountMenuAfterLogin: -69%
  • importSrpHome/homeAfterImportWithNewWallet: +73%
  • importSrpHome/total: +63%
  • swap/openSwapPageFromHome: -96%
  • swap/fetchAndDisplaySwapQuotes: -58%
  • swap/total: -64%

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

  • 🟡 onboardingImportWallet/FCP: p75 2.3s
  • 🟡 onboardingNewWallet/FCP: p75 2.0s
  • 🟡 assetDetails/INP: p75 248ms
  • 🟡 assetDetails/FCP: p75 2.4s
  • 🟡 solanaAssetDetails/FCP: p75 2.4s
  • 🟡 importSrpHome/INP: p75 288ms
  • 🟡 importSrpHome/FCP: p75 2.5s
  • 🟡 importSrpHome/CLS: p75 0.157
  • 🟡 swap/FCP: p75 2.6s
Dapp Page Load Benchmarks · Samples: 100
Benchmarkchrome-browserify
dappPageLoad🟢 [Show logs]
Bundle size diffs
  • background: 0 Bytes (0%)
  • ui: 0 Bytes (0%)
  • common: 0 Bytes (0%)

- Preserve sign in formatRoePercent so SL below entry shows negative %
- Unify percentToPrice/priceToPercent to use signed RoE convention
  (positive = profit direction, negative = loss direction) for both TP and SL
- Support '+' prefix in isSignedDecimalInput for intermediate typing states
- Update tests to reflect signed RoE convention
@abretonc7s abretonc7s marked this pull request as ready for review April 18, 2026 08:31
@abretonc7s abretonc7s requested a review from a team as a code owner April 18, 2026 08:31
@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 Bot commented Apr 18, 2026

✨ Files requiring CODEOWNER review ✨

👨‍🔧 @MetaMask/perps (8 files, +183 -77)
  • 📁 ui/
    • 📁 components/
      • 📁 app/
        • 📁 perps/
          • 📁 order-entry/
            • 📁 components/
              • 📁 auto-close-section/
                • 📄 auto-close-section.test.tsx +13 -10
                • 📄 auto-close-section.tsx +24 -27
              • 📄 utils.test.ts +8 -0
              • 📄 utils.ts +3 -3
          • 📁 update-tpsl/
            • 📄 update-tpsl-modal-content.test.tsx +68 -7
            • 📄 update-tpsl-modal-content.tsx +32 -26
            • 📄 utils.test.ts +27 -0
            • 📄 utils.ts +8 -4

Copy link
Copy Markdown

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

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit a4601a1. Configure here.

Comment thread ui/components/app/perps/utils.ts Outdated
@abretonc7s
Copy link
Copy Markdown
Contributor Author

Run Duration Model Nudges Grade Cost
86fc84a0 ? sonnet 0 5/medium $unknown
Worker report

Fix Report — TAT-2947

Branch: fix/tat-2947-fix-tpsl-sign-input
PR: #41919

Root Cause

Three interrelated bugs:

  1. formatRoePercent stripped sign (utils.ts): Used Math.abs() so the display always showed unsigned %.
  2. isTP flag inverted SL math (update-tpsl-modal-content.tsx, auto-close-section.tsx): SL used 1 - ratio instead of 1 + signedRatio, so positive input created SL below entry but negative input created SL above entry — opposite of intent.
  3. Regex blocked + (update-tpsl-modal-content.tsx, order-entry/utils.ts): Pattern only allowed optional -, not +.

Fix

Adopted unified signed RoE convention: positive = profitable direction, negative = loss direction. Both TP and SL use the same formula.

  • formatRoePercent: preserves sign (negative returned as -N)
  • percentToPriceForEdit / percentToPrice: direction-aware only (long vs short), not TP/SL-aware
  • priceToPercentForEdit / priceToPercent: returns actual signed RoE
  • Input regex and isSignedDecimalInput: now accept + prefix
  • SL preset buttons: pass -percent (negated) so presets labeled "-5%" still produce SL below entry
  • handleTpPercentChange / handleSlPercentChange: treat + as intermediate state (clears price)

Files Changed

  • ui/components/app/perps/utils.ts
  • ui/components/app/perps/order-entry/utils.ts
  • ui/components/app/perps/order-entry/components/auto-close-section/auto-close-section.tsx
  • ui/components/app/perps/update-tpsl/update-tpsl-modal-content.tsx
  • ui/components/app/perps/order-entry/utils.test.ts
  • ui/components/app/perps/order-entry/components/auto-close-section/auto-close-section.test.tsx
  • ui/components/app/perps/update-tpsl/update-tpsl-modal-content.test.tsx

Validation

  • Recipe: 14/14 nodes passed (live CDP run)
  • Unit tests: 170 tests passed across 4 test files
  • Lint: no ESLint errors on changed files
  • Circular deps: clean

Evidence

See recipe-coverage.md for AC coverage matrix (3/3 PROVEN).
See evidence-manifest.json for before/after screenshot pairs.

Workflow Diagram (Mermaid)

@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 Bot commented Apr 18, 2026

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

Baseline (latest main): 71bd826 | Date: 10/14/58243 | Pipeline: 24601092422 | 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

  • loadNewAccount/load_new_account: -23%
  • loadNewAccount/total: -23%
  • bridgeUserActions/bridge_load_asset_picker: -43%
  • bridgeUserActions/total: -14%

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

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

📈 Results compared to the previous 5 runs on main

  • startupStandardHome/uiStartup: -24%
  • startupStandardHome/load: -14%
  • startupStandardHome/domContentLoaded: -16%
  • startupStandardHome/firstReactRender: -10%
  • startupStandardHome/initialActions: -33%
  • startupStandardHome/loadScripts: -18%
  • startupStandardHome/numNetworkReqs: -37%
  • startupStandardHome/uiStartup: -18%
  • startupStandardHome/load: -14%
  • startupStandardHome/domContentLoaded: -13%
  • startupStandardHome/backgroundConnect: -33%
  • startupStandardHome/firstReactRender: -23%
  • startupStandardHome/loadScripts: -14%
  • startupStandardHome/numNetworkReqs: -44%
  • startupStandardHome/uiStartup: -28%
  • startupStandardHome/load: -22%
  • startupStandardHome/domContentLoaded: -22%
  • startupStandardHome/domInteractive: -65%
  • startupStandardHome/firstReactRender: -20%
  • startupStandardHome/initialActions: -33%
  • startupStandardHome/loadScripts: -23%
  • startupStandardHome/setupStore: -17%
  • startupStandardHome/numNetworkReqs: -34%
  • startupStandardHome/uiStartup: -14%
  • startupStandardHome/domInteractive: -42%
  • startupStandardHome/initialActions: +14%
  • startupStandardHome/setupStore: -54%
  • startupStandardHome/numNetworkReqs: -29%
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/srpButtonToSrpForm: -85%
  • onboardingImportWallet/confirmSrpToPwForm: -11%
  • onboardingImportWallet/metricsToWalletReadyScreen: -49%
  • onboardingImportWallet/doneButtonToHomeScreen: -76%
  • onboardingImportWallet/openAccountMenuToAccountListLoaded: +26%
  • onboardingImportWallet/total: -43%
  • onboardingNewWallet/srpButtonToPwForm: -77%
  • onboardingNewWallet/skipBackupToMetricsScreen: -66%
  • onboardingNewWallet/agreeButtonToOnboardingSuccess: -20%
  • onboardingNewWallet/doneButtonToAssetList: -23%
  • onboardingNewWallet/total: -25%
  • assetDetails/assetClickToPriceChart: -38%
  • assetDetails/total: -38%
  • solanaAssetDetails/assetClickToPriceChart: -73%
  • solanaAssetDetails/total: -73%
  • importSrpHome/loginToHomeScreen: -15%
  • importSrpHome/openAccountMenuAfterLogin: -81%
  • importSrpHome/homeAfterImportWithNewWallet: -66%
  • importSrpHome/total: -58%
  • sendTransactions/openSendPageFromHome: -18%
  • sendTransactions/selectTokenToSendFormLoaded: -10%
  • sendTransactions/reviewTransactionToConfirmationPage: +34%
  • sendTransactions/total: +34%
  • swap/openSwapPageFromHome: -96%
  • swap/fetchAndDisplaySwapQuotes: +32%
  • swap/total: +11%

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

  • 🟡 assetDetails/FCP: p75 2.5s
  • 🟡 assetDetails/LCP: p75 2.5s
  • 🟡 solanaAssetDetails/FCP: p75 2.5s
  • 🟡 importSrpHome/FCP: p75 2.5s
  • 🟡 sendTransactions/FCP: p75 2.5s
  • 🟡 swap/FCP: p75 2.5s
Dapp Page Load Benchmarks · Samples: 100
Benchmarkchrome-browserify
dappPageLoad🟢 [Show logs]
Bundle size diffs
  • background: 58 Bytes (0%)
  • ui: -64 Bytes (0%)
  • common: 20 Bytes (0%)

@abretonc7s abretonc7s enabled auto-merge April 18, 2026 13:36
@abretonc7s
Copy link
Copy Markdown
Contributor Author

Item Value
Run 44172515
Duration ?
Model sonnet
Nudges 3
Grade ungraded
Cost $unknown
Worker report

No report available.

@abretonc7s abretonc7s changed the title fix: Cannot use +/- to define TP/SL thresholds fix(perps): Cannot use +/- to define TP/SL thresholds Apr 20, 2026
@sonarqubecloud
Copy link
Copy Markdown

@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 Bot commented Apr 22, 2026

Builds ready [6388d60]
⚡ Performance Benchmarks (Total: 🟢 7 pass · 🟡 8 warn · 🔴 0 fail)

Baseline (latest main): 71bd826 | Date: 10/14/58243 | Pipeline: 24771791656 | 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

  • loadNewAccount/load_new_account: -70%
  • loadNewAccount/total: -70%
  • bridgeUserActions/bridge_load_page: -18%
  • bridgeUserActions/bridge_load_asset_picker: -39%
  • bridgeUserActions/bridge_search_token: -27%
  • bridgeUserActions/total: -29%

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

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

📈 Results compared to the previous 5 runs on main

  • startupStandardHome/uiStartup: -25%
  • startupStandardHome/load: -15%
  • startupStandardHome/domContentLoaded: -17%
  • startupStandardHome/firstPaint: -18%
  • startupStandardHome/firstReactRender: -14%
  • startupStandardHome/initialActions: -33%
  • startupStandardHome/loadScripts: -20%
  • startupStandardHome/numNetworkReqs: -37%
  • startupStandardHome/uiStartup: -17%
  • startupStandardHome/load: -12%
  • startupStandardHome/domContentLoaded: -11%
  • startupStandardHome/firstPaint: +22%
  • startupStandardHome/backgroundConnect: -32%
  • startupStandardHome/firstReactRender: -27%
  • startupStandardHome/loadScripts: -12%
  • startupStandardHome/setupStore: -13%
  • startupStandardHome/numNetworkReqs: -44%
  • startupStandardHome/domInteractive: -33%
  • startupStandardHome/backgroundConnect: +20%
  • startupStandardHome/firstReactRender: +11%
  • startupStandardHome/initialActions: +33%
  • startupStandardHome/numNetworkReqs: -32%
  • startupStandardHome/uiStartup: -34%
  • startupStandardHome/load: -28%
  • startupStandardHome/domContentLoaded: -28%
  • startupStandardHome/domInteractive: -67%
  • startupStandardHome/backgroundConnect: -24%
  • startupStandardHome/firstReactRender: -23%
  • startupStandardHome/initialActions: -43%
  • startupStandardHome/loadScripts: -28%
  • startupStandardHome/setupStore: -67%
  • startupStandardHome/numNetworkReqs: -32%
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/srpButtonToSrpForm: -85%
  • onboardingImportWallet/metricsToWalletReadyScreen: -36%
  • onboardingImportWallet/doneButtonToHomeScreen: -76%
  • onboardingImportWallet/openAccountMenuToAccountListLoaded: +26%
  • onboardingImportWallet/total: -45%
  • onboardingNewWallet/srpButtonToPwForm: -79%
  • onboardingNewWallet/skipBackupToMetricsScreen: -67%
  • onboardingNewWallet/doneButtonToAssetList: -19%
  • onboardingNewWallet/total: -22%
  • solanaAssetDetails/assetClickToPriceChart: -77%
  • solanaAssetDetails/total: -77%
  • importSrpHome/loginToHomeScreen: -15%
  • importSrpHome/openAccountMenuAfterLogin: -65%
  • importSrpHome/homeAfterImportWithNewWallet: -68%
  • importSrpHome/total: -61%
  • sendTransactions/openSendPageFromHome: +17%
  • sendTransactions/selectTokenToSendFormLoaded: -25%
  • sendTransactions/reviewTransactionToConfirmationPage: +36%
  • sendTransactions/total: +34%
  • swap/openSwapPageFromHome: -96%
  • swap/fetchAndDisplaySwapQuotes: +31%
  • swap/total: +12%

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

  • 🟡 assetDetails/FCP: p75 2.5s
  • 🟡 solanaAssetDetails/FCP: p75 2.5s
  • 🟡 importSrpHome/FCP: p75 2.6s
  • 🟡 sendTransactions/FCP: p75 2.4s
  • 🟡 swap/FCP: p75 2.4s
Dapp Page Load Benchmarks · Samples: 100
Benchmarkchrome-browserify
dappPageLoad🟢 [Show logs]
Bundle size diffs
  • background: 58 Bytes (0%)
  • ui: -64 Bytes (0%)
  • common: 20 Bytes (0%)

@abretonc7s abretonc7s added this pull request to the merge queue Apr 22, 2026
Merged via the queue into main with commit 528c587 Apr 22, 2026
210 checks passed
@abretonc7s abretonc7s deleted the fix/tat-2947-fix-tpsl-sign-input branch April 22, 2026 15:44
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 22, 2026
@metamaskbot metamaskbot added the release-13.29.0 Issue or pull request that will be included in release 13.29.0 label Apr 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

agentic release-13.29.0 Issue or pull request that will be included in release 13.29.0 size-M team-perps Perps team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants