Skip to content

Conversation

@lwin-kyaw
Copy link
Contributor

@lwin-kyaw lwin-kyaw commented Jul 21, 2025

Description

This PR includes changes which updates the Password Sync checks and optimizes the Wallet Unlock operation for the Social Login flow by ~

  • do checkIsPasswordOutdated unlock page load
  • upon unlocking wallet, read checkIsPasswordOutdated from cache
  • removed checkIsPasswordOutdated upon locking the wallet.

Open in GitHub Codespaces

Changelog

CHANGELOG entry:

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.

@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-onboarding Onboarding team label Jul 21, 2025
cursor[bot]

This comment was marked as outdated.

}

componentDidMount() {
async componentDidMount() {
Copy link
Contributor

Choose a reason for hiding this comment

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

if we change this to async, do we need to change all calls to this function to using await?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @matthiasgeihs, we don't need to. componentDidMount is a react lifecyle method (https://react.dev/reference/react/Component#componentdidmount) which will be run when the component is mounted.

Regardless of using async or not, does not matter here (since the function returns void and react doesn't do anything with it).
I just add async to componentDidMount so that we can know if the passwordOutdatedCheck is failed. 4caa0fb#diff-f6f23f7c3cf523f0e66d1892bfd99b9179bae4978e855c4b6e683d5d0b21981dR128-R132

cursor[bot]

This comment was marked as outdated.

tuna1207
tuna1207 previously approved these changes Jul 21, 2025
@metamaskbot
Copy link
Collaborator

Builds ready [4caa0fb]
UI Startup Metrics (1260 ± 62 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1260115514326213031370
load108298112625911231179
domContentLoaded107597612536011171171
domInteractive18134781643
firstPaint73278125843811081179
backgroundConnect2091992367212222
firstReactRender20153852133
getState949610824
initialActions30758216
loadScripts872775105059913970
setupStore74263712
WebpackHomeuiStartup23791892289217824832633
load18771385248120319892189
domContentLoaded18641378230619619822183
domInteractive2113210251664
firstPaint1666160483208317
backgroundConnect53133077737277
firstReactRender1559043060183255
getState194257451231
initialActions7214714713
loadScripts18571374229419619692172
setupStore206242391628
FirefoxBrowserifyHomeuiStartup15071294231716015411866
load1291113615749213201478
domContentLoaded1290113615749113191477
domInteractive1133657880110293
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3016222232862
firstReactRender29216183057
getState12319625932
initialActions7018226313
loadScripts1266111415488812931446
setupStore14324135852
WebpackHomeuiStartup17621549239717118562087
load14891311183712215831737
domContentLoaded14891311183712215821737
domInteractive96303425297250
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2917240233352
firstReactRender52427865663
getState153275361334
initialActions8023124525
loadScripts14641290180811815601704
setupStore2152575114211
Benchmark value 1260 exceeds gate value 1234 for chrome browserify home mean uiStartup
Benchmark value 1083 exceeds gate value 1070 for chrome browserify home mean load
Benchmark value 1075 exceeds gate value 1061 for chrome browserify home mean domContentLoaded
Benchmark value 210 exceeds gate value 10 for chrome browserify home mean backgroundConnect
Benchmark value 4 exceeds gate value 1 for chrome browserify home mean initialActions
Benchmark value 873 exceeds gate value 830 for chrome browserify home mean loadScripts
Benchmark value 1371 exceeds gate value 1365 for chrome browserify home p95 uiStartup
Benchmark value 43 exceeds gate value 41 for chrome browserify home p95 domInteractive
Benchmark value 223 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 16 exceeds gate value 1.2 for chrome browserify home p95 initialActions
Benchmark value 971 exceeds gate value 940 for chrome browserify home p95 loadScripts
Benchmark value 2379 exceeds gate value 2192 for chrome webpack home mean uiStartup
Benchmark value 1877 exceeds gate value 1711 for chrome webpack home mean load
Benchmark value 1865 exceeds gate value 1704 for chrome webpack home mean domContentLoaded
Benchmark value 54 exceeds gate value 40 for chrome webpack home mean backgroundConnect
Benchmark value 1858 exceeds gate value 1699 for chrome webpack home mean loadScripts
Benchmark value 2633 exceeds gate value 2454 for chrome webpack home p95 uiStartup
Benchmark value 2189 exceeds gate value 2030 for chrome webpack home p95 load
Benchmark value 2183 exceeds gate value 2005 for chrome webpack home p95 domContentLoaded
Benchmark value 65 exceeds gate value 57 for chrome webpack home p95 domInteractive
Benchmark value 278 exceeds gate value 90 for chrome webpack home p95 backgroundConnect
Benchmark value 13 exceeds gate value 7 for chrome webpack home p95 initialActions
Benchmark value 2173 exceeds gate value 1970 for chrome webpack home p95 loadScripts
Benchmark value 1507 exceeds gate value 1405 for firefox browserify home mean uiStartup
Benchmark value 1291 exceeds gate value 1245 for firefox browserify home mean load
Benchmark value 1291 exceeds gate value 1239 for firefox browserify home mean domContentLoaded
Benchmark value 114 exceeds gate value 110 for firefox browserify home mean domInteractive
Benchmark value 30 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 12 exceeds gate value 11 for firefox browserify home mean getState
Benchmark value 8 exceeds gate value 1 for firefox browserify home mean initialActions
Benchmark value 1267 exceeds gate value 1230 for firefox browserify home mean loadScripts
Benchmark value 15 exceeds gate value 9 for firefox browserify home mean setupStore
Benchmark value 1866 exceeds gate value 1660 for firefox browserify home p95 uiStartup
Benchmark value 293 exceeds gate value 195 for firefox browserify home p95 domInteractive
Benchmark value 57 exceeds gate value 55 for firefox browserify home p95 firstReactRender
Benchmark value 32 exceeds gate value 24 for firefox browserify home p95 getState
Benchmark value 13 exceeds gate value 2 for firefox browserify home p95 initialActions
Benchmark value 52 exceeds gate value 27 for firefox browserify home p95 setupStore
Benchmark value 1763 exceeds gate value 1615 for firefox webpack home mean uiStartup
Benchmark value 1490 exceeds gate value 1380 for firefox webpack home mean load
Benchmark value 1490 exceeds gate value 1380 for firefox webpack home mean domContentLoaded
Benchmark value 30 exceeds gate value 26 for firefox webpack home mean backgroundConnect
Benchmark value 52 exceeds gate value 38 for firefox webpack home mean firstReactRender
Benchmark value 8 exceeds gate value 1 for firefox webpack home mean initialActions
Benchmark value 1465 exceeds gate value 1360 for firefox webpack home mean loadScripts
Benchmark value 22 exceeds gate value 13 for firefox webpack home mean setupStore
Benchmark value 2087 exceeds gate value 1935 for firefox webpack home p95 uiStartup
Benchmark value 1737 exceeds gate value 1660 for firefox webpack home p95 load
Benchmark value 1737 exceeds gate value 1660 for firefox webpack home p95 domContentLoaded
Benchmark value 250 exceeds gate value 156 for firefox webpack home p95 domInteractive
Benchmark value 52 exceeds gate value 49 for firefox webpack home p95 backgroundConnect
Benchmark value 63 exceeds gate value 50 for firefox webpack home p95 firstReactRender
Benchmark value 34 exceeds gate value 32 for firefox webpack home p95 getState
Benchmark value 25 exceeds gate value 2 for firefox webpack home p95 initialActions
Benchmark value 1704 exceeds gate value 1630 for firefox webpack home p95 loadScripts
Benchmark value 211 exceeds gate value 28 for firefox webpack home p95 setupStore
Sum of mean exceeds: 1757ms | Sum of p95 exceeds: 2227.8ms
Sum of all benchmark exceeds: 3984.8ms

Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 100 Bytes (0%)
  • ui: 303 Bytes (0%)
  • common: -38 Bytes (0%)

@lwin-kyaw lwin-kyaw requested a review from tuna1207 July 21, 2025 09:18
@lwin-kyaw lwin-kyaw changed the title fix: optimize unlock performance fix: optimize unlock performance cp-13.0.0 Jul 21, 2025
Copy link
Contributor

@himanshuchawla009 himanshuchawla009 left a comment

Choose a reason for hiding this comment

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

lgtm

@lwin-kyaw lwin-kyaw added this pull request to the merge queue Jul 21, 2025
Merged via the queue into main with commit 91aaf8a Jul 21, 2025
148 checks passed
@lwin-kyaw lwin-kyaw deleted the fix/optimize-unlock-performance branch July 21, 2025 10:02
@github-actions github-actions bot locked and limited conversation to collaborators Jul 21, 2025
@metamaskbot metamaskbot added the release-13.1.0 Issue or pull request that will be included in release 13.1.0 label Jul 21, 2025
@gauthierpetetin gauthierpetetin added release-13.0.0 Issue or pull request that will be included in release 13.0.0 (also called 12.24.0) and removed release-13.1.0 Issue or pull request that will be included in release 13.1.0 labels Aug 5, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-13.0.0 Issue or pull request that will be included in release 13.0.0 (also called 12.24.0) team-onboarding Onboarding team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants