Skip to content

release(runway): cherry-pick feat: added timer for balance loading - #45049

Merged
HowardBraham merged 1 commit into
release/13.42.0from
cherry-pick-13-42-0-e3abdc3
Jul 30, 2026
Merged

HowardBraham merged 1 commit into
release/13.42.0from
cherry-pick-13-42-0-e3abdc3

Conversation

@runway-github

@runway-github runway-github Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

This PR is to add timeout to the balance loading state

Description

Changelog

CHANGELOG entry: null

Related issues

Fixes:

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

Before

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.

Note

Low Risk
UI-only loading-state timing in wallet overview; no auth, data, or
payment logic.

Overview
Wallet overview no longer keeps the balance skeleton up
indefinitely when the account has on-chain balance but aggregate fiat is
still $0 (e.g. rates still loading).

coin-overview adds a 1.5s timer (ZERO_FIAT_BALANCE_DELAY_MS):
the loading skeleton only applies while shouldDelayZeroFiatBalance is
true and the delay has not elapsed. After the timeout, the normal
balance UI is shown instead of staying on the skeleton. The timer
restarts when enabled networks change (stable key from
enabledNetworks).

eth-overview.test.js asserts the skeleton disappears after 1500ms
(fake timers) and resets real timers in afterEach.

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

[e3abdc3](https://github.com/MetaMask/metamask-extension/commit/e3abdc3e786bba412b149332070c60c70ce078d2)

This PR is to add timeout to the balance loading state

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`

If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`

(This helps the Release Engineer do their job more quickly and
accurately)
-->

CHANGELOG entry: null

Fixes:

1. Go to this page...
2.
3.

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

<!-- [screenshots/recordings] -->

<!-- [screenshots/recordings] -->

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

- [ ] 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.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> UI-only loading-state timing in wallet overview; no auth, data, or
payment logic.
>
> **Overview**
> **Wallet overview** no longer keeps the balance skeleton up
indefinitely when the account has on-chain balance but aggregate fiat is
still **$0** (e.g. rates still loading).
>
> `coin-overview` adds a **1.5s** timer (`ZERO_FIAT_BALANCE_DELAY_MS`):
the loading skeleton only applies while `shouldDelayZeroFiatBalance` is
true **and** the delay has not elapsed. After the timeout, the normal
balance UI is shown instead of staying on the skeleton. The timer
**restarts** when enabled networks change (stable key from
`enabledNetworks`).
>
> `eth-overview.test.js` asserts the skeleton disappears after 1500ms
(fake timers) and resets real timers in `afterEach`.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
12dce08. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
@metamask-ci metamask-ci Bot added the team-bots Bot team (for MetaMask Bot, Runway Bot, etc.) label Jul 30, 2026
@sonarqubecloud

Copy link
Copy Markdown

@metamask-ci

metamask-ci Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor
Builds ready [5d41c86]
⚡ Performance Benchmarks (Total: 🟢 13 pass · 🟡 10 warn · 🔴 0 fail)

Baseline (latest main): 171ed20 | Date: 7/28/2026 | Pipeline: 30564064438 | Baseline logs

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

📈 Results compared to the previous 5 runs on main

  • ↓ bridgeUserActions/bridge_load_asset_picker: -15%
  • ↓ bridgeUserActions/longTaskCount: -44%
  • ↓ bridgeUserActions/longTaskTotalDuration: -31%
  • ↓ loadNewAccount/inp: -17%
  • ↑ loadNewAccount/lcp: +1161%
  • ↑ confirmTx/confirm_tx: +10%
  • ↓ confirmTx/longTaskCount: -100%
  • ↓ confirmTx/longTaskTotalDuration: -100%
  • ↓ confirmTx/longTaskMaxDuration: -100%
  • ↓ confirmTx/tbt: -100%
  • ↑ confirmTx/total: +10%
  • ↑ confirmTx/inp: +44%
  • ↓ confirmTx/fcp: -46%
  • ↑ confirmTx/lcp: +1159%
  • ↑ bridgeUserActions/bridge_load_page: +194%
  • ↑ bridgeUserActions/bridge_load_asset_picker: +65%
  • ↓ bridgeUserActions/longTaskCount: -100%
  • ↓ bridgeUserActions/longTaskTotalDuration: -100%
  • ↓ bridgeUserActions/longTaskMaxDuration: -100%
  • ↓ bridgeUserActions/tbt: -100%
  • ↑ bridgeUserActions/total: +14%
  • ↓ bridgeUserActions/inp: -15%
  • ↑ bridgeUserActions/fcp: +12%
  • ↑ bridgeUserActions/lcp: +1193%

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

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

📈 Results compared to the previous 5 runs on main

  • ↑ startupPowerUserHome/uiStartup: +17%
  • ↑ startupPowerUserHome/load: +13%
  • ↑ startupPowerUserHome/domContentLoaded: +13%
  • ↑ startupPowerUserHome/domInteractive: +12%
  • ↑ startupPowerUserHome/backgroundConnect: +53%
  • ↑ startupPowerUserHome/firstReactRender: +19%
  • ↑ startupPowerUserHome/initialActions: +11%
  • ↑ startupPowerUserHome/loadScripts: +14%
  • ↑ startupPowerUserHome/setupStore: +285%
  • ↑ startupPowerUserHome/lcp: +15%

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

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

📈 Results compared to the previous 5 runs on main

  • ↓ onboardingImportWallet/confirmSrpToPwForm: -14%
  • ↓ onboardingImportWallet/pwFormToMetricsScreen: -16%
  • ↓ onboardingImportWallet/metricsToWalletReadyScreen: -27%
  • ↓ onboardingImportWallet/doneButtonToHomeScreen: -92%
  • ↓ onboardingImportWallet/openAccountMenuToAccountListLoaded: -69%
  • ↓ onboardingImportWallet/longTaskCount: -100%
  • ↓ onboardingImportWallet/longTaskTotalDuration: -100%
  • ↓ onboardingImportWallet/longTaskMaxDuration: -100%
  • ↓ onboardingImportWallet/tbt: -100%
  • ↓ onboardingImportWallet/total: -86%
  • ↓ onboardingNewWallet/longTaskCount: -69%
  • ↓ onboardingNewWallet/longTaskTotalDuration: -75%
  • ↓ onboardingNewWallet/longTaskMaxDuration: -42%
  • ↓ onboardingNewWallet/tbt: -94%
  • ↓ solanaAssetDetails/assetClickToPriceChart: -28%
  • ↓ solanaAssetDetails/longTaskCount: -100%
  • ↓ solanaAssetDetails/longTaskTotalDuration: -100%
  • ↓ solanaAssetDetails/longTaskMaxDuration: -100%
  • ↓ solanaAssetDetails/tbt: -100%
  • ↓ solanaAssetDetails/total: -28%
  • ↑ solanaAssetDetails/inp: +11%
  • ↓ importSrpHome/loginToHomeScreen: -31%
  • ↓ importSrpHome/homeAfterImportWithNewWallet: -32%
  • ↓ importSrpHome/longTaskCount: -65%
  • ↓ importSrpHome/longTaskTotalDuration: -64%
  • ↓ importSrpHome/longTaskMaxDuration: -31%
  • ↓ importSrpHome/tbt: -58%
  • ↓ importSrpHome/total: -31%
  • ↓ importSrpHome/inp: -22%
  • ↓ importSrpHome/lcp: -17%
  • ↓ importSrpHome/cls: -15%
  • ↓ sendTransactions/openSendPageFromHome: -23%
  • ↓ sendTransactions/reviewTransactionToConfirmationPage: -98%
  • ↓ sendTransactions/longTaskCount: -100%
  • ↓ sendTransactions/longTaskTotalDuration: -100%
  • ↓ sendTransactions/longTaskMaxDuration: -100%
  • ↓ sendTransactions/tbt: -100%
  • ↓ sendTransactions/total: -95%
  • ↓ sendTransactions/inp: -26%
  • ↓ sendTransactions/lcp: -64%
  • ↑ sendTransactions/cls: +171%
  • ↑ swap/fetchAndDisplaySwapQuotes: +108%
  • ↓ swap/longTaskCount: -100%
  • ↓ swap/longTaskTotalDuration: -100%
  • ↓ swap/longTaskMaxDuration: -100%
  • ↓ swap/tbt: -100%
  • ↑ swap/total: +106%
  • ↑ swap/inp: +18%
  • ↓ swap/lcp: -74%
  • ↓ swap/cls: -92%

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

  • 🟡 importSrpHome/INP: p75 240ms
  • 🟡 assetDetails/FCP: p75 1.9s
  • 🟡 solanaAssetDetails/FCP: p75 2.0s
  • 🟡 importSrpHome/FCP: p75 2.0s
  • 🟡 sendTransactions/FCP: p75 1.9s
  • 🟡 swap/FCP: p75 1.9s
Dapp Page Load Benchmarks · Samples: 100
Benchmarkchrome-webpack
dappPageLoad
[Sentry log · main/release]
🟢 [CI log]
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: -25.95 KiB (-0.18%)
  • ui: 2.36 KiB (0.01%)
  • common: 0 Bytes (0%)
  • other: 0 Bytes (0%)
  • contentScripts: 430 Bytes (0.02%)
  • zip: -6.11 MiB (-22.5%)

@HowardBraham
HowardBraham merged commit 4a4800e into release/13.42.0 Jul 30, 2026
355 of 367 checks passed
@HowardBraham
HowardBraham deleted the cherry-pick-13-42-0-e3abdc3 branch July 30, 2026 20:24
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 30, 2026
@metamaskbot metamaskbot added the release-13.42.0 Issue or pull request that will be included in release 13.42.0 label Jul 31, 2026
@gauthierpetetin

Copy link
Copy Markdown
Contributor

No release label on PR. Adding release label release-13.42.0 on PR, as PR was cherry-picked in branch 13.42.0.

This branch was previously deployed

1 inactive deployment
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-13.42.0 Issue or pull request that will be included in release 13.42.0 risk:medium team-bots Bot team (for MetaMask Bot, Runway Bot, etc.)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants