Skip to content

feat: refresh new state#40230

Merged
salimtb merged 5 commits intomainfrom
feat/refresh-new-state
Feb 20, 2026
Merged

feat: refresh new state#40230
salimtb merged 5 commits intomainfrom
feat/refresh-new-state

Conversation

@salimtb
Copy link
Copy Markdown
Contributor

@salimtb salimtb commented Feb 19, 2026

Description

refresh new state

Open in GitHub Codespaces

Changelog

CHANGELOG entry: refresh new state

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

Medium Risk
Touches asset refresh flow across UI and background and introduces a forced-update fetch, which could increase network/load or cause refresh regressions, but the behavior is gated behind a feature flag and covered by tests.

Overview
Adds a new background API getAssets (forcing refresh) and a UI thunk refreshAssetsForSelectedAccount to fetch unified assets for specific accounts with optional chainIds/assetTypes.

Updates the asset list refresh control to call this new unified refresh path behind the assets-unify-state feature flag while keeping existing balance/token detection refresh behavior, and fixes non‑EVM historical price fetching to no-op when no internalAccount is available. Includes unit tests covering the new refresh action’s background call behavior and error handling.

Written by Cursor Bugbot for commit 6ce4011. This will update automatically on new commits. 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 Feb 19, 2026

✨ Files requiring CODEOWNER review ✨

💎 @MetaMask/metamask-assets (1 files, +13 -0)
  • 📁 ui/
    • 📁 components/
      • 📁 app/
        • 📁 assets/
          • 📁 asset-list/
            • 📁 asset-list-control-bar/
              • 📄 asset-list-control-bar.tsx +13 -0

@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 bot commented Feb 19, 2026

Builds ready [8456a0f]
UI Startup Metrics (1423 ± 100 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup14231218165710014671600
load1224103914229312671406
domContentLoaded1217101814149312541396
domInteractive2818100172470
firstPaint167681419146215260
backgroundConnect25423130213258281
firstReactRender2012170161925
initialActions104113
loadScripts97878811759110191154
setupStore1363551522
numNetworkReqs312288202285
BrowserifyPower User HomeuiStartup2141133810547134920404144
load12121046166314212731529
domContentLoaded11951039156913512511483
domInteractive3519241263573
firstPaint204751588163260352
backgroundConnect631306873612393732053
firstReactRender24154462638
initialActions103112
loadScripts93779013131289811218
setupStore1674671733
numNetworkReqs65291262375114
WebpackStandard HomeuiStartup91072512201059691097
load7756211045105858959
domContentLoaded7696171040104852949
domInteractive3017122212674
firstPaint1266643069140229
backgroundConnect29215283246
firstReactRender18133662032
initialActions102112
loadScripts7666151038103850941
setupStore1272841320
numNetworkReqs322295203184
WebpackPower User HomeuiStartup1256943218818413511585
load74565013331207381026
domContentLoaded73664313201207241019
domInteractive38201482637124
firstPaint1387133863158266
backgroundConnect16613341546166282
firstReactRender22173432428
initialActions104111
loadScripts73364113111187221011
setupStore1344361521
numNetworkReqs1174124743146203
FirefoxBrowserifyStandard HomeuiStartup16501408213615316991973
load13911184181112414321673
domContentLoaded13901180181012414321672
domInteractive82333035892193
firstPaint------
backgroundConnect5826185196284
firstReactRender14112121416
initialActions103012
loadScripts13641170177311914091573
setupStore238217341694
numNetworkReqs311996192786
BrowserifyPower User HomeuiStartup29402247425141631623731
load16661306244525317662192
domContentLoaded16651305244525317662191
domInteractive14034788130129369
firstPaint------
backgroundConnect3411171044254386914
firstReactRender21157982130
initialActions213123
loadScripts16251274241824117022120
setupStore1576794210155673
numNetworkReqs63251683780134
WebpackStandard HomeuiStartup17771437321731517962117
load14711212284221015081623
domContentLoaded14701211284221015071619
domInteractive982921846133183
firstPaint------
backgroundConnect7926141714173166
firstReactRender17125151725
initialActions104122
loadScripts14451199281120714821572
setupStore257216322068
numNetworkReqs312090162871
WebpackPower User HomeuiStartup27671991424747028963690
load15861294328430817092215
domContentLoaded15851294328430817092215
domInteractive119301245137125290
firstPaint------
backgroundConnect348821597285424916
firstReactRender22166672433
initialActions203123
loadScripts15381275319829216241863
setupStore1708859222216674
numNetworkReqs61261583376127
📊 Page Load Benchmark Results

Current Commit: 8456a0f | Date: 2/19/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.06s (±45ms) 🟡 | historical mean value: 1.03s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 747ms (±41ms) 🟢 | historical mean value: 724ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 82ms (±13ms) 🟢 | historical mean value: 86ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.06s 45ms 1.02s 1.39s 1.11s 1.39s
domContentLoaded 747ms 41ms 713ms 1.05s 796ms 1.05s
firstPaint 82ms 13ms 64ms 200ms 92ms 200ms
firstContentfulPaint 82ms 13ms 64ms 200ms 92ms 200ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: -428 Bytes (-0.01%)
  • ui: 1.37 KiB (0.02%)
  • common: 914 Bytes (0.01%)

@salimtb salimtb marked this pull request as ready for review February 19, 2026 13:16
@salimtb salimtb requested a review from a team as a code owner February 19, 2026 13:16
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.

@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 bot commented Feb 19, 2026

Builds ready [6ce4011]
UI Startup Metrics (1383 ± 103 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup13831147170810314211561
load116696014749512041332
domContentLoaded115894814699511991326
domInteractive2715126192474
firstPaint163621153125202333
backgroundConnect23020739424234256
firstReactRender16103741822
initialActions106113
loadScripts9487481246949771117
setupStore1274651320
numNetworkReqs3122100212289
BrowserifyPower User HomeuiStartup2909148010689175331076236
load12111022210116012461470
domContentLoaded11901006195714512291437
domInteractive3519227293393
firstPaint251751646258256605
backgroundConnect9752798269122111383123
firstReactRender24165672635
initialActions103112
loadScripts96179816831369951198
setupStore1676591729
numNetworkReqs81331552593131
WebpackStandard HomeuiStartup89172112841189211143
load7576251047100800945
domContentLoaded751620103799794937
domInteractive3115114232693
firstPaint1216542166136245
backgroundConnect28205673241
firstReactRender19124272234
initialActions104113
loadScripts748618103598791935
setupStore1364161425
numNetworkReqs312294202588
WebpackPower User HomeuiStartup1286879273222913941642
load77466213461167701044
domContentLoaded76265213291167571038
domInteractive45202163642139
firstPaint1747959790217310
backgroundConnect1821331312122169278
firstReactRender22183232327
initialActions102111
loadScripts76065013191147551028
setupStore1354871522
numNetworkReqs1264225145156197
FirefoxBrowserifyStandard HomeuiStartup16451398252719416652037
load13751178217715214051646
domContentLoaded13741178217615214041646
domInteractive76331883794139
firstPaint------
backgroundConnect63303003468133
firstReactRender14112521416
initialActions103122
loadScripts13471154214514813801606
setupStore218180311599
numNetworkReqs312099202588
BrowserifyPower User HomeuiStartup29442035805864430393686
load16691323652057117122217
domContentLoaded16681323652057117112216
domInteractive193551821252188484
firstPaint------
backgroundConnect4971191731327758993
firstReactRender19146981927
initialActions2047522
loadScripts16211301647356416622085
setupStore14614767183142666
numNetworkReqs85312083496154
WebpackStandard HomeuiStartup17191457324331517052088
load14571196297629114621668
domContentLoaded14561195297629214611668
domInteractive792934149100140
firstPaint------
backgroundConnect60222193661134
firstReactRender15122831619
initialActions103122
loadScripts14291182294828814331651
setupStore186139211550
numNetworkReqs311994182778
WebpackPower User HomeuiStartup28981923857982630253466
load16641303729373016252262
domContentLoaded16641303729373016252261
domInteractive188471017192205690
firstPaint------
backgroundConnect41512012342785151029
firstReactRender221675102332
initialActions203122
loadScripts16251272721972415792226
setupStore15911700166234557
numNetworkReqs84322403990174
📊 Page Load Benchmark Results

Current Commit: 6ce4011 | Date: 2/19/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.03s (±40ms) 🟡 | historical mean value: 1.03s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 724ms (±38ms) 🟢 | historical mean value: 726ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 80ms (±12ms) 🟢 | historical mean value: 84ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.03s 40ms 1.01s 1.34s 1.06s 1.34s
domContentLoaded 724ms 38ms 702ms 1.02s 750ms 1.02s
firstPaint 80ms 12ms 64ms 176ms 92ms 176ms
firstContentfulPaint 80ms 12ms 64ms 176ms 92ms 176ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: -428 Bytes (-0.01%)
  • ui: 1.39 KiB (0.02%)
  • common: 914 Bytes (0.01%)

@salimtb salimtb added this pull request to the merge queue Feb 20, 2026
Merged via the queue into main with commit 397ad0e Feb 20, 2026
177 checks passed
@salimtb salimtb deleted the feat/refresh-new-state branch February 20, 2026 15:58
@github-actions github-actions bot locked and limited conversation to collaborators Feb 20, 2026
@metamaskbot metamaskbot added the release-13.21.0 Issue or pull request that will be included in release 13.21.0 label Feb 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-13.21.0 Issue or pull request that will be included in release 13.21.0 size-M team-assets

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants