Skip to content

feat: add collapsible wallet sections to Accounts page#39645

Merged
georgewrmarshall merged 3 commits intomainfrom
n3ps/collapsable-accounts
Feb 11, 2026
Merged

feat: add collapsible wallet sections to Accounts page#39645
georgewrmarshall merged 3 commits intomainfrom
n3ps/collapsable-accounts

Conversation

@n3ps
Copy link
Contributor

@n3ps n3ps commented Jan 29, 2026

Description

This PR adds collapsible wallet sections to the MultichainAccountList component on the Accounts page, allowing users to collapse and expand wallet sections (including pinned accounts) to better organize their accounts view.

Currently, users with multiple wallets and many accounts have limited ability to manage the visual organization of their accounts. This PR extends the existing collapse functionality (previously only available for hidden accounts) to all wallet sections and the pinned accounts section.

Implementation approach:

  • Added collapsedSectionKeys Set to track which sections are collapsed
  • Enhanced the header ListItem type to support collapsible sections with sectionKey, isCollapsible, and isExpanded properties
  • Wallet headers and pinned section header are now clickable buttons with expand/collapse arrow indicators
  • All sections are expanded by default and can be independently collapsed
  • Improved virtualizer integration using getItemKey config to ensure proper React reconciliation during collapse/expand

Technical details:

  • Sections conditionally include/exclude items from the data array based on collapse state
  • Uses getItemKey in virtualizer config for stable keys during list changes
  • No forced remounting - virtualizer handles height recalculation naturally

Open in GitHub Codespaces

Changelog

CHANGELOG entry: Added ability to collapse wallet sections in the Accounts page

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/MDP-678
Supersedes: #39583

Manual testing steps

  1. Open MetaMask extension
  2. Navigate to the Accounts page (click account icon)
  3. Verify you see multiple wallet sections with headers (e.g., "Wallet 1", "Ledger")
  4. If you have pinned accounts, verify the "Pinned" section header is also present
  5. Click on any section header (Pinned, Wallet 1, Wallet 2, etc.)
  6. Verify the section collapses (accounts hidden, arrow changes from up to down)
  7. Click the header again
  8. Verify the section expands (accounts shown, arrow changes from down to up)
  9. Test collapsing multiple sections independently
  10. Verify hidden accounts section still works as expected
  11. Add a new account and verify it appears in the correct section
  12. Collapse and expand repeatedly to ensure no spacing issues or visual glitches

Screenshots/Recordings

Before

Wallet headers were not interactive - all wallets were always expanded. Only the hidden accounts section could be collapsed.

before720.mov

After

All section headers (Pinned, Wallet 1, Wallet 2, etc.) are now clickable buttons with collapse/expand arrows. Each section can be independently collapsed to hide its accounts.

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

Medium Risk
Medium risk because it changes list rendering/state and virtualized keying, which could cause subtle UI/scroll/reconciliation issues when collapsing/expanding sections.

Overview
Adds collapsible section headers to MultichainAccountList for both the Pinned section and each wallet section, tracking collapsed state via a collapsedSectionKeys set and conditionally omitting section items from the list data.

Updates header rendering to be a clickable button with aria-expanded and an up/down arrow indicator, and adds unit tests covering wallet, pinned, and independent multi-section collapse behavior.

Improves VirtualizedList stability by wiring keyExtractor into useVirtualizer via getItemKey and using the virtualizer-provided key when no extractor is given.

Written by Cursor Bugbot for commit 3e086d4. This will update automatically on new commits. Configure here.

@github-actions
Copy link
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.

@metamaskbot metamaskbot added the team-core-extension-ux Core Extension UX team label Jan 29, 2026
@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Jan 29, 2026

✨ Files requiring CODEOWNER review ✨

🔑 @MetaMask/accounts-engineers (2 files, +206 -10)
  • 📁 ui/
    • 📁 components/
      • 📁 multichain-accounts/
        • 📁 multichain-account-list/
          • 📄 multichain-account-list.test.tsx +126 -0
          • 📄 multichain-account-list.tsx +80 -10

@georgewrmarshall georgewrmarshall changed the title test: this might work feat: add collapsible wallet sections to Accounts page Jan 29, 2026
@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Jan 29, 2026

Builds ready [b70d5bb]
UI Startup Metrics (1350 ± 128 ms)
PlatformBuildTypePageMetricTest Title (ms)Persona (ms)Mean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--13501094176912814251578
load--1144937151811712161345
domContentLoaded--1137932151311712071341
domInteractive--2916103192582
firstPaint--16168966110204301
backgroundConnect--24321631217253278
firstReactRender--18103552028
initialActions--107113
loadScripts--90970112771159771111
setupStore--1464171730
numNetworkReqs--211576161569
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--317318297014120543075391
load--12031000161812612521472
domContentLoaded--1183989159211912431455
domInteractive--40182593537126
firstPaint--201831534163252379
backgroundConnect--987297303077015142676
firstReactRender--27187092947
initialActions--109113
loadScripts--93376512981099821177
setupStore--18868102142
numNetworkReqs--1065822535120186
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--8386761048878921014
load--69460292172748824
domContentLoaded--68959891471743814
domInteractive--261693182378
firstPaint--1146337059139216
backgroundConnect--38171222539118
firstReactRender--16104471835
initialActions--1012111
loadScripts--68659691271742806
setupStore--1268181222
numNetworkReqs--221586191582
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--1278845219626614681757
load--71561610801067091011
domContentLoaded--70461010721067011000
domInteractive--3518115213695
firstPaint--1446651981168333
backgroundConnect--16013340550153285
firstReactRender--23163442533
initialActions--103111
loadScripts--7026081065104699993
setupStore--1253841417
numNetworkReqs--1125125945111233
19--------
FirefoxBrowserifyStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--14851209208417415961778
load--1189982179613312661459
domContentLoaded--1188982179613312651458
domInteractive--793331055108218
firstPaint--------
backgroundConnect--752640861101179
firstReactRender--1494451422
initialActions--103122
loadScripts--1145968176611712221370
setupStore--174262331265
numNetworkReqs--231284181977
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--30121930892295132684402
load--13831093299332314312267
domContentLoaded--13831093299232314312267
domInteractive--173541333191178408
firstPaint--------
backgroundConnect--64112651157727251407
firstReactRender--21145352227
initialActions--216122
loadScripts--13071059294430313402167
setupStore--11217846148114471
numNetworkReqs--994524046100227
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--16901365223019618082110
load--14301176194113815121704
domContentLoaded--14291176194113815071703
domInteractive--823018441120146
firstPaint--------
backgroundConnect--712720645106161
firstReactRender--16116981522
initialActions--103122
loadScripts--13941163191612314611612
setupStore--2242704412124
numNetworkReqs--221280161975
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--30082280658553132393689
load--15961293460136916701999
domContentLoaded--15951292460036916691998
domInteractive--178501196159230523
firstPaint--------
backgroundConnect--47612111872807191014
firstReactRender--21154752429
initialActions--207122
loadScripts--15511263456136516251933
setupStore--14217986177157578
numNetworkReqs--1004128846101200
19--------
📊 Page Load Benchmark Results

Current Commit: b70d5bb | Date: 1/29/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 997ms (±43ms) 🟢 | historical mean value: 1.04s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 692ms (±59ms) 🟢 | historical mean value: 725ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 87ms (±122ms) 🟢 | historical mean value: 79ms ⬆️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 997ms 43ms 967ms 1.33s 1.02s 1.33s
domContentLoaded 692ms 59ms 669ms 1.23s 705ms 1.23s
firstPaint 87ms 122ms 64ms 1.30s 84ms 1.30s
firstContentfulPaint 87ms 122ms 64ms 1.30s 84ms 1.30s
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 4.85 KiB (0.09%)
  • ui: 1.14 KiB (0.01%)
  • common: 3.69 KiB (0.04%)

@georgewrmarshall georgewrmarshall marked this pull request as ready for review January 29, 2026 19:27
@georgewrmarshall georgewrmarshall requested a review from a team as a code owner January 29, 2026 19:27
@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Jan 29, 2026

Builds ready [eccfa16]
UI Startup Metrics (1325 ± 118 ms)
PlatformBuildTypePageMetricTest Title (ms)Persona (ms)Mean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--13251072171311813941506
load--1128907152011512031305
domContentLoaded--1122899151411411971299
domInteractive--2716108202381
firstPaint--154661149122191309
backgroundConnect--23521628613238263
firstReactRender--18113552128
initialActions--1010114
loadScripts--90369412941149801088
setupStore--1373951724
numNetworkReqs--221588191578
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--233115088437104722954709
load--1087936167114911401392
domContentLoaded--1066921166414311131359
domInteractive--3717128253796
firstPaint--226811524169250389
backgroundConnect--53027530565334451642
firstReactRender--23164652535
initialActions--106113
loadScripts--84670814361379011102
setupStore--1454571733
numNetworkReqs--1375531752161242
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--783634105390844944
load--64356496375702767
domContentLoaded--63855895974695759
domInteractive--241488171977
firstPaint--1135760175151252
backgroundConnect--3717134254399
firstReactRender--15104051726
initialActions--104112
loadScripts--63555695674693754
setupStore--1163151123
numNetworkReqs--221584181576
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--1273899213222914681683
load--72162513391167071006
domContentLoaded--7116171327117695999
domInteractive--37181992934109
firstPaint--1416955092159397
backgroundConnect--16713281981159310
firstReactRender--23183642533
initialActions--101011
loadScripts--7086151320115693990
setupStore--1252231518
numNetworkReqs--1445132057169260
19--------
FirefoxBrowserifyStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--14421148201017515611738
load--1162985167712812451361
domContentLoaded--1161985167712812451361
domInteractive--783326549111151
firstPaint--------
backgroundConnect--66232114793167
firstReactRender--1398181318
initialActions--103122
loadScripts--1126969165111811911329
setupStore--183251331077
numNetworkReqs--231288191977
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--27621857875194629133787
load--13221035610253412971901
domContentLoaded--13221035610153412971901
domInteractive--163511274163165462
firstPaint--------
backgroundConnect--48912556868104441362
firstReactRender--23146272332
initialActions--207123
loadScripts--12231019229421312571644
setupStore--15714839205140660
numNetworkReqs--87402414598208
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--16781351226218417852037
load--14271195166411815351631
domContentLoaded--14261195166411815331631
domInteractive--923022843131180
firstPaint--------
backgroundConnect--772632256129175
firstReactRender--14114241518
initialActions--103112
loadScripts--1380117215899414391563
setupStore--2542784911157
numNetworkReqs--231286181980
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--30102059548168131894633
load--15831266415143016062686
domContentLoaded--15831266415043016062686
domInteractive--153331291168145480
firstPaint--------
backgroundConnect--35612717183183281150
firstReactRender--22165472531
initialActions--208123
loadScripts--15341229411138815722364
setupStore--18281051229267760
numNetworkReqs--81382654494179
19--------
📊 Page Load Benchmark Results

Current Commit: eccfa16 | Date: 1/29/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.03s (±37ms) 🟡 | historical mean value: 1.04s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 719ms (±35ms) 🟢 | historical mean value: 724ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 75ms (±11ms) 🟢 | historical mean value: 79ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.03s 37ms 1.01s 1.30s 1.06s 1.30s
domContentLoaded 719ms 35ms 697ms 974ms 746ms 974ms
firstPaint 75ms 11ms 56ms 164ms 84ms 164ms
firstContentfulPaint 75ms 11ms 56ms 164ms 84ms 164ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 5.26 KiB (0.1%)
  • ui: 5.74 KiB (0.07%)
  • common: 3.73 KiB (0.04%)

"ui/components/multichain-accounts/multichain-account-list/multichain-account-list.test.tsx": {
"MetaMask: Background connection not initialized": 66,
"Reselect: Identity function warnings": 2,
"MetaMask: Background connection not initialized": 73,
Copy link
Contributor

Choose a reason for hiding this comment

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

Updated baseline to reflect console warnings from new comprehensive test coverage. The +7 'Background connection not initialized' warnings are expected in isolated component tests and similar to other test files in the codebase. The tests function correctly - these are infrastructure warnings, not code issues.

const [isHiddenAccountsExpanded, setIsHiddenAccountsExpanded] =
useState(false);

const [collapsedSectionKeys, setCollapsedSectionKeys] = useState<Set<string>>(
Copy link
Contributor

@georgewrmarshall georgewrmarshall Jan 29, 2026

Choose a reason for hiding this comment

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

State management for tracking which sections are collapsed. Using a Set for O(1) lookup performance when checking if a section is expanded.

() => new Set(),
);

const toggleSectionExpanded = useCallback((sectionKey: string) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Toggle function wrapped in useCallback to prevent unnecessary re-renders. It adds/removes the sectionKey from the Set to track collapsed state.


type ListItem =
| { type: 'header'; key: string; text: string; testId?: string }
| {
Copy link
Contributor

Choose a reason for hiding this comment

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

Extended the ListItem header type to support collapsible sections. Added sectionKey for identifying which section to collapse, isCollapsible flag, and isExpanded state.


// Render pinned section (if there are any pinned accounts)
if (pinnedGroups.length > 0) {
const pinnedSectionKey = 'pinned';
Copy link
Contributor

Choose a reason for hiding this comment

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

Pinned section is now collapsible. Only render pinned accounts when the section is expanded. The section is expanded by default (not in collapsedSectionKeys Set).


if (accounts.length > 0) {
if (shouldShowWalletHeaders) {
const walletSectionKey = `wallet-${walletId}`;
Copy link
Contributor

Choose a reason for hiding this comment

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

Each wallet section gets a unique sectionKey (wallet-{walletId}) for collapse tracking. When collapsed, accounts are not rendered at all, improving performance. Early return after adding header + accounts prevents duplicate rendering.

isInSearchMode,
displayWalletHeader,
isHiddenAccountsExpanded,
collapsedSectionKeys,
Copy link
Contributor

Choose a reason for hiding this comment

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

Added collapsedSectionKeys to the useMemo dependency array to ensure the list re-renders when sections are collapsed/expanded.

keyExtractor={(item) => item.key}
renderItem={({ item }) => {
if (item.type === 'header') {
if (item.isCollapsible && item.sectionKey) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Collapsible header rendering: When a header is marked as collapsible, it becomes a clickable button with an arrow icon that rotates based on expanded state. Uses aria-expanded for accessibility.

getScrollElement: () =>
disabled ? null : (scrollContainerRef?.current ?? null),
estimateSize: () => estimatedItemSize,
getItemKey: (index) =>
Copy link
Contributor

Choose a reason for hiding this comment

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

Fixed VirtualizedList to properly use keyExtractor for stable keys. Previously used index which caused issues when items were dynamically added/removed. Now uses the keyExtractor result (or virtualItem.key) for both getItemKey and the rendered key prop.

});
});

describe('Collapsible section headers', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Comprehensive test coverage for the new collapsible section functionality. Tests verify that wallet headers and pinned sections can be collapsed independently, accounts disappear when collapsed, and multiple sections maintain their own state.

@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Jan 29, 2026

Builds ready [3e086d4]
UI Startup Metrics (1361 ± 114 ms)
PlatformBuildTypePageMetricTest Title (ms)Persona (ms)Mean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--13611084168711414391547
load--1158930146111012171333
domContentLoaded--1151924145310912111324
domInteractive--291799202588
firstPaint--166671146123201315
backgroundConnect--24422132917251275
firstReactRender--19114362131
initialActions--105113
loadScripts--92271712211109871107
setupStore--1475571627
numNetworkReqs--221582171575
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--264415697349116627615669
load--11711023180513912211540
domContentLoaded--11501002179313411801438
domInteractive--39172273239120
firstPaint--209751182140260461
backgroundConnect--63530031586315232338
firstReactRender--24175972638
initialActions--107112
loadScripts--90076814401209411180
setupStore--1664581936
numNetworkReqs--1275125448153221
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--817661102989873988
load--68259389674745807
domContentLoaded--67858889173739801
domInteractive--241686162272
firstPaint--1016239352120194
backgroundConnect--37181342440104
firstReactRender--15103341724
initialActions--106112
loadScripts--67558688972736792
setupStore--1164771123
numNetworkReqs--221582181577
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--1351911287431615711818
load--75964413521217761060
domContentLoaded--74763513221207611051
domInteractive--39192043039106
firstPaint--174681058148209359
backgroundConnect--16613242546167236
firstReactRender--23183432531
initialActions--101011
loadScripts--74463213131187581042
setupStore--1352851622
numNetworkReqs--1525632255168287
19--------
FirefoxBrowserifyStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--14181178197315415091709
load--1147989167612512001386
domContentLoaded--1147989167612512001385
domInteractive--773325746101154
firstPaint--------
backgroundConnect--61262123872160
firstReactRender--1394251323
initialActions--1024222
loadScripts--1113974163711411621346
setupStore--135202211135
numNetworkReqs--231186181879
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--27321911647355428903694
load--13231082487041413171761
domContentLoaded--13221082486941413171760
domInteractive--15737648125165519
firstPaint--------
backgroundConnect--43110739934765801184
firstReactRender--20145952226
initialActions--203123
loadScripts--12401062217019012751674
setupStore--157111303208159648
numNetworkReqs--84372364793219
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--16751390292520318061935
load--14371175269917415201646
domContentLoaded--14361175269917415201646
domInteractive--942823147132158
firstPaint--------
backgroundConnect--762720948124179
firstReactRender--14102531520
initialActions--103122
loadScripts--13881160267616114541536
setupStore--184279361159
numNetworkReqs--241294201884
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--31772342901290533334225
load--16841342594252517472386
domContentLoaded--16831342594252517472386
domInteractive--14134756133140419
firstPaint--------
backgroundConnect--44614550445525271169
firstReactRender--23165962631
initialActions--208123
loadScripts--16141307587951016912203
setupStore--1669920190219574
numNetworkReqs--1084133262135244
19--------
📊 Page Load Benchmark Results

Current Commit: 3e086d4 | Date: 1/29/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.05s (±42ms) 🟡 | historical mean value: 1.04s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 734ms (±39ms) 🟢 | historical mean value: 724ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 79ms (±10ms) 🟢 | historical mean value: 79ms ⬆️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.05s 42ms 1.02s 1.34s 1.09s 1.34s
domContentLoaded 734ms 39ms 707ms 1.00s 763ms 1.00s
firstPaint 79ms 10ms 64ms 160ms 88ms 160ms
firstContentfulPaint 79ms 10ms 64ms 160ms 88ms 160ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 5.26 KiB (0.1%)
  • ui: 5.74 KiB (0.07%)
  • common: 3.73 KiB (0.04%)

Copy link
Contributor

@ccharly ccharly left a comment

Choose a reason for hiding this comment

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

Really nice 💪

Found a small edge-case though, IDK what was the intended behavior for this but, if you (with 1 wallet):

  • Pin "Account 1"
  • Collapse "Wallet 1"
  • Unpin "Account 1"
  • You will see both accounts now, since there's no section anymore
  • Re-pin "Account 1"
  • "Wallet 1" will still be collapsed (since I think we're not clearing the set when re-using the default layout with no sections)

That's pretty edge-case IMO, but just wanted to share that just in case this was not the expected behavior!

Screen.Recording.2026-01-30.at.10.28.31.mov

@georgewrmarshall
Copy link
Contributor

Really nice 💪

Found a small edge-case though, IDK what was the intended behavior for this but, if you (with 1 wallet):

  • Pin "Account 1"
  • Collapse "Wallet 1"
  • Unpin "Account 1"
  • You will see both accounts now, since there's no section anymore
  • Re-pin "Account 1"
  • "Wallet 1" will still be collapsed (since I think we're not clearing the set when re-using the default layout with no sections)

That's pretty edge-case IMO, but just wanted to share that just in case this was not the expected behavior!

Screen.Recording.2026-01-30.at.10.28.31.mov

Great catch @ccharly! I agree I think it would be nice if it defaulted back to being expanded. I'll look into this

@HowardBraham
Copy link
Contributor

@n3ps @georgewrmarshall @ccharly should this be merged?

@georgewrmarshall georgewrmarshall added this pull request to the merge queue Feb 11, 2026
Merged via the queue into main with commit afc7b1e Feb 11, 2026
183 checks passed
@georgewrmarshall georgewrmarshall deleted the n3ps/collapsable-accounts branch February 11, 2026 02:28
@github-actions github-actions bot locked and limited conversation to collaborators Feb 11, 2026
@metamaskbot metamaskbot added the release-13.19.0 Issue or pull request that will be included in release 13.19.0 label Feb 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-13.19.0 Issue or pull request that will be included in release 13.19.0 size-M team-core-extension-ux Core Extension UX team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants