Skip to content

Conversation

mathieuartu
Copy link
Contributor

@mathieuartu mathieuartu commented Sep 22, 2025

Description

This PR mutualizes account syncing and account discovery in one method that can be called from the background.
This also makes sure that the Snap Keyring is available before attempting syncing and discovery.

Open in GitHub Codespaces

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.

@mathieuartu mathieuartu self-assigned this Sep 22, 2025
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-accounts-framework Accounts Framework team label Sep 22, 2025
@mathieuartu mathieuartu changed the title Feat/mutualize account sync discovery feat: mutualize account sync and discovery Sep 22, 2025
@metamaskbot
Copy link
Collaborator

✨ Files requiring CODEOWNER review ✨

🪪 @MetaMask/identity (1 files, +18 -9)
  • 📁 ui/
    • 📁 hooks/
      • 📁 identity/
        • 📁 useAccountSyncing/
          • 📄 useAccountSyncing.ts +18 -9

@mathieuartu mathieuartu force-pushed the feat/mutualize-account-sync-discovery branch from 4e563da to 97c08db Compare September 22, 2025 19:46
@metamaskbot
Copy link
Collaborator

❌ test-e2e-chrome-api-specs failed. View the html report here.

@metamaskbot
Copy link
Collaborator

📊 Page Load Benchmark Results

Current Commit: 97c08db | Date: 9/22/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.09s (±74ms) 🟡 | historical mean value: 1.06s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 768ms (±71ms) 🟢 | historical mean value: 742ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 81ms (±12ms) 🟢 | historical mean value: 80ms ⬆️ (historical data)
📈 Detailed Results
Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.09s 74ms 1.05s 1.38s 1.32s 1.38s
domContentLoaded 768ms 71ms 728ms 1.05s 982ms 1.05s
firstPaint 81ms 12ms 64ms 188ms 88ms 188ms
firstContentfulPaint 81ms 12ms 64ms 188ms 88ms 188ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

Results generated automatically by MetaMask CI

@metamaskbot
Copy link
Collaborator

Builds ready [97c08db]
UI Startup Metrics (1218 ± 62 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1218109114356212561317
load104893612085610841142
domContentLoaded104193012015610791137
domInteractive18144971740
firstPaint60688121641810481124
backgroundConnect2141992567217224
firstReactRender25194752535
getState1354661724
initialActions51446619
loadScripts83472398754871922
setupStore95283916
WebpackHomeuiStartup1162955135710512401318
load97878811259810431100
domContentLoaded97378511219810391097
domInteractive16125381440
firstPaint1386240257171248
backgroundConnect15113951528
firstReactRender35334833641
getState74223713
initialActions72244813
loadScripts97078311199810351095
setupStore86203916
FirefoxBrowserifyHomeuiStartup13531184188610714221519
load1180104413887912491296
domContentLoaded1179104313877912491296
domInteractive1003330754102239
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3018208213149
firstReactRender28235963041
getState7210611618
initialActions3112238
loadScripts1157102613737712231275
setupStore85395820
WebpackHomeuiStartup16821436211013717881897
load14361222180812115511632
domContentLoaded14351221180712115511632
domInteractive1083346264106302
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect32226973544
firstReactRender49406355258
getState831701679
initialActions3114246
loadScripts14121197178712215221613
setupStore1168191022
Benchmark value 215 exceeds gate value 10 for chrome browserify home mean backgroundConnect
Benchmark value 26 exceeds gate value 23 for chrome browserify home mean firstReactRender
Benchmark value 6 exceeds gate value 1 for chrome browserify home mean initialActions
Benchmark value 834 exceeds gate value 830 for chrome browserify home mean loadScripts
Benchmark value 224 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 19 exceeds gate value 1.2 for chrome browserify home p95 initialActions
Benchmark value 13 exceeds gate value 7 for chrome webpack home p95 initialActions
Benchmark value 31 exceeds gate value 25 for firefox browserify home mean backgroundConnect
Benchmark value 29 exceeds gate value 25 for firefox browserify home mean firstReactRender
Benchmark value 3 exceeds gate value 1 for firefox browserify home mean initialActions
Benchmark value 239 exceeds gate value 195 for firefox browserify home p95 domInteractive
Benchmark value 8 exceeds gate value 2 for firefox browserify home p95 initialActions
Benchmark value 1682 exceeds gate value 1615 for firefox webpack home mean uiStartup
Benchmark value 1436 exceeds gate value 1380 for firefox webpack home mean load
Benchmark value 1436 exceeds gate value 1380 for firefox webpack home mean domContentLoaded
Benchmark value 108 exceeds gate value 100 for firefox webpack home mean domInteractive
Benchmark value 32 exceeds gate value 26 for firefox webpack home mean backgroundConnect
Benchmark value 50 exceeds gate value 38 for firefox webpack home mean firstReactRender
Benchmark value 4 exceeds gate value 1 for firefox webpack home mean initialActions
Benchmark value 1412 exceeds gate value 1360 for firefox webpack home mean loadScripts
Benchmark value 302 exceeds gate value 156 for firefox webpack home p95 domInteractive
Benchmark value 58 exceeds gate value 50 for firefox webpack home p95 firstReactRender
Benchmark value 6 exceeds gate value 2 for firefox webpack home p95 initialActions
Sum of mean exceeds: 489ms | Sum of p95 exceeds: 437.8ms
Sum of all benchmark exceeds: 926.8ms

Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 337 Bytes (0.01%)
  • ui: 5 Bytes (0%)
  • common: 18 Bytes (0%)

@mathieuartu mathieuartu deleted the feat/mutualize-account-sync-discovery branch September 23, 2025 15:27
@github-actions github-actions bot locked and limited conversation to collaborators Sep 23, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

size-M team-accounts-framework Accounts Framework team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants