Skip to content

chore: remove account identities petnames bridge - #40312

Merged
hmalik88 merged 3 commits into
mainfrom
hm/remove-account-identities-petnames-bridge
Feb 25, 2026
Merged

hmalik88 merged 3 commits into
mainfrom
hm/remove-account-identities-petnames-bridge

Conversation

@hmalik88

@hmalik88 hmalik88 commented Feb 20, 2026

Copy link
Copy Markdown
Contributor

Description

The AccountIdentitiesPetnamesBridge has no functional purpose at the moment and is doing unnecessary computation every time an account is added. We no longer rely on the the internal account's name property and instead use the account group name in the account tree controller through out the extension. The name controller's state was used in the <Name> component to provide a name, but that component already primarily uses the account tree's state to get account names.

Changelog

CHANGELOG entry: null

Related issues

Fixes: N/A

Manual testing steps

  1. Build from this branch.
  2. Create an account and observe that nothing breaks.

Screenshots/Recordings

N/A

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
Primarily deletes unused synchronization code and related wiring; risk is limited to any hidden dependency on account-identity-derived petnames updates.

Overview
Removes the AccountIdentitiesPetnamesBridge and its unit test, eliminating the one-way sync that copied internal account metadata.name into NameController petnames.

Updates metamask-controller.js to stop delegating AccountsController events/actions to the petnames bridge messenger and to stop initializing the removed bridge, leaving only the address-book-based petnames bridge wired up.

Written by Cursor Bugbot for commit 991de91. 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

metamaskbotv2 Bot commented Feb 20, 2026

Copy link
Copy Markdown
Contributor
Builds ready [12c3638]
⚡ Performance Benchmarks (1421 ± 112 ms)
👆 Interaction Benchmarks
ActionMetricMean (ms)Std Dev (ms)P75 (ms)P95 (ms)
Load New Accountload_new_account29937286362
total29937286362
Confirm Txconfirm_tx60351160416053
total60351160416053
Bridge User Actionsbridge_load_page2838294294
bridge_load_asset_picker18852227240
bridge_search_token71416731735
total11787712531281
🔌 Startup Benchmarks
BuildMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
Chrome Browserify Startup Standard HomeuiStartup14211176188511214661620
load1195983156910212551375
domContentLoaded1188979156610112371350
domInteractive2816123202483
firstPaint167671136154204318
backgroundConnect20618924912208231
firstReactRender19125552027
initialActions106113
loadScripts999795137510010481154
setupStore1474971624
numNetworkReqs312291202286
Chrome Browserify Startup Power User HomeuiStartup16981377238215317472003
load11281014172213111211506
domContentLoaded11141003165112611101481
domInteractive3219155193457
firstPaint1687043683229337
backgroundConnect28325036523295333
firstReactRender23165482441
initialActions107113
loadScripts91180214341239021276
setupStore1664581735
numNetworkReqs57361492160115
Chrome Webpack Startup Standard HomeuiStartup88572412351029451095
load763637108699809929
domContentLoaded758632107799805922
domInteractive3116142262486
firstPaint1176243865156220
backgroundConnect27187292940
firstReactRender2212214242131
initialActions104112
loadScripts755629107498803913
setupStore1262641220
numNetworkReqs312297202583
Chrome Webpack Startup Power User HomeuiStartup1175896157815112701507
load7046231064103694972
domContentLoaded6946161053103683964
domInteractive34181572832104
firstPaint1306541671162284
backgroundConnect15912937939160247
firstReactRender22173532428
initialActions108111
loadScripts6916141044101681956
setupStore1354561420
numNetworkReqs1083925447136193
Firefox Browserify Startup Standard HomeuiStartup16401364260522016582121
load13861165231519214321655
domContentLoaded13851165231419214301655
domInteractive873291196106147
firstPaint------
backgroundConnect5827325355998
firstReactRender13112111415
initialActions103112
loadScripts13601150228618814061573
setupStore157100121536
numNetworkReqs3119101202586
Firefox Browserify Startup Power User HomeuiStartup27162105380437128073580
load15541276248723015832086
domContentLoaded15541276248623115832085
domInteractive12335697121120354
firstPaint------
backgroundConnect2711131216255235906
firstReactRender201468102030
initialActions207122
loadScripts15221252246122515632039
setupStore1228793175116513
numNetworkReqs59271743678138
Firefox Webpack Startup Standard HomeuiStartup16881421312528016972008
load14311168283725814451645
domContentLoaded14301168283125814451644
domInteractive98291568154130157
firstPaint------
backgroundConnect60262013163120
firstReactRender15122731520
initialActions103112
loadScripts14051154282525514211591
setupStore207167261563
numNetworkReqs312097182779
Firefox Webpack Startup Power User HomeuiStartup26962161372537928703500
load15581217247626316832097
domContentLoaded15571217247526316822093
domInteractive13530740159114586
firstPaint------
backgroundConnect276115980227235868
firstReactRender2215175172330
initialActions203122
loadScripts15051196237723516132001
setupStore1608782206213645
numNetworkReqs57251503384123
🧭 User Journey Benchmarks
BenchmarkMetricMean (ms)Std Dev (ms)P75 (ms)P95 (ms)
Onboarding Import WalletimportWalletToSocialScreen2180218218
srpButtonToSrpForm8918990
confirmSrpToPwForm2002020
pwFormToMetricsScreen1501515
metricsToWalletReadyScreen1511516
doneButtonToHomeScreen111930013571422
openAccountMenuToAccountListLoaded687967272418017
total835849789578975
Onboarding New WalletcreateWalletToSocialScreen2181218219
srpButtonToPwForm1034105110
createPwToRecoveryScreen8088
skipBackupToMetricsScreen3703737
agreeButtonToOnboardingSuccess1611717
doneButtonToAssetList51238531579
total89737930953
Asset DetailsassetClickToPriceChart4134245
total4134245
Solana Asset DetailsassetClickToPriceChart4614747
total4614747
Import Srp HomeloginToHomeScreen201417622022244
openAccountMenuAfterLogin4034245
homeAfterImportWithNewWallet22731722822294
total437614545144531
Send TransactionsopenSendPageFromHome27123745
selectTokenToSendFormLoaded2122124
reviewTransactionToConfirmationPage8520852852
total90511916917
SwapopenSwapPageFromHome12620145154
fetchAndDisplaySwapQuotes46427246184764
total47745847644871
🌐 Dapp Page Load Benchmarks

Current Commit: 12c3638 | Date: 2/20/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.03s (±38ms) 🟡 | historical mean value: 1.04s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 720ms (±35ms) 🟢 | historical mean value: 726ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 77ms (±13ms) 🟢 | historical mean value: 80ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.03s 38ms 1.01s 1.32s 1.05s 1.32s
domContentLoaded 720ms 35ms 699ms 994ms 739ms 994ms
firstPaint 77ms 13ms 60ms 160ms 88ms 160ms
firstContentfulPaint 77ms 13ms 60ms 160ms 88ms 160ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -1.17 KiB (-0.03%)
  • ui: 12 Bytes (0%)
  • common: 31 Bytes (0%)

@metamaskbotv2

metamaskbotv2 Bot commented Feb 23, 2026

Copy link
Copy Markdown
Contributor
Builds ready [d637b91]
⚡ Performance Benchmarks (1464 ± 149 ms)
👆 Interaction Benchmarks
ActionMetricMean (ms)Std Dev (ms)P75 (ms)P95 (ms)
Load New Accountload_new_account27319268306
total27319268306
Confirm Txconfirm_tx60281560306047
total60281560306047
Bridge User Actionsbridge_load_page22331254263
bridge_load_asset_picker18552216260
bridge_search_token71516732736
total11234111471183
🔌 Startup Benchmarks
BuildMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
Chrome Browserify Startup Standard HomeuiStartup14641179203814915341743
load1233966181513812971495
domContentLoaded1225962180813712891489
domInteractive2817123182673
firstPaint180641403207201359
backgroundConnect20718427419218251
firstReactRender19124252028
initialActions108113
loadScripts1036783160613311121290
setupStore1465361622
numNetworkReqs312293192284
Chrome Browserify Startup Power User HomeuiStartup2246137210066156320384363
load11531008171215611721533
domContentLoaded11391002169815611581526
domInteractive3418126223393
firstPaint220681671218249364
backgroundConnect652249796511783402322
firstReactRender25165172642
initialActions106113
loadScripts93780214861509591316
setupStore16677111732
numNetworkReqs69401612780125
Chrome Webpack Startup Standard HomeuiStartup89870811231069651085
load7696361004103850947
domContentLoaded763632998102842937
domInteractive2715101212179
firstPaint1296139474168246
backgroundConnect291883103148
firstReactRender17123652026
initialActions104112
loadScripts760630997101840935
setupStore1254561221
numNetworkReqs312296212590
Chrome Webpack Startup Power User HomeuiStartup1250874250121113301556
load7196301224103716958
domContentLoaded7096221213103703954
domInteractive37181833134108
firstPaint1386452680159254
backgroundConnect1841291243124164327
firstReactRender22173232426
initialActions102111
loadScripts7066201199101701946
setupStore1254361418
numNetworkReqs1103624849144197
Firefox Browserify Startup Standard HomeuiStartup15881377238018616201987
load13351148207115513831614
domContentLoaded13341148207115513801614
domInteractive78328869391161
firstPaint------
backgroundConnect58291922359104
firstReactRender13101811415
initialActions102112
loadScripts13101125204915213581565
setupStore177139221443
numNetworkReqs311997192585
Firefox Browserify Startup Power User HomeuiStartup28612129840780629653768
load16671354686170316142098
domContentLoaded16671353686170316142098
domInteractive169351425188155481
firstPaint------
backgroundConnect3621191578283417929
firstReactRender19156982023
initialActions208122
loadScripts16301330682670015642046
setupStore1489686167153542
numNetworkReqs74321813688156
Firefox Webpack Startup Standard HomeuiStartup17071455307023517371991
load14431209283521714731629
domContentLoaded14421209283521714721628
domInteractive120291462195132192
firstPaint------
backgroundConnect63252363768161
firstReactRender16122431622
initialActions102012
loadScripts14151196281121314471567
setupStore237221331571
numNetworkReqs301989162775
Firefox Webpack Startup Power User HomeuiStartup28022173879573428743680
load16131331715461215712193
domContentLoaded16131330715361215702193
domInteractive139461408167123304
firstPaint------
backgroundConnect3211121341240405732
firstReactRender22163442429
initialActions213123
loadScripts15741303711860815412031
setupStore15615810189202591
numNetworkReqs71252414679177
🧭 User Journey Benchmarks
BenchmarkMetricMean (ms)Std Dev (ms)P75 (ms)P95 (ms)
Onboarding Import WalletimportWalletToSocialScreen2170217217
srpButtonToSrpForm9329396
confirmSrpToPwForm2102222
pwFormToMetricsScreen1501515
metricsToWalletReadyScreen1601717
doneButtonToHomeScreen1267412721272
openAccountMenuToAccountListLoaded72382372567261
total88992189218927
Onboarding New WalletcreateWalletToSocialScreen2192220222
srpButtonToPwForm1022104104
createPwToRecoveryScreen8088
skipBackupToMetricsScreen3413435
agreeButtonToOnboardingSuccess1501515
doneButtonToAssetList57066577666
total951629511044
Asset DetailsassetClickToPriceChart58237596
total58237596
Solana Asset DetailsassetClickToPriceChart4714748
total4714748
Import Srp HomeloginToHomeScreen19165519561983
openAccountMenuAfterLogin4785360
homeAfterImportWithNewWallet258914827402761
total45119345134656
Send TransactionsopenSendPageFromHome27153452
selectTokenToSendFormLoaded2022022
reviewTransactionToConfirmationPage86323854902
total91633910972
SwapopenSwapPageFromHome12441163167
fetchAndDisplaySwapQuotes4605646124612
total47487247764869
🌐 Dapp Page Load Benchmarks

Current Commit: d637b91 | Date: 2/23/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.05s (±38ms) 🟡 | historical mean value: 1.04s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 733ms (±36ms) 🟢 | historical mean value: 727ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 79ms (±11ms) 🟢 | historical mean value: 80ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.05s 38ms 1.03s 1.34s 1.09s 1.34s
domContentLoaded 733ms 36ms 710ms 1.01s 764ms 1.01s
firstPaint 79ms 11ms 68ms 168ms 88ms 168ms
firstContentfulPaint 79ms 11ms 68ms 168ms 88ms 168ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -1.17 KiB (-0.03%)
  • ui: 5 Bytes (0%)
  • common: 31 Bytes (0%)

@mathieuartu mathieuartu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code LGTM, let me know when E2E is passing (I think you might need to update some files) and I'll approve 😄

@hmalik88

Copy link
Copy Markdown
Contributor Author

Code LGTM, let me know when E2E is passing (I think you might need to update some files) and I'll approve 😄

Yup, it's the fixture stuff. Going to let my other extension PR (#39792) go in first.

@sonarqubecloud

Copy link
Copy Markdown

@metamaskbotv2

metamaskbotv2 Bot commented Feb 25, 2026

Copy link
Copy Markdown
Contributor
Builds ready [991de91]
⚡ Performance Benchmarks (1356 ± 109 ms)
👆 Interaction Benchmarks
ActionMetricMean (ms)Std Dev (ms)P75 (ms)P95 (ms)
Load New Accountload_new_account2715273279
total2715273279
Confirm Txconfirm_tx6089660966096
total6089660966096
Bridge User Actionsbridge_load_page21535232276
bridge_load_asset_picker25564310338
bridge_search_token72113733736
total12036612681278
🔌 Startup Benchmarks
BuildMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
Chrome Browserify Startup Standard HomeuiStartup13561146160510914331571
load114095213569711981312
domContentLoaded113394513519611931300
domInteractive2716148212479
firstPaint179601117171201338
backgroundConnect19517538822198217
firstReactRender18114041925
initialActions105113
loadScripts95576211609610171122
setupStore1274961419
numNetworkReqs3122100212292
Chrome Browserify Startup Power User HomeuiStartup2142145710506131719624121
load11971035181915312051561
domContentLoaded11811029180814911831529
domInteractive3520155213753
firstPaint198791494158246368
backgroundConnect577264833612003332093
firstReactRender25165172840
initialActions106112
loadScripts96482815911459621303
setupStore1674971829
numNetworkReqs64381522573119
Chrome Webpack Startup Standard HomeuiStartup836688107893908994
load71460092392772881
domContentLoaded70959791792766875
domInteractive2715112222281
firstPaint1126036362123230
backgroundConnect27196683042
firstReactRender19123962031
initialActions104112
loadScripts70659590891764866
setupStore1172531217
numNetworkReqs311997202588
Chrome Webpack Startup Power User HomeuiStartup1286946197317413781636
load74764712971207401036
domContentLoaded73764212851197271029
domInteractive40191813636141
firstPaint1426747980160292
backgroundConnect18413438553194300
firstReactRender24174142630
initialActions104112
loadScripts73464012711167251021
setupStore1454381535
numNetworkReqs1094126448135206
Firefox Browserify Startup Standard HomeuiStartup16061348237519316312040
load13511142208914713861648
domContentLoaded13491141208314713851647
domInteractive76334226786147
firstPaint------
backgroundConnect62282923956131
firstReactRender13111811415
initialActions102012
loadScripts13211119205513713591555
setupStore187187281440
numNetworkReqs311999212593
Firefox Browserify Startup Power User HomeuiStartup27821921866580428983792
load16241263692367416922066
domContentLoaded16231262692367416922065
domInteractive12734549110119395
firstPaint------
backgroundConnect3071201049236373894
firstReactRender20157091927
initialActions102122
loadScripts15761243666965216522027
setupStore1486844196140580
numNetworkReqs73291953991140
Firefox Webpack Startup Standard HomeuiStartup16421370348928516681887
load13831147323327014021517
domContentLoaded13821143323327014021517
domInteractive118291630215128217
firstPaint------
backgroundConnect61242253962143
firstReactRender16115151624
initialActions102122
loadScripts13581135320926913751468
setupStore227152301475
numNetworkReqs312091182681
Firefox Webpack Startup Power User HomeuiStartup28012008855673329433664
load16121240677960317412198
domContentLoaded16111239677960417412198
domInteractive162331016192125659
firstPaint------
backgroundConnect33210915712973341043
firstReactRender23156792534
initialActions213123
loadScripts15581221671558216632041
setupStore1469778186163652
numNetworkReqs68312154089146
🧭 User Journey Benchmarks
BenchmarkMetricMean (ms)Std Dev (ms)P75 (ms)P95 (ms)
Onboarding Import WalletimportWalletToSocialScreen2182219220
srpButtonToSrpForm8929093
confirmSrpToPwForm2112122
pwFormToMetricsScreen1501515
metricsToWalletReadyScreen1511516
doneButtonToHomeScreen97145214971545
openAccountMenuToAccountListLoaded69129369937017
total78893279347934
Onboarding New WalletcreateWalletToSocialScreen2201221222
srpButtonToPwForm1125115122
createPwToRecoveryScreen8099
skipBackupToMetricsScreen3723939
agreeButtonToOnboardingSuccess1601616
doneButtonToAssetList106941314381443
total146541518331850
Asset DetailsassetClickToPriceChart69157886
total69157886
Solana Asset DetailsassetClickToPriceChart5245459
total5245459
Import Srp HomeloginToHomeScreen19994920302052
openAccountMenuAfterLogin4665253
homeAfterImportWithNewWallet22083622262251
total42823043244324
Send TransactionsopenSendPageFromHome1922022
selectTokenToSendFormLoaded1901919
reviewTransactionToConfirmationPage8532855855
total8921892894
SwapopenSwapPageFromHome12911140141
fetchAndDisplaySwapQuotes529184062496387
total540785063906504
🌐 Dapp Page Load Benchmarks

Current Commit: 991de91 | Date: 2/25/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.07s (±68ms) 🟡 | historical mean value: 1.05s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 753ms (±65ms) 🟢 | historical mean value: 734ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 83ms (±11ms) 🟢 | historical mean value: 79ms ⬆️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.07s 68ms 1.02s 1.36s 1.31s 1.36s
domContentLoaded 753ms 65ms 718ms 1.04s 982ms 1.04s
firstPaint 83ms 11ms 68ms 176ms 96ms 176ms
firstContentfulPaint 83ms 11ms 68ms 176ms 96ms 176ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -1.17 KiB (-0.03%)
  • ui: 7 Bytes (0%)
  • common: 14 Bytes (0%)

@hmalik88
hmalik88 added this pull request to the merge queue Feb 25, 2026
Merged via the queue into main with commit 2d07dc1 Feb 25, 2026
183 of 185 checks passed
@hmalik88
hmalik88 deleted the hm/remove-account-identities-petnames-bridge branch February 25, 2026 20:00
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 25, 2026
@metamaskbot metamaskbot added the release-13.21.0 Issue or pull request that will be included in release 13.21.0 label Feb 25, 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-accounts-framework Accounts team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants