Skip to content

fix: Input isn't centered in withdraw flow#41942

Merged
HowardBraham merged 7 commits intomainfrom
fix/tat-2847-center-withdraw-input
Apr 28, 2026
Merged

fix: Input isn't centered in withdraw flow#41942
HowardBraham merged 7 commits intomainfrom
fix/tat-2847-center-withdraw-input

Conversation

@abretonc7s
Copy link
Copy Markdown
Contributor

@abretonc7s abretonc7s commented Apr 20, 2026

Description

The hero amount input ($X.XX) in the perps withdraw flow was not centered in narrow popup viewports. Two issues:

  1. Container width: PerpsFiatHeroAmountInput was content-sized (~82% of parent), so justify-content: center had no room to center. Fixed by adding className="w-full" to the container box and skeleton.

  2. Input width with decimal amounts: the input used width: Xch (ch = width of '0'). Since . is ~0.3ch wide, amounts like $270.741456 appeared left-of-center even after the container fix.

Fixed using an absolute-overlay pattern: a hidden clone span (same font, white-space: pre) drives the outer span's width to the exact rendered text width; the input overlays it with position: absolute; inset: 0. Absolutely-positioned children are out-of-flow so they don't affect the parent's max-content calculation — avoiding the circular dependency that caused earlier approaches (inline-grid, field-sizing: content) to fail or be non-cross-browser.

Changelog

CHANGELOG entry: null

Related issues

Fixes: TAT-2847

Manual testing steps

  1. Open MetaMask extension in popup mode (360px wide).
  2. Navigate to Perps → Withdraw.
  3. Click 10% (or any percentage button) to set a non-zero amount.
  4. Verify the $X.XX amount is horizontally centered — equal left/right margins at all digit lengths, including amounts with many decimals.

Screenshots/Recordings

Before

Amount was left-aligned (especially visible with decimal values like $270.741456).

After

Short ($270) Decimal ($270.741456)
leftGap: 156, rightGap: 156, offset: 0 leftGap: 44, rightGap: 44, offset: 0

contentCenter == viewportCenter (offset = 0) at all tested lengths.

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.

@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 20, 2026

Builds ready [4078a94] [reused from eb8d4b6]
⚡ Performance Benchmarks (Total: 🟢 7 pass · 🟡 8 warn · 🔴 0 fail)

Baseline (latest main): 71bd826 | Date: 10/14/58243 | Pipeline: 24664953648 | 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: +18%
  • loadNewAccount/total: +18%
  • bridgeUserActions/bridge_load_page: -12%
  • bridgeUserActions/bridge_load_asset_picker: -47%
  • bridgeUserActions/total: -17%

🌐 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 · 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: -15%
  • startupStandardHome/firstReactRender: -10%
  • startupStandardHome/initialActions: -33%
  • startupStandardHome/loadScripts: -18%
  • startupStandardHome/numNetworkReqs: -37%
  • startupStandardHome/uiStartup: -20%
  • startupStandardHome/load: -15%
  • startupStandardHome/domContentLoaded: -14%
  • startupStandardHome/firstPaint: -13%
  • startupStandardHome/backgroundConnect: -35%
  • startupStandardHome/firstReactRender: -23%
  • startupStandardHome/loadScripts: -15%
  • startupStandardHome/numNetworkReqs: -44%
  • startupStandardHome/load: +21%
  • startupStandardHome/domContentLoaded: +21%
  • startupStandardHome/backgroundConnect: +45%
  • startupStandardHome/firstReactRender: +23%
  • startupStandardHome/initialActions: +33%
  • startupStandardHome/loadScripts: +19%
  • startupStandardHome/setupStore: +51%
  • startupStandardHome/numNetworkReqs: -34%
  • startupStandardHome/uiStartup: -22%
  • startupStandardHome/load: -14%
  • startupStandardHome/domContentLoaded: -14%
  • startupStandardHome/domInteractive: -70%
  • startupStandardHome/initialActions: -43%
  • startupStandardHome/loadScripts: -15%
  • startupStandardHome/setupStore: -64%
  • 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: -84%
  • onboardingImportWallet/metricsToWalletReadyScreen: -36%
  • onboardingImportWallet/doneButtonToHomeScreen: -11%
  • onboardingImportWallet/total: -18%
  • onboardingNewWallet/srpButtonToPwForm: -80%
  • onboardingNewWallet/createPwToRecoveryScreen: -20%
  • onboardingNewWallet/skipBackupToMetricsScreen: -73%
  • onboardingNewWallet/agreeButtonToOnboardingSuccess: -27%
  • onboardingNewWallet/doneButtonToAssetList: +11%
  • assetDetails/assetClickToPriceChart: -34%
  • assetDetails/total: -34%
  • solanaAssetDetails/assetClickToPriceChart: -79%
  • solanaAssetDetails/total: -79%
  • importSrpHome/loginToHomeScreen: -31%
  • importSrpHome/openAccountMenuAfterLogin: -69%
  • importSrpHome/homeAfterImportWithNewWallet: +64%
  • importSrpHome/total: +54%
  • swap/openSwapPageFromHome: -95%
  • swap/fetchAndDisplaySwapQuotes: -49%
  • swap/total: -56%

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

  • 🟡 onboardingImportWallet/FCP: p75 2.2s
  • 🟡 assetDetails/INP: p75 272ms
  • 🟡 assetDetails/FCP: p75 2.4s
  • 🟡 solanaAssetDetails/FCP: p75 2.5s
  • 🟡 importSrpHome/INP: p75 272ms
  • 🟡 importSrpHome/FCP: p75 2.4s
  • 🟡 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%)

Add w-full to PerpsFiatHeroAmountInput container so justify-content:
center correctly centers the [$][amount] row at all viewport widths,
including the narrow popup. Without it the box was content-sized
(~82% of parent), causing apparent left-alignment in popup mode.
@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 Bot commented Apr 20, 2026

✨ Files requiring CODEOWNER review ✨

👨‍🔧 @MetaMask/perps (2 files, +61 -21)
  • 📁 ui/
    • 📁 components/
      • 📁 app/
        • 📁 perps/
          • 📁 perps-fiat-hero-amount-input/
            • 📄 perps-fiat-hero-amount-input.test.tsx +12 -3
            • 📄 perps-fiat-hero-amount-input.tsx +49 -18

@abretonc7s
Copy link
Copy Markdown
Contributor Author

abretonc7s commented Apr 20, 2026

Item Value
Run fcf3a796
Duration ?
Model sonnet
Nudges 0
Grade 2/low
Cost $unknown
Worker report

Fix Report — TAT-2847: Input isn't centered in withdraw flow

Summary

The hero fiat amount input ($X.XX) in the perps withdraw flow was left-aligned in the narrow popup viewport. Adding className="w-full" to the container box ensures justify-content: center correctly centers the content at all viewport sizes.

Root Cause

File: ui/components/app/perps/perps-fiat-hero-amount-input/perps-fiat-hero-amount-input.tsx (line 133)

The outer Box in PerpsFiatHeroAmountInput had no className="w-full". Without it, the box rendered as content-sized (width = $ symbol + input width, e.g. ~82% of parent for a 9-char amount). In the parent column flex container (align-items: center), this content-sized box was centered in fullscreen mode but in popup mode (~360px) the box filled nearly the full width with negligible margins, making the amount appear left-aligned.

Measured before fix: heroBox.width=386px, parentBox.width=468px, widthRatio=0.82.
Measured after fix: widthRatio=1.0.

Changes

File Change
ui/components/app/perps/perps-fiat-hero-amount-input/perps-fiat-hero-amount-input.tsx Added className="w-full" to outer Box at line 133
ui/components/app/perps/perps-fiat-hero-amount-input/perps-fiat-hero-amount-input.test.tsx Added test asserting w-full class on container

Test Plan

Automated:

  • Unit tests: 6/6 pass (yarn jest perps-fiat-hero-amount-input.test.tsx)
  • CI-parity lint gate: pass (yarn lint:changed && yarn verify-locales --quiet && yarn circular-deps:check)
  • Recipe tat-2847-withdraw-input-centered: 7/7 nodes pass. Assertion verifies heroFillsParent=true (widthRatio >= 0.95) and contentCentered=true (offset <= 20px).

Manual Gherkin:

Given I am on the perps withdraw page
When I click the "10%" percentage button
Then the amount "$X.XX" should appear horizontally centered
And the left margin should equal the right margin

Evidence

  • before.mp4 — recipe run before fix (assertion fails at ac1-assert-full-width-centered)
  • after.mp4 — recipe run after fix (all nodes pass)
  • after-ac1-withdraw-input-centered.png — screenshot showing centered amount post-fix
  • recipe-coverage.md — AC coverage matrix (1/1 PROVEN)
  • recipe-quality.json — recipe quality assessment (verdict: pass)

Ticket

TAT-2847

Workflow Diagram (Mermaid)

flowchart TD
%% Perps withdraw input centering proof
entry(["ENTRY"]) --> node_setup_navigate_withdraw
node_setup_navigate_withdraw["setup-navigate-withdraw
ext_navigate_hash"]
node_setup_wait_withdraw_page["setup-wait-withdraw-page
wait_for"]
node_ac1_click_ten_percent["ac1-click-ten-percent
press"]
node_ac1_wait_non_zero_amount["ac1-wait-non-zero-amount
wait_for"]
node_ac1_assert_full_width_centered["ac1-assert-full-width-centered
eval_sync"]
node_ac1_screenshot_centered["ac1-screenshot-centered
screenshot"]
node_teardown_navigate_home["teardown-navigate-home
ext_navigate_hash"]
node_setup_navigate_withdraw --> node_setup_wait_withdraw_page
node_setup_wait_withdraw_page --> node_ac1_click_ten_percent
node_ac1_click_ten_percent --> node_ac1_wait_non_zero_amount
node_ac1_wait_non_zero_amount --> node_ac1_assert_full_width_centered
node_ac1_assert_full_width_centered --> node_ac1_screenshot_centered
node_ac1_screenshot_centered --> node_teardown_navigate_home

Recipe workflow diagram
flowchart TD
  %% Perps withdraw input centering proof
  __entry__(["ENTRY"]) --> node_setup_navigate_withdraw
  node_setup_navigate_withdraw["setup-navigate-withdraw<br/>ext_navigate_hash"]
  node_setup_wait_withdraw_page["setup-wait-withdraw-page<br/>wait_for"]
  node_ac1_click_ten_percent["ac1-click-ten-percent<br/>press"]
  node_ac1_wait_non_zero_amount["ac1-wait-non-zero-amount<br/>wait_for"]
  node_ac1_assert_full_width_centered["ac1-assert-full-width-centered<br/>eval_sync"]
  node_ac1_screenshot_centered["ac1-screenshot-centered<br/>screenshot"]
  node_teardown_navigate_home["teardown-navigate-home<br/>ext_navigate_hash"]
  node_setup_navigate_withdraw --> node_setup_wait_withdraw_page
  node_setup_wait_withdraw_page --> node_ac1_click_ten_percent
  node_ac1_click_ten_percent --> node_ac1_wait_non_zero_amount
  node_ac1_wait_non_zero_amount --> node_ac1_assert_full_width_centered
  node_ac1_assert_full_width_centered --> node_ac1_screenshot_centered
  node_ac1_screenshot_centered --> node_teardown_navigate_home
Loading

@abretonc7s abretonc7s marked this pull request as ready for review April 20, 2026 12:45
@abretonc7s abretonc7s requested a review from a team as a code owner April 20, 2026 12:45
@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 Bot commented Apr 20, 2026

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

Baseline (latest main): 71bd826 | Date: 10/14/58243 | Pipeline: 24666278050 | 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: -66%
  • loadNewAccount/total: -66%
  • bridgeUserActions/bridge_load_page: -15%
  • bridgeUserActions/bridge_load_asset_picker: -37%
  • bridgeUserActions/bridge_search_token: -26%
  • bridgeUserActions/total: -28%

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

  • 🟡 loadNewAccount/FCP: p75 2.5s
  • 🟡 confirmTx/FCP: p75 2.6s
  • 🟡 bridgeUserActions/FCP: p75 2.6s
  • 🟡 bridgeUserActions/LCP: 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: -22%
  • startupStandardHome/load: -12%
  • startupStandardHome/domContentLoaded: -13%
  • startupStandardHome/domInteractive: +14%
  • startupStandardHome/initialActions: -33%
  • startupStandardHome/loadScripts: -17%
  • startupStandardHome/numNetworkReqs: -37%
  • startupStandardHome/uiStartup: -18%
  • startupStandardHome/load: -13%
  • startupStandardHome/domContentLoaded: -13%
  • startupStandardHome/backgroundConnect: -34%
  • startupStandardHome/firstReactRender: -19%
  • startupStandardHome/loadScripts: -13%
  • startupStandardHome/numNetworkReqs: -44%
  • startupStandardHome/domInteractive: -30%
  • startupStandardHome/backgroundConnect: +23%
  • startupStandardHome/initialActions: +33%
  • startupStandardHome/numNetworkReqs: -34%
  • startupStandardHome/uiStartup: -12%
  • startupStandardHome/domInteractive: -31%
  • startupStandardHome/initialActions: -43%
  • startupStandardHome/setupStore: -64%
  • startupStandardHome/numNetworkReqs: -34%
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: -84%
  • onboardingImportWallet/metricsToWalletReadyScreen: -31%
  • onboardingImportWallet/doneButtonToHomeScreen: -76%
  • onboardingImportWallet/openAccountMenuToAccountListLoaded: +28%
  • onboardingImportWallet/total: -44%
  • onboardingNewWallet/srpButtonToPwForm: -77%
  • onboardingNewWallet/skipBackupToMetricsScreen: -67%
  • onboardingNewWallet/agreeButtonToOnboardingSuccess: -26%
  • onboardingNewWallet/doneButtonToAssetList: -22%
  • onboardingNewWallet/total: -24%
  • assetDetails/assetClickToPriceChart: -54%
  • assetDetails/total: -54%
  • solanaAssetDetails/assetClickToPriceChart: -70%
  • solanaAssetDetails/total: -70%
  • importSrpHome/openAccountMenuAfterLogin: -81%
  • importSrpHome/homeAfterImportWithNewWallet: -67%
  • importSrpHome/total: -60%
  • sendTransactions/openSendPageFromHome: -35%
  • sendTransactions/reviewTransactionToConfirmationPage: +37%
  • sendTransactions/total: +34%
  • swap/openSwapPageFromHome: -96%
  • swap/fetchAndDisplaySwapQuotes: +31%
  • swap/total: +11%

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

  • 🟡 assetDetails/FCP: p75 2.5s
  • 🟡 solanaAssetDetails/FCP: p75 2.6s
  • 🟡 importSrpHome/FCP: p75 2.5s
  • 🟡 sendTransactions/FCP: p75 2.6s
  • 🟡 swap/FCP: p75 2.5s
Dapp Page Load Benchmarks · Samples: 100
Benchmarkchrome-browserify
dappPageLoad🟢 [Show logs]
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 1.12 KiB (0.02%)
  • ui: 11.13 KiB (0.13%)
  • common: 15 Bytes (0%)

@abretonc7s
Copy link
Copy Markdown
Contributor Author

Acknowledged @MetaMask/perps CODEOWNERS notification. Changes are limited to perps-fiat-hero-amount-input (added w-full to center the hero input + unit test). No other perps components touched.

@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 Bot commented Apr 20, 2026

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

Baseline (latest main): 71bd826 | Date: 10/14/58243 | Pipeline: 24668308651 | 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: -56%
  • loadNewAccount/total: -56%
  • bridgeUserActions/bridge_load_page: -12%
  • bridgeUserActions/bridge_load_asset_picker: -34%
  • bridgeUserActions/bridge_search_token: -29%
  • bridgeUserActions/total: -28%

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

  • 🟡 loadNewAccount/FCP: p75 2.7s
  • 🟡 confirmTx/FCP: p75 2.4s
  • 🟡 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: -23%
  • startupStandardHome/load: -12%
  • startupStandardHome/domContentLoaded: -15%
  • startupStandardHome/domInteractive: +10%
  • startupStandardHome/initialActions: +33%
  • startupStandardHome/loadScripts: -18%
  • startupStandardHome/setupStore: +21%
  • startupStandardHome/numNetworkReqs: -37%
  • startupStandardHome/uiStartup: -18%
  • startupStandardHome/load: -14%
  • startupStandardHome/domContentLoaded: -13%
  • startupStandardHome/domInteractive: +11%
  • startupStandardHome/backgroundConnect: -35%
  • startupStandardHome/firstReactRender: -23%
  • startupStandardHome/loadScripts: -14%
  • startupStandardHome/setupStore: -13%
  • startupStandardHome/numNetworkReqs: -44%
  • startupStandardHome/uiStartup: -12%
  • startupStandardHome/domInteractive: -55%
  • startupStandardHome/backgroundConnect: +14%
  • startupStandardHome/initialActions: +33%
  • startupStandardHome/numNetworkReqs: -34%
  • startupStandardHome/uiStartup: -17%
  • startupStandardHome/load: -10%
  • startupStandardHome/domContentLoaded: -10%
  • startupStandardHome/domInteractive: -58%
  • startupStandardHome/backgroundConnect: -11%
  • startupStandardHome/initialActions: -43%
  • startupStandardHome/loadScripts: -10%
  • startupStandardHome/setupStore: -57%
  • 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/metricsToWalletReadyScreen: -43%
  • onboardingImportWallet/doneButtonToHomeScreen: -76%
  • onboardingImportWallet/openAccountMenuToAccountListLoaded: +27%
  • onboardingImportWallet/total: -44%
  • onboardingNewWallet/srpButtonToPwForm: -77%
  • onboardingNewWallet/skipBackupToMetricsScreen: -68%
  • onboardingNewWallet/agreeButtonToOnboardingSuccess: -22%
  • onboardingNewWallet/doneButtonToAssetList: -23%
  • onboardingNewWallet/total: -25%
  • assetDetails/assetClickToPriceChart: -55%
  • assetDetails/total: -55%
  • solanaAssetDetails/assetClickToPriceChart: -69%
  • solanaAssetDetails/total: -69%
  • importSrpHome/loginToHomeScreen: -15%
  • importSrpHome/openAccountMenuAfterLogin: -74%
  • importSrpHome/homeAfterImportWithNewWallet: -68%
  • importSrpHome/total: -61%
  • sendTransactions/reviewTransactionToConfirmationPage: +35%
  • sendTransactions/total: +33%
  • swap/openSwapPageFromHome: -96%
  • swap/fetchAndDisplaySwapQuotes: +32%
  • swap/total: +11%

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

  • 🟡 assetDetails/FCP: p75 2.4s
  • 🟡 solanaAssetDetails/FCP: p75 2.4s
  • 🟡 importSrpHome/FCP: p75 2.5s
  • 🟡 sendTransactions/INP: p75 248ms
  • 🟡 sendTransactions/FCP: p75 2.5s
  • 🟡 swap/FCP: p75 2.5s
Dapp Page Load Benchmarks · Samples: 100
Benchmarkchrome-browserify
dappPageLoad🟢 [Show logs]
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 1.12 KiB (0.02%)
  • ui: 11.32 KiB (0.13%)
  • common: 15 Bytes (0%)

@abretonc7s
Copy link
Copy Markdown
Contributor Author

Run Duration Model Nudges Grade Cost
9518d82f ? sonnet 0 ungraded $unknown
Worker report

No report available.

Copy link
Copy Markdown
Contributor

@aganglada aganglada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't before and after looking the same?

@abretonc7s
Copy link
Copy Markdown
Contributor Author

Isn't before and after looking the same?

yes I wanted to update the screenshot, the fix is working but it doesn't show because the input has a lot of decimals

@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 Bot commented Apr 22, 2026

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

Baseline (latest main): 71bd826 | Date: 10/14/58243 | Pipeline: 24786238380 | 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: -56%
  • loadNewAccount/total: -56%
  • bridgeUserActions/bridge_load_page: -17%
  • bridgeUserActions/bridge_load_asset_picker: -29%
  • bridgeUserActions/bridge_search_token: -28%
  • bridgeUserActions/total: -27%

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

  • 🟡 loadNewAccount/FCP: p75 2.7s
  • 🟡 confirmTx/FCP: p75 2.6s
  • 🟡 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: -21%
  • startupStandardHome/load: -10%
  • startupStandardHome/domContentLoaded: -12%
  • startupStandardHome/firstPaint: -11%
  • startupStandardHome/backgroundConnect: +18%
  • startupStandardHome/initialActions: -33%
  • startupStandardHome/loadScripts: -16%
  • startupStandardHome/setupStore: +21%
  • startupStandardHome/numNetworkReqs: -37%
  • startupStandardHome/uiStartup: -19%
  • startupStandardHome/load: -14%
  • startupStandardHome/domContentLoaded: -14%
  • startupStandardHome/firstPaint: -14%
  • startupStandardHome/backgroundConnect: -36%
  • startupStandardHome/firstReactRender: -23%
  • startupStandardHome/loadScripts: -14%
  • startupStandardHome/numNetworkReqs: -44%
  • startupStandardHome/uiStartup: -12%
  • startupStandardHome/domInteractive: -62%
  • startupStandardHome/initialActions: -33%
  • startupStandardHome/setupStore: -17%
  • startupStandardHome/numNetworkReqs: -34%
  • startupStandardHome/uiStartup: -16%
  • startupStandardHome/domInteractive: -56%
  • startupStandardHome/initialActions: -43%
  • 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/metricsToWalletReadyScreen: -26%
  • onboardingImportWallet/doneButtonToHomeScreen: -77%
  • onboardingImportWallet/openAccountMenuToAccountListLoaded: +17%
  • onboardingImportWallet/total: -46%
  • onboardingNewWallet/srpButtonToPwForm: -77%
  • onboardingNewWallet/skipBackupToMetricsScreen: -67%
  • onboardingNewWallet/agreeButtonToOnboardingSuccess: -23%
  • onboardingNewWallet/doneButtonToAssetList: -21%
  • onboardingNewWallet/total: -23%
  • assetDetails/assetClickToPriceChart: -56%
  • assetDetails/total: -56%
  • solanaAssetDetails/assetClickToPriceChart: -66%
  • solanaAssetDetails/total: -66%
  • importSrpHome/openAccountMenuAfterLogin: -72%
  • importSrpHome/homeAfterImportWithNewWallet: -69%
  • importSrpHome/total: -60%
  • sendTransactions/openSendPageFromHome: -15%
  • sendTransactions/selectTokenToSendFormLoaded: -18%
  • sendTransactions/reviewTransactionToConfirmationPage: +34%
  • sendTransactions/total: +32%
  • swap/openSwapPageFromHome: -96%
  • swap/fetchAndDisplaySwapQuotes: +31%
  • swap/total: +11%

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

  • 🟡 assetDetails/FCP: p75 2.6s
  • 🟡 solanaAssetDetails/FCP: p75 2.6s
  • 🟡 importSrpHome/FCP: p75 2.4s
  • 🟡 sendTransactions/INP: p75 264ms
  • 🟡 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: 43 Bytes (0%)
  • common: 20 Bytes (0%)

@gambinish
Copy link
Copy Markdown
Member

gambinish commented Apr 22, 2026

I've pulled this down and ran it, but it seems like the Withdraw amount (with many decimals) is still not centered. Could you double check that this is fixed in this PR?

Let me know if I'm doing anything wrong here.

Screenshot 2026-04-22 at 1 06 56 PM

@michalconsensys
Copy link
Copy Markdown
Contributor

Screenshot 2026-04-23 at 12 14 06

It still doesn't seem to be centered

…nput

Replace width: Xch with field-sizing: content so the input shrinks/grows
to its actual rendered text width. The ch unit overestimates width for
decimal amounts (decimal point is ~0.3ch) causing visual left-shift that
w-full alone could not fix.

Also replace brittle className assertions in tests with behavioral checks.
…ask/metamask-extension into fix/tat-2847-center-withdraw-input
@metamaskbot metamaskbot added the INVALID-PR-TEMPLATE PR's body doesn't match template label Apr 23, 2026
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 a4dc701. Configure here.

@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 Bot commented Apr 23, 2026

Builds ready [a4dc701]
⚡ Performance Benchmarks (Total: 🟢 7 pass · 🟡 7 warn · 🔴 1 fail)

Baseline (latest main): 71bd826 | Date: 10/14/58243 | Pipeline: 24830432334 | Baseline logs

Metricschrome-browserifychrome-webpackfirefox-browserifyfirefox-webpack
assetDetails🔴 [logs]

Regressions (🔴 1 failure)

  • assetDetails · chrome-browserify — cls(p75) [Show 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: -52%
  • loadNewAccount/total: -52%
  • bridgeUserActions/bridge_load_page: -20%
  • bridgeUserActions/bridge_load_asset_picker: -32%
  • bridgeUserActions/bridge_search_token: -25%
  • bridgeUserActions/total: -28%

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

  • 🟡 loadNewAccount/FCP: p75 2.9s
  • 🟡 confirmTx/FCP: 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: -26%
  • startupStandardHome/load: -15%
  • startupStandardHome/domContentLoaded: -17%
  • startupStandardHome/firstPaint: -30%
  • startupStandardHome/firstReactRender: -10%
  • startupStandardHome/initialActions: -33%
  • startupStandardHome/loadScripts: -21%
  • startupStandardHome/numNetworkReqs: -37%
  • startupStandardHome/uiStartup: -19%
  • startupStandardHome/load: -14%
  • startupStandardHome/domContentLoaded: -13%
  • startupStandardHome/firstPaint: -12%
  • startupStandardHome/backgroundConnect: -37%
  • startupStandardHome/firstReactRender: -23%
  • startupStandardHome/loadScripts: -14%
  • startupStandardHome/numNetworkReqs: -44%
  • startupStandardHome/uiStartup: -14%
  • startupStandardHome/domInteractive: -62%
  • startupStandardHome/initialActions: -33%
  • startupStandardHome/numNetworkReqs: -34%
  • startupStandardHome/uiStartup: -14%
  • startupStandardHome/domInteractive: -54%
  • startupStandardHome/initialActions: +14%
  • startupStandardHome/setupStore: -60%
  • startupStandardHome/numNetworkReqs: -32%
User Journey Benchmarks · Samples: 5 · mock API 🔴 1
Benchmarkchrome-browserify
onboardingImportWallet🟢 [Show logs]
onboardingNewWallet🟢 [Show logs]
assetDetails🔴 [Show logs] · 🔴 cls
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: -35%
  • onboardingImportWallet/doneButtonToHomeScreen: -79%
  • onboardingImportWallet/openAccountMenuToAccountListLoaded: +27%
  • onboardingImportWallet/total: -44%
  • onboardingNewWallet/srpButtonToPwForm: -77%
  • onboardingNewWallet/skipBackupToMetricsScreen: -66%
  • onboardingNewWallet/doneButtonToAssetList: -23%
  • onboardingNewWallet/total: -25%
  • assetDetails/assetClickToPriceChart: -42%
  • assetDetails/total: -42%
  • solanaAssetDetails/assetClickToPriceChart: -73%
  • solanaAssetDetails/total: -73%
  • importSrpHome/loginToHomeScreen: -13%
  • importSrpHome/openAccountMenuAfterLogin: -62%
  • importSrpHome/homeAfterImportWithNewWallet: -68%
  • importSrpHome/total: -61%
  • sendTransactions/openSendPageFromHome: -18%
  • sendTransactions/selectTokenToSendFormLoaded: -23%
  • sendTransactions/reviewTransactionToConfirmationPage: +34%
  • sendTransactions/total: +32%
  • swap/openSwapPageFromHome: -96%
  • swap/fetchAndDisplaySwapQuotes: +31%
  • swap/total: +11%

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

  • 🟡 assetDetails/FCP: p75 2.4s
  • 🔴 assetDetails/CLS: p75 0.308
  • 🟡 solanaAssetDetails/FCP: p75 2.4s
  • 🟡 importSrpHome/FCP: p75 2.5s
  • 🟡 sendTransactions/FCP: p75 2.4s
  • 🟡 swap/FCP: p75 2.4s
Dapp Page Load Benchmarks · Samples: 100
Benchmarkchrome-browserify
dappPageLoad🟢 [Show logs]
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 142 Bytes (0%)
  • ui: 1.85 KiB (0.02%)
  • common: 375 Bytes (0%)

field-sizing:content is not supported in Firefox. Replace with an
absolute-overlay approach: a hidden clone (white-space:pre) sets the
outer span's width to the exact rendered text width; the input overlays
it absolutely. Absolutely-positioned children are out-of-flow so they
don't affect the parent's max-content calculation, avoiding the circular
dependency that caused the inline-grid approach to stretch to full width.
@sonarqubecloud
Copy link
Copy Markdown

@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 Bot commented Apr 23, 2026

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

Baseline (latest main): 71bd826 | Date: 10/14/58243 | Pipeline: 24833077323 | 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: -69%
  • loadNewAccount/total: -69%
  • bridgeUserActions/bridge_load_page: -18%
  • bridgeUserActions/bridge_load_asset_picker: -29%
  • bridgeUserActions/bridge_search_token: -25%
  • bridgeUserActions/total: -26%

🌐 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 · 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: -21%
  • startupStandardHome/load: -11%
  • startupStandardHome/domContentLoaded: -12%
  • startupStandardHome/domInteractive: +13%
  • startupStandardHome/backgroundConnect: +15%
  • startupStandardHome/initialActions: -33%
  • startupStandardHome/loadScripts: -16%
  • startupStandardHome/setupStore: +14%
  • startupStandardHome/numNetworkReqs: -37%
  • startupStandardHome/uiStartup: -18%
  • startupStandardHome/load: -14%
  • startupStandardHome/domContentLoaded: -13%
  • startupStandardHome/firstPaint: -20%
  • startupStandardHome/backgroundConnect: -32%
  • startupStandardHome/firstReactRender: -23%
  • startupStandardHome/loadScripts: -14%
  • startupStandardHome/numNetworkReqs: -44%
  • startupStandardHome/uiStartup: -11%
  • startupStandardHome/domInteractive: -51%
  • startupStandardHome/initialActions: -33%
  • startupStandardHome/setupStore: -17%
  • startupStandardHome/numNetworkReqs: -34%
  • startupStandardHome/uiStartup: -16%
  • startupStandardHome/domInteractive: -59%
  • startupStandardHome/initialActions: +14%
  • startupStandardHome/setupStore: -60%
  • 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: -84%
  • onboardingImportWallet/metricsToWalletReadyScreen: -31%
  • onboardingImportWallet/doneButtonToHomeScreen: -76%
  • onboardingImportWallet/openAccountMenuToAccountListLoaded: +27%
  • onboardingImportWallet/total: -42%
  • onboardingNewWallet/srpButtonToPwForm: -77%
  • onboardingNewWallet/skipBackupToMetricsScreen: -65%
  • onboardingNewWallet/agreeButtonToOnboardingSuccess: +18%
  • onboardingNewWallet/doneButtonToAssetList: -27%
  • onboardingNewWallet/total: -28%
  • assetDetails/assetClickToPriceChart: -36%
  • assetDetails/total: -36%
  • solanaAssetDetails/assetClickToPriceChart: -63%
  • solanaAssetDetails/total: -63%
  • importSrpHome/loginToHomeScreen: -14%
  • importSrpHome/openAccountMenuAfterLogin: -85%
  • importSrpHome/homeAfterImportWithNewWallet: -69%
  • importSrpHome/total: -61%
  • sendTransactions/openSendPageFromHome: -23%
  • sendTransactions/selectTokenToSendFormLoaded: -22%
  • sendTransactions/reviewTransactionToConfirmationPage: +33%
  • sendTransactions/total: +33%
  • swap/openSwapPageFromHome: -96%
  • swap/fetchAndDisplaySwapQuotes: +31%
  • swap/total: +11%

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

  • 🟡 assetDetails/FCP: p75 2.6s
  • 🟡 solanaAssetDetails/FCP: p75 2.5s
  • 🟡 importSrpHome/FCP: p75 2.5s
  • 🟡 sendTransactions/INP: p75 224ms
  • 🟡 sendTransactions/FCP: p75 2.5s
  • 🟡 swap/FCP: p75 2.5s
Dapp Page Load Benchmarks · Samples: 100
Benchmarkchrome-browserify
dappPageLoad🟢 [Show logs]

📈 Results compared to the previous 5 runs on main

  • dappPageLoad/pageLoadTime: -21%
  • dappPageLoad/domContentLoaded: -23%
  • dappPageLoad/firstPaint: -18%
  • dappPageLoad/firstContentfulPaint: -18%
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 158 Bytes (0%)
  • ui: 3.33 KiB (0.04%)
  • common: 439 Bytes (0%)

@metamaskbot metamaskbot removed the INVALID-PR-TEMPLATE PR's body doesn't match template label Apr 23, 2026
@abretonc7s abretonc7s added this pull request to the merge queue Apr 27, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 28, 2026
@aganglada aganglada added team-perps Perps team and removed team-perps Perps team labels Apr 28, 2026
@HowardBraham HowardBraham added this pull request to the merge queue Apr 28, 2026
@HowardBraham HowardBraham added the retry-ci Tells GitHub Actions to retry failed jobs, label removed automatically before the retry label Apr 28, 2026
Merged via the queue into main with commit d3987ca Apr 28, 2026
223 of 224 checks passed
@HowardBraham HowardBraham deleted the fix/tat-2847-center-withdraw-input branch April 28, 2026 16:42
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 28, 2026
@github-actions github-actions Bot removed the retry-ci Tells GitHub Actions to retry failed jobs, label removed automatically before the retry label Apr 28, 2026
@metamaskbot metamaskbot added the release-13.30.0 Issue or pull request that will be included in release 13.30.0 label Apr 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants