Skip to content

Conversation

@MajorLift
Copy link
Contributor

@MajorLift MajorLift commented May 29, 2025

Note for Reviewers

The bulk of the changes in this PR are in ui/pages/routes/routes.component.tsx. Unfortunately, GitHub is failing to recognize that this file was renamed from ui/pages/routes/routes.component.js, even with a git mv commit establishing this fact: 1f91b8c.

Motivation

The <Routes /> component handles routing and navigation between our application's pages and url paths. Despite its importance, it remains written in JavaScript as a class component, and relies on a HOC for access to Redux state properties and actions, all of which are outdated patterns.

Description

This commit achieves the following:

  1. Migrate <Routes /> into a functional component that uses hooks, and can directly interface with the Redux store using selectors and dispatched actions.
  2. Migrate <Routes /> to strict TypeScript.
  3. Adds useAppSelector, a typed version of the useSelector hook, to ui/store/store.ts.

These changes represent a significant improvement in maintainability, type safety, and future extensibility. This migration also unblocks the react-router v6 upgrade effort, which requires class components to be converted to functional components.

Related issues

Manual testing steps

  1. After installing, check whether all steps of the onboarding flow load and display without issue.
  2. Verify that pages (e.g. Settings) load and display without issue.

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.

@MajorLift MajorLift self-assigned this May 29, 2025
@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-extension-platform Extension Platform team label May 29, 2025
@MajorLift MajorLift force-pushed the chore/react-router-v6/250515-convert-Routes-to-function-component branch 3 times, most recently from 45d3620 to 783ca0f Compare May 29, 2025 13:30
@MajorLift MajorLift force-pushed the chore/react-router-v6/250515-convert-Routes-to-function-component branch from 783ca0f to 5d3e0e3 Compare June 12, 2025 22:59
@HowardBraham HowardBraham added the no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed label Jun 13, 2025
@HowardBraham HowardBraham changed the title chore: Convert <Routes /> to a functional component refactor: Convert <Routes /> to a functional component Jun 13, 2025
@metamaskbot metamaskbot added the INVALID-PR-TEMPLATE PR's body doesn't match template label Jul 31, 2025
@MajorLift MajorLift force-pushed the chore/react-router-v6/250515-convert-Routes-to-function-component branch 3 times, most recently from ed73ed0 to 6d31be1 Compare August 4, 2025 18:29
@metamaskbot
Copy link
Collaborator

Builds ready [6d31be1]
UI Startup Metrics (1141 ± 55 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1141104313255511761235
load96786911605510121064
domContentLoaded95986411445510041055
domInteractive16133831723
firstPaint66813211513789771036
backgroundConnect2111972468214230
firstReactRender19143952033
getState1033071526
initialActions2028429
loadScripts75666092153798835
setupStore74576710
WebpackHomeuiStartup24951896306724526622908
load18681375235722420262209
domContentLoaded18611371235122220192182
domInteractive2012114171757
firstPaint1936861787228305
backgroundConnect3516137204083
firstReactRender21888421113356403
getState3153316516241
initialActions10221128711
loadScripts18551368234722120152179
setupStore2873265821180
FirefoxBrowserifyHomeuiStartup1288113016919913461466
load110598413107111571224
domContentLoaded110598313107111561224
domInteractive973140652104190
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect251491122741
firstReactRender24195662439
getState8216718521
initialActions40688221
loadScripts108496812807011351207
setupStore11315822633
WebpackHomeuiStartup15361274200514316211824
load12891080168711113521501
domContentLoaded12881080168611113521501
domInteractive97312835598234
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2718109152866
firstReactRender47398575159
getState62486620
initialActions30153211
loadScripts12671063166411113321481
setupStore947110730
Benchmark value 211 exceeds gate value 10 for chrome browserify home mean backgroundConnect
Benchmark value 3 exceeds gate value 1 for chrome browserify home mean initialActions
Benchmark value 230 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 9 exceeds gate value 1.2 for chrome browserify home p95 initialActions
Benchmark value 2495 exceeds gate value 2192 for chrome webpack home mean uiStartup
Benchmark value 1869 exceeds gate value 1711 for chrome webpack home mean load
Benchmark value 1861 exceeds gate value 1704 for chrome webpack home mean domContentLoaded
Benchmark value 31 exceeds gate value 29 for chrome webpack home mean getState
Benchmark value 10 exceeds gate value 7 for chrome webpack home mean initialActions
Benchmark value 1856 exceeds gate value 1699 for chrome webpack home mean loadScripts
Benchmark value 2908 exceeds gate value 2454 for chrome webpack home p95 uiStartup
Benchmark value 2209 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 58 exceeds gate value 57 for chrome webpack home p95 domInteractive
Benchmark value 403 exceeds gate value 370 for chrome webpack home p95 firstReactRender
Benchmark value 241 exceeds gate value 195 for chrome webpack home p95 getState
Benchmark value 11 exceeds gate value 7 for chrome webpack home p95 initialActions
Benchmark value 2179 exceeds gate value 1970 for chrome webpack home p95 loadScripts
Benchmark value 180 exceeds gate value 65 for chrome webpack home p95 setupStore
Benchmark value 26 exceeds gate value 25 for firefox browserify home mean backgroundConnect
Benchmark value 4 exceeds gate value 1 for firefox browserify home mean initialActions
Benchmark value 11 exceeds gate value 9 for firefox browserify home mean setupStore
Benchmark value 21 exceeds gate value 2 for firefox browserify home p95 initialActions
Benchmark value 33 exceeds gate value 27 for firefox browserify home p95 setupStore
Benchmark value 28 exceeds gate value 26 for firefox webpack home mean backgroundConnect
Benchmark value 48 exceeds gate value 38 for firefox webpack home mean firstReactRender
Benchmark value 3 exceeds gate value 1 for firefox webpack home mean initialActions
Benchmark value 234 exceeds gate value 156 for firefox webpack home p95 domInteractive
Benchmark value 66 exceeds gate value 49 for firefox webpack home p95 backgroundConnect
Benchmark value 59 exceeds gate value 50 for firefox webpack home p95 firstReactRender
Benchmark value 11 exceeds gate value 2 for firefox webpack home p95 initialActions
Benchmark value 30 exceeds gate value 28 for firefox webpack home p95 setupStore
Sum of mean exceeds: 1003ms | Sum of p95 exceeds: 1578.8ms
Sum of all benchmark exceeds: 2581.8ms

Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 43 Bytes (0%)
  • ui: -62.87 KiB (-0.9%)
  • common: 44 Bytes (0%)

@MajorLift MajorLift force-pushed the chore/react-router-v6/250515-convert-Routes-to-function-component branch from 5f9927d to fb0e406 Compare August 4, 2025 18:56
@metamaskbot
Copy link
Collaborator

Builds ready [fb0e406]
UI Startup Metrics (1140 ± 70 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1140103613617011791287
load96686011517010141105
domContentLoaded95785011457110091097
domInteractive16134241623
firstPaint5777011293949681094
backgroundConnect2111962488215225
firstReactRender19144752028
getState10476111023
initialActions40519332
loadScripts75465493170804895
setupStore74183713
WebpackHomeuiStartup22841789263919924152581
load16991326199316717881952
domContentLoaded16911322198816517831935
domInteractive181191151460
firstPaint1586048466181274
backgroundConnect291262103750
firstReactRender23488398124375396
getState3043057012281
initialActions52162710
loadScripts16851319198516317761922
setupStore2873126219256
FirefoxBrowserifyHomeuiStartup13451161173211214141555
load1155100113338312271310
domContentLoaded1155100113338312271309
domInteractive1003326548107239
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect271692132863
firstReactRender25205872443
getState7214015522
initialActions40589217
loadScripts113398013118112001273
setupStore10321422630
WebpackHomeuiStartup15551366193213716271852
load13091142162411913701546
domContentLoaded13091141162411913701546
domInteractive983031153101248
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2918124172959
firstReactRender49408975358
getState73427722
initialActions40508318
loadScripts12841124160611913491526
setupStore74203713
Benchmark value 211 exceeds gate value 10 for chrome browserify home mean backgroundConnect
Benchmark value 5 exceeds gate value 1 for chrome browserify home mean initialActions
Benchmark value 225 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 32 exceeds gate value 1.2 for chrome browserify home p95 initialActions
Benchmark value 2284 exceeds gate value 2192 for chrome webpack home mean uiStartup
Benchmark value 30 exceeds gate value 29 for chrome webpack home mean getState
Benchmark value 2582 exceeds gate value 2454 for chrome webpack home p95 uiStartup
Benchmark value 60 exceeds gate value 57 for chrome webpack home p95 domInteractive
Benchmark value 396 exceeds gate value 370 for chrome webpack home p95 firstReactRender
Benchmark value 281 exceeds gate value 195 for chrome webpack home p95 getState
Benchmark value 10 exceeds gate value 7 for chrome webpack home p95 initialActions
Benchmark value 256 exceeds gate value 65 for chrome webpack home p95 setupStore
Benchmark value 27 exceeds gate value 25 for firefox browserify home mean backgroundConnect
Benchmark value 5 exceeds gate value 1 for firefox browserify home mean initialActions
Benchmark value 10 exceeds gate value 9 for firefox browserify home mean setupStore
Benchmark value 239 exceeds gate value 195 for firefox browserify home p95 domInteractive
Benchmark value 17 exceeds gate value 2 for firefox browserify home p95 initialActions
Benchmark value 30 exceeds gate value 27 for firefox browserify home p95 setupStore
Benchmark value 30 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 248 exceeds gate value 156 for firefox webpack home p95 domInteractive
Benchmark value 59 exceeds gate value 49 for firefox webpack home p95 backgroundConnect
Benchmark value 58 exceeds gate value 50 for firefox webpack home p95 firstReactRender
Benchmark value 18 exceeds gate value 2 for firefox webpack home p95 initialActions
Sum of mean exceeds: 324ms | Sum of p95 exceeds: 862.8ms
Sum of all benchmark exceeds: 1186.8ms

Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 43 Bytes (0%)
  • ui: -62.86 KiB (-0.9%)
  • common: 44 Bytes (0%)

@metamaskbot
Copy link
Collaborator

Builds ready [9555ad4]
UI Startup Metrics (1199 ± 72 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1199106113957212431340
load101488112017310581162
domContentLoaded100587511677110521153
domInteractive18147181742
firstPaint71277117940010361139
backgroundConnect2172012518221233
firstReactRender21144762234
getState1043161126
initialActions30496314
loadScripts79667195970842938
setupStore85234818
WebpackHomeuiStartup21691674256019022722506
load16261246194115716991864
domContentLoaded16201242192915516941846
domInteractive171186151468
firstPaint1656032451192268
backgroundConnect24126692741
firstReactRender21482401118371384
getState2333125910242
initialActions5216369
loadScripts16151240191915416921833
setupStore186263381432
FirefoxBrowserifyHomeuiStartup13201150169311314051515
load113599014718911951303
domContentLoaded113599014718911941303
domInteractive98342884798206
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2815135172856
firstReactRender23205752330
getState10216920741
initialActions40789314
loadScripts111397514518811671284
setupStore935311634
WebpackHomeuiStartup16071389221415716841964
load13451155170712914151653
domContentLoaded13441155170612814141653
domInteractive97313355099238
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3218119193281
firstReactRender49406665360
getState10217519726
initialActions31223310
loadScripts13181136168512513911593
setupStore95497827
Benchmark value 217 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 43 exceeds gate value 41 for chrome browserify home p95 domInteractive
Benchmark value 233 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 14 exceeds gate value 1.2 for chrome browserify home p95 initialActions
Benchmark value 18 exceeds gate value 17 for chrome browserify home p95 setupStore
Benchmark value 2507 exceeds gate value 2454 for chrome webpack home p95 uiStartup
Benchmark value 68 exceeds gate value 57 for chrome webpack home p95 domInteractive
Benchmark value 384 exceeds gate value 370 for chrome webpack home p95 firstReactRender
Benchmark value 242 exceeds gate value 195 for chrome webpack home p95 getState
Benchmark value 9 exceeds gate value 7 for chrome webpack home p95 initialActions
Benchmark value 28 exceeds gate value 25 for firefox browserify home mean backgroundConnect
Benchmark value 4 exceeds gate value 1 for firefox browserify home mean initialActions
Benchmark value 206 exceeds gate value 195 for firefox browserify home p95 domInteractive
Benchmark value 41 exceeds gate value 24 for firefox browserify home p95 getState
Benchmark value 14 exceeds gate value 2 for firefox browserify home p95 initialActions
Benchmark value 34 exceeds gate value 27 for firefox browserify home p95 setupStore
Benchmark value 33 exceeds gate value 26 for firefox webpack home mean backgroundConnect
Benchmark value 49 exceeds gate value 38 for firefox webpack home mean firstReactRender
Benchmark value 3 exceeds gate value 1 for firefox webpack home mean initialActions
Benchmark value 1964 exceeds gate value 1935 for firefox webpack home p95 uiStartup
Benchmark value 238 exceeds gate value 156 for firefox webpack home p95 domInteractive
Benchmark value 81 exceeds gate value 49 for firefox webpack home p95 backgroundConnect
Benchmark value 60 exceeds gate value 50 for firefox webpack home p95 firstReactRender
Benchmark value 10 exceeds gate value 2 for firefox webpack home p95 initialActions
Sum of mean exceeds: 236ms | Sum of p95 exceeds: 565.8ms
Sum of all benchmark exceeds: 801.8ms

Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 833 Bytes (0.02%)
  • ui: -62.59 KiB (-0.9%)
  • common: 253 Bytes (0%)

@MajorLift MajorLift force-pushed the chore/react-router-v6/250515-convert-Routes-to-function-component branch from 96befdc to a90abd1 Compare August 5, 2025 17:52
@metamaskbot
Copy link
Collaborator

Builds ready [5ca8ae6]
UI Startup Metrics (1106 ± 51 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1106100712555111401206
load9348241068469631015
domContentLoaded9248111061469491008
domInteractive16133741625
firstPaint6567410693649541016
backgroundConnect21219527915215246
firstReactRender2014145131930
getState943661025
initialActions20325211
loadScripts72161886345749807
setupStore74193716
WebpackHomeuiStartup21361604262422322542504
load15901190194717816861877
domContentLoaded15831183193117616821863
domInteractive1911198231368
firstPaint1736436063214313
backgroundConnect2811382372745
firstReactRender21283400117373386
getState2343026010271
initialActions52294611
loadScripts15791181191917516791851
setupStore2562935913273
FirefoxBrowserifyHomeuiStartup13121114169211813531616
load113298014448611841265
domContentLoaded113297914438611841265
domInteractive95332644597207
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect271495142956
firstReactRender23195362337
getState62478525
initialActions20213211
loadScripts110996514248511521249
setupStore9318820635
WebpackHomeuiStartup16751390230216617432041
load13981180175613414711699
domContentLoaded13971179175613414711698
domInteractive1063347561107247
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3618118213694
firstReactRender51428065463
getState926411737
initialActions30385311
loadScripts13681165167712714461647
setupStore11521922832
Benchmark value 212 exceeds gate value 10 for chrome browserify home mean backgroundConnect
Benchmark value 3 exceeds gate value 1 for chrome browserify home mean initialActions
Benchmark value 247 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 11 exceeds gate value 1.2 for chrome browserify home p95 initialActions
Benchmark value 2505 exceeds gate value 2454 for chrome webpack home p95 uiStartup
Benchmark value 68 exceeds gate value 57 for chrome webpack home p95 domInteractive
Benchmark value 386 exceeds gate value 370 for chrome webpack home p95 firstReactRender
Benchmark value 271 exceeds gate value 195 for chrome webpack home p95 getState
Benchmark value 11 exceeds gate value 7 for chrome webpack home p95 initialActions
Benchmark value 273 exceeds gate value 65 for chrome webpack home p95 setupStore
Benchmark value 28 exceeds gate value 25 for firefox browserify home mean backgroundConnect
Benchmark value 3 exceeds gate value 1 for firefox browserify home mean initialActions
Benchmark value 10 exceeds gate value 9 for firefox browserify home mean setupStore
Benchmark value 207 exceeds gate value 195 for firefox browserify home p95 domInteractive
Benchmark value 25 exceeds gate value 24 for firefox browserify home p95 getState
Benchmark value 11 exceeds gate value 2 for firefox browserify home p95 initialActions
Benchmark value 35 exceeds gate value 27 for firefox browserify home p95 setupStore
Benchmark value 1676 exceeds gate value 1615 for firefox webpack home mean uiStartup
Benchmark value 1398 exceeds gate value 1380 for firefox webpack home mean load
Benchmark value 1398 exceeds gate value 1380 for firefox webpack home mean domContentLoaded
Benchmark value 107 exceeds gate value 100 for firefox webpack home mean domInteractive
Benchmark value 37 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 4 exceeds gate value 1 for firefox webpack home mean initialActions
Benchmark value 1369 exceeds gate value 1360 for firefox webpack home mean loadScripts
Benchmark value 2041 exceeds gate value 1935 for firefox webpack home p95 uiStartup
Benchmark value 1699 exceeds gate value 1660 for firefox webpack home p95 load
Benchmark value 1698 exceeds gate value 1660 for firefox webpack home p95 domContentLoaded
Benchmark value 247 exceeds gate value 156 for firefox webpack home p95 domInteractive
Benchmark value 94 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 37 exceeds gate value 32 for firefox webpack home p95 getState
Benchmark value 11 exceeds gate value 2 for firefox webpack home p95 initialActions
Benchmark value 1647 exceeds gate value 1630 for firefox webpack home p95 loadScripts
Benchmark value 32 exceeds gate value 28 for firefox webpack home p95 setupStore
Sum of mean exceeds: 351ms | Sum of p95 exceeds: 1001.8ms
Sum of all benchmark exceeds: 1352.8ms

Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 833 Bytes (0.02%)
  • ui: -62.43 KiB (-0.9%)
  • common: 254 Bytes (0%)

@metamaskbot
Copy link
Collaborator

Builds ready [6dbf846]
UI Startup Metrics (1198 ± 59 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1198109114625912331273
load101090612696110471079
domContentLoaded100290012646210381068
domInteractive18145261737
firstPaint726160123538110281071
backgroundConnect2202052488224235
firstReactRender22144572338
getState1253771527
initialActions407510315
loadScripts790691103960826855
setupStore85183914
WebpackHomeuiStartup22161641268724223942662
load16581206200421218131979
domContentLoaded16521201199021118091962
domInteractive171188141444
firstPaint1766032761232284
backgroundConnect301289153363
firstReactRender1768839591173382
getState3253037113263
initialActions5224369
loadScripts16471199198220918071955
setupStore2663186214276
FirefoxBrowserifyHomeuiStartup13261126178911513751559
load114098315208812011298
domContentLoaded113998315208812001297
domInteractive1013330450106221
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect291772113259
firstReactRender23194842328
getState62789520
initialActions30426212
loadScripts111996815018811801276
setupStore11322223635
WebpackHomeuiStartup16011372220414516821837
load13331122183512314201517
domContentLoaded13321122183512314191516
domInteractive95302885393250
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect291989103347
firstReactRender56449476068
getState949610827
initialActions4010010314
loadScripts13111104180312314001495
setupStore94718825
Benchmark value 220 exceeds gate value 10 for chrome browserify home mean backgroundConnect
Benchmark value 5 exceeds gate value 1 for chrome browserify home mean initialActions
Benchmark value 236 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 15 exceeds gate value 1.2 for chrome browserify home p95 initialActions
Benchmark value 2217 exceeds gate value 2192 for chrome webpack home mean uiStartup
Benchmark value 33 exceeds gate value 29 for chrome webpack home mean getState
Benchmark value 2662 exceeds gate value 2454 for chrome webpack home p95 uiStartup
Benchmark value 382 exceeds gate value 370 for chrome webpack home p95 firstReactRender
Benchmark value 263 exceeds gate value 195 for chrome webpack home p95 getState
Benchmark value 9 exceeds gate value 7 for chrome webpack home p95 initialActions
Benchmark value 276 exceeds gate value 65 for chrome webpack home p95 setupStore
Benchmark value 29 exceeds gate value 25 for firefox browserify home mean backgroundConnect
Benchmark value 4 exceeds gate value 1 for firefox browserify home mean initialActions
Benchmark value 11 exceeds gate value 9 for firefox browserify home mean setupStore
Benchmark value 221 exceeds gate value 195 for firefox browserify home p95 domInteractive
Benchmark value 12 exceeds gate value 2 for firefox browserify home p95 initialActions
Benchmark value 35 exceeds gate value 27 for firefox browserify home p95 setupStore
Benchmark value 30 exceeds gate value 26 for firefox webpack home mean backgroundConnect
Benchmark value 56 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 250 exceeds gate value 156 for firefox webpack home p95 domInteractive
Benchmark value 68 exceeds gate value 50 for firefox webpack home p95 firstReactRender
Benchmark value 14 exceeds gate value 2 for firefox webpack home p95 initialActions
Sum of mean exceeds: 277ms | Sum of p95 exceeds: 900.8ms
Sum of all benchmark exceeds: 1177.8ms

Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 43 Bytes (0%)
  • ui: -4.45 KiB (-0.06%)
  • common: 45 Bytes (0%)

@MajorLift MajorLift marked this pull request as ready for review August 11, 2025 09:56
@MajorLift MajorLift moved this from Needs more work from the author to Review in progress in PR review queue Aug 11, 2025
cursor[bot]

This comment was marked as outdated.

@metamaskbot
Copy link
Collaborator

Builds ready [2c740d2]
UI Startup Metrics (1171 ± 63 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1171106914366312011268
load99488012335910241070
domContentLoaded98787612165810171066
domInteractive17135161734
firstPaint63092115339310081056
backgroundConnect2142012477219224
firstReactRender20154052232
getState1253671630
initialActions40638418
loadScripts77967799755811865
setupStore85172813
WebpackHomeuiStartup21731660256320422892497
load16221231192816417011869
domContentLoaded16161227190816216961856
domInteractive171297151457
firstPaint1685931451197266
backgroundConnect3015283273154
firstReactRender21883400120366382
getState2943096911273
initialActions5215269
loadScripts16111225189616116901843
setupStore237303561425
FirefoxBrowserifyHomeuiStartup1312111615459613881491
load113397313808811931304
domContentLoaded113397313798811931304
domInteractive1013229750100220
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect281790113153
firstReactRender24195162338
getState727110524
initialActions4016517213
loadScripts111295913618711651276
setupStore1035512740
WebpackHomeuiStartup16011373208214917001894
load13271121162012814491577
domContentLoaded13271121162012714491576
domInteractive98302785397258
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect301998113349
firstReactRender56427366067
getState11415116926
initialActions41658315
loadScripts13051103159912814271554
setupStore95476918
Benchmark value 215 exceeds gate value 10 for chrome browserify home mean backgroundConnect
Benchmark value 5 exceeds gate value 1 for chrome browserify home mean initialActions
Benchmark value 224 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 18 exceeds gate value 1.2 for chrome browserify home p95 initialActions
Benchmark value 2497 exceeds gate value 2454 for chrome webpack home p95 uiStartup
Benchmark value 382 exceeds gate value 370 for chrome webpack home p95 firstReactRender
Benchmark value 273 exceeds gate value 195 for chrome webpack home p95 getState
Benchmark value 9 exceeds gate value 7 for chrome webpack home p95 initialActions
Benchmark value 29 exceeds gate value 25 for firefox browserify home mean backgroundConnect
Benchmark value 5 exceeds gate value 1 for firefox browserify home mean initialActions
Benchmark value 10 exceeds gate value 9 for firefox browserify home mean setupStore
Benchmark value 220 exceeds gate value 195 for firefox browserify home p95 domInteractive
Benchmark value 13 exceeds gate value 2 for firefox browserify home p95 initialActions
Benchmark value 40 exceeds gate value 27 for firefox browserify home p95 setupStore
Benchmark value 31 exceeds gate value 26 for firefox webpack home mean backgroundConnect
Benchmark value 57 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 258 exceeds gate value 156 for firefox webpack home p95 domInteractive
Benchmark value 67 exceeds gate value 50 for firefox webpack home p95 firstReactRender
Benchmark value 15 exceeds gate value 2 for firefox webpack home p95 initialActions
Sum of mean exceeds: 245ms | Sum of p95 exceeds: 538.8ms
Sum of all benchmark exceeds: 783.8ms

Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 43 Bytes (0%)
  • ui: -4.45 KiB (-0.06%)
  • common: -2 Bytes (0%)

@MajorLift MajorLift force-pushed the chore/react-router-v6/250515-convert-Routes-to-function-component branch from 9b3c3f4 to 2da9b28 Compare August 11, 2025 12:57
@metamaskbot
Copy link
Collaborator

Builds ready [2da9b28]
UI Startup Metrics (1197 ± 62 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1197107413956212381308
load101389311806010511114
domContentLoaded100588811756110451106
domInteractive17144261733
firstPaint65682117740410211108
backgroundConnect2161982429220236
firstReactRender19143641931
getState12575101328
initialActions507012317
loadScripts79767896761839899
setupStore84243912
WebpackHomeuiStartup23111687271819624052635
load17451233202116718441947
domContentLoaded17381229200716518401941
domInteractive171253101447
firstPaint1776435158221266
backgroundConnect281692153066
firstReactRender1889040993194389
getState2642996212251
initialActions52374713
loadScripts17341227199416418371930
setupStore246313561535
FirefoxBrowserifyHomeuiStartup13091118200713513641577
load111897915008611691261
domContentLoaded111897915008611681260
domInteractive95333965294231
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect281678123157
firstReactRender23205142328
getState8318320526
initialActions30306316
loadScripts109896514828411441230
setupStore935111643
WebpackHomeuiStartup16081410227215716921921
load13261155165212414191575
domContentLoaded13261154165212414191575
domInteractive1033630755100261
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3120101103443
firstReactRender56438076170
getState1044171227
initialActions7121623526
loadScripts13041130163112313991553
setupStore12512015936
Benchmark value 216 exceeds gate value 10 for chrome browserify home mean backgroundConnect
Benchmark value 5 exceeds gate value 1 for chrome browserify home mean initialActions
Benchmark value 236 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 17 exceeds gate value 1.2 for chrome browserify home p95 initialActions
Benchmark value 2311 exceeds gate value 2192 for chrome webpack home mean uiStartup
Benchmark value 1746 exceeds gate value 1711 for chrome webpack home mean load
Benchmark value 1739 exceeds gate value 1704 for chrome webpack home mean domContentLoaded
Benchmark value 1734 exceeds gate value 1699 for chrome webpack home mean loadScripts
Benchmark value 2635 exceeds gate value 2454 for chrome webpack home p95 uiStartup
Benchmark value 389 exceeds gate value 370 for chrome webpack home p95 firstReactRender
Benchmark value 251 exceeds gate value 195 for chrome webpack home p95 getState
Benchmark value 13 exceeds gate value 7 for chrome webpack home p95 initialActions
Benchmark value 28 exceeds gate value 25 for firefox browserify home mean backgroundConnect
Benchmark value 4 exceeds gate value 1 for firefox browserify home mean initialActions
Benchmark value 10 exceeds gate value 9 for firefox browserify home mean setupStore
Benchmark value 231 exceeds gate value 195 for firefox browserify home p95 domInteractive
Benchmark value 26 exceeds gate value 24 for firefox browserify home p95 getState
Benchmark value 16 exceeds gate value 2 for firefox browserify home p95 initialActions
Benchmark value 43 exceeds gate value 27 for firefox browserify home p95 setupStore
Benchmark value 104 exceeds gate value 100 for firefox webpack home mean domInteractive
Benchmark value 31 exceeds gate value 26 for firefox webpack home mean backgroundConnect
Benchmark value 57 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 261 exceeds gate value 156 for firefox webpack home p95 domInteractive
Benchmark value 70 exceeds gate value 50 for firefox webpack home p95 firstReactRender
Benchmark value 26 exceeds gate value 2 for firefox webpack home p95 initialActions
Benchmark value 36 exceeds gate value 28 for firefox webpack home p95 setupStore
Sum of mean exceeds: 476ms | Sum of p95 exceeds: 720.8ms
Sum of all benchmark exceeds: 1196.8ms

Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 43 Bytes (0%)
  • ui: -4.45 KiB (-0.06%)
  • common: 4 Bytes (0%)

@metamaskbot
Copy link
Collaborator

Builds ready [aeeb1c6]
UI Startup Metrics (1161 ± 61 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1161105013016112091285
load98687511206010371094
domContentLoaded97886911106010301085
domInteractive17134261736
firstPaint70679112137810081093
backgroundConnect2132002388218229
firstReactRender19143242030
getState1153361425
initialActions40527515
loadScripts77367291360824883
setupStore85172811
WebpackHomeuiStartup23721825277619224992693
load17731344208017018682010
domContentLoaded17661340206816818601999
domInteractive181285131555
firstPaint1786244368215299
backgroundConnect3212114183381
firstReactRender21791416112368392
getState3142876515246
initialActions62224816
loadScripts17611337205416618551990
setupStore3173156618242
FirefoxBrowserifyHomeuiStartup13201126181211613791484
load113898514708311991285
domContentLoaded113798514708311991284
domInteractive1003125446114215
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2916101143060
firstReactRender23205252335
getState72759524
initialActions30405214
loadScripts111597014498311721263
setupStore935112637
WebpackHomeuiStartup16031341215115216991898
load13421122181213714341638
domContentLoaded13421121181113714341637
domInteractive103323786199256
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect28197673242
firstReactRender55417566064
getState9410812825
initialActions31294312
loadScripts13211102179413714151611
setupStore94427825
Benchmark value 213 exceeds gate value 10 for chrome browserify home mean backgroundConnect
Benchmark value 5 exceeds gate value 1 for chrome browserify home mean initialActions
Benchmark value 230 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 15 exceeds gate value 1.2 for chrome browserify home p95 initialActions
Benchmark value 2373 exceeds gate value 2192 for chrome webpack home mean uiStartup
Benchmark value 1773 exceeds gate value 1711 for chrome webpack home mean load
Benchmark value 1766 exceeds gate value 1704 for chrome webpack home mean domContentLoaded
Benchmark value 32 exceeds gate value 29 for chrome webpack home mean getState
Benchmark value 1761 exceeds gate value 1699 for chrome webpack home mean loadScripts
Benchmark value 2694 exceeds gate value 2454 for chrome webpack home p95 uiStartup
Benchmark value 392 exceeds gate value 370 for chrome webpack home p95 firstReactRender
Benchmark value 246 exceeds gate value 195 for chrome webpack home p95 getState
Benchmark value 16 exceeds gate value 7 for chrome webpack home p95 initialActions
Benchmark value 1990 exceeds gate value 1970 for chrome webpack home p95 loadScripts
Benchmark value 242 exceeds gate value 65 for chrome webpack home p95 setupStore
Benchmark value 29 exceeds gate value 25 for firefox browserify home mean backgroundConnect
Benchmark value 3 exceeds gate value 1 for firefox browserify home mean initialActions
Benchmark value 10 exceeds gate value 9 for firefox browserify home mean setupStore
Benchmark value 215 exceeds gate value 195 for firefox browserify home p95 domInteractive
Benchmark value 14 exceeds gate value 2 for firefox browserify home p95 initialActions
Benchmark value 37 exceeds gate value 27 for firefox browserify home p95 setupStore
Benchmark value 103 exceeds gate value 100 for firefox webpack home mean domInteractive
Benchmark value 29 exceeds gate value 26 for firefox webpack home mean backgroundConnect
Benchmark value 56 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 256 exceeds gate value 156 for firefox webpack home p95 domInteractive
Benchmark value 64 exceeds gate value 50 for firefox webpack home p95 firstReactRender
Benchmark value 12 exceeds gate value 2 for firefox webpack home p95 initialActions
Sum of mean exceeds: 611ms | Sum of p95 exceeds: 910.8ms
Sum of all benchmark exceeds: 1521.8ms

Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 43 Bytes (0%)
  • ui: -4.44 KiB (-0.06%)
  • common: 25 Bytes (0%)

@MajorLift MajorLift changed the title refactor: Migrate <Routes /> into a functional TypeScript component refactor: Migrate <Routes /> into a TypeScript functional component Aug 12, 2025
@metamaskbot
Copy link
Collaborator

Builds ready [2864c6e]
UI Startup Metrics (1172 ± 61 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1172104413746112021280
load99289211545610251107
domContentLoaded98487911435610141098
domInteractive18135171739
firstPaint63689113739410061085
backgroundConnect2131992448217228
firstReactRender20135462133
getState13583111531
initialActions20153211
loadScripts77867993056812889
setupStore84273812
WebpackHomeuiStartup23461693278020024572701
load17691241207318218852039
domContentLoaded17621237205318018782019
domInteractive2012100181577
firstPaint1886540471238341
backgroundConnect281395143157
firstReactRender1988942196208390
getState3343387514283
initialActions9228928711
loadScripts17581235203917818752010
setupStore167327321622
FirefoxBrowserifyHomeuiStartup13301153168510213941508
load1140100513367111871296
domContentLoaded1139100413367111871295
domInteractive933425738102192
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect291694133159
firstReactRender24195362349
getState627710532
initialActions30214213
loadScripts111999013217311661276
setupStore10317920649
WebpackHomeuiStartup15671359194613316351872
load13041130162911513791527
domContentLoaded13041130162911513791527
domInteractive91302544693241
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect29206683446
firstReactRender52398875663
getState94487925
initialActions509811416
loadScripts12821112160911513501506
setupStore10512914829
Benchmark value 214 exceeds gate value 10 for chrome browserify home mean backgroundConnect
Benchmark value 3 exceeds gate value 1 for chrome browserify home mean initialActions
Benchmark value 228 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 11 exceeds gate value 1.2 for chrome browserify home p95 initialActions
Benchmark value 2347 exceeds gate value 2192 for chrome webpack home mean uiStartup
Benchmark value 1770 exceeds gate value 1711 for chrome webpack home mean load
Benchmark value 1763 exceeds gate value 1704 for chrome webpack home mean domContentLoaded
Benchmark value 34 exceeds gate value 29 for chrome webpack home mean getState
Benchmark value 9 exceeds gate value 7 for chrome webpack home mean initialActions
Benchmark value 1758 exceeds gate value 1699 for chrome webpack home mean loadScripts
Benchmark value 2702 exceeds gate value 2454 for chrome webpack home p95 uiStartup
Benchmark value 2039 exceeds gate value 2030 for chrome webpack home p95 load
Benchmark value 2019 exceeds gate value 2005 for chrome webpack home p95 domContentLoaded
Benchmark value 78 exceeds gate value 57 for chrome webpack home p95 domInteractive
Benchmark value 341 exceeds gate value 334 for chrome webpack home p95 firstPaint
Benchmark value 390 exceeds gate value 370 for chrome webpack home p95 firstReactRender
Benchmark value 283 exceeds gate value 195 for chrome webpack home p95 getState
Benchmark value 11 exceeds gate value 7 for chrome webpack home p95 initialActions
Benchmark value 2010 exceeds gate value 1970 for chrome webpack home p95 loadScripts
Benchmark value 29 exceeds gate value 25 for firefox browserify home mean backgroundConnect
Benchmark value 3 exceeds gate value 1 for firefox browserify home mean initialActions
Benchmark value 10 exceeds gate value 9 for firefox browserify home mean setupStore
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 49 exceeds gate value 27 for firefox browserify home p95 setupStore
Benchmark value 30 exceeds gate value 26 for firefox webpack home mean backgroundConnect
Benchmark value 53 exceeds gate value 38 for firefox webpack home mean firstReactRender
Benchmark value 5 exceeds gate value 1 for firefox webpack home mean initialActions
Benchmark value 241 exceeds gate value 156 for firefox webpack home p95 domInteractive
Benchmark value 63 exceeds gate value 50 for firefox webpack home p95 firstReactRender
Benchmark value 16 exceeds gate value 2 for firefox webpack home p95 initialActions
Benchmark value 29 exceeds gate value 28 for firefox webpack home p95 setupStore
Sum of mean exceeds: 575ms | Sum of p95 exceeds: 824.8ms
Sum of all benchmark exceeds: 1399.8ms

Bundle size diffs [🚀 Bundle size reduced!]
  • background: -1.34 KiB (-0.03%)
  • ui: -1.9 KiB (-0.03%)
  • common: -68.67 KiB (-0.91%)

Copy link
Contributor Author

@MajorLift MajorLift left a comment

Choose a reason for hiding this comment

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

Notes for reviewers:

Comment on lines +94 to +95
export const useAppSelector: TypedUseSelectorHook<MetaMaskReduxState> =
useSelector;
Copy link
Contributor Author

@MajorLift MajorLift Aug 12, 2025

Choose a reason for hiding this comment

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

Added a typed hook as recommended by the redux docs. We should phase out useSelector usage in favor of this hook, and progressively replace existing usages as well.

https://react-redux.js.org/using-react-redux/usage-with-typescript#define-typed-hooks

} from '../../helpers/constants/routes';
import {
getProviderConfig,
isNetworkLoading as getIsNetworkLoading,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We should rename this selector at some point.

Comment on lines +151 to +161
// TODO: Fix `as unknown as` casting once `mmLazy` is updated to handle named exports, wrapped components, and other React module types.
// Casting is preferable over `@ts-expect-error` annotations in this case,
// because it doesn't suppress competing error messages e.g. "Cannot find module..."

// Begin Lazy Routes
const OnboardingFlow = mmLazy(
(() =>
import(
'../onboarding-flow/onboarding-flow.js'
)) as unknown as DynamicImportType,
);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The type casting here isn't optimal, but given that fixing mmLazy is out-of-scope for this PR and this issue doesn't affect runtime functionality, it seems like an acceptable workaround.

import('../keychains/restore-vault.js')) as unknown as DynamicImportType,
);
const ImportSrpPage = mmLazy(
// TODO: This is a named export. Fix incorrect type casting once `mmLazy` is updated to handle non-default export types.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

mmLazy is currently typed to only accept modules where the default export is a React component. Because of this, we're forced to use an incorrect type here. At the very least, we'll need to update mmLazy to handle React components that are named exports.

// End Lazy Routes

// eslint-disable-next-line @typescript-eslint/naming-convention
export default function Routes() {
Copy link
Contributor Author

@MajorLift MajorLift Aug 12, 2025

Choose a reason for hiding this comment

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

  • Routes does not take any props.
  • Interfacing with the redux store and react-router APIs, as well as all stateful/reactive logic are handled with hooks in the component body.

Comment on lines +392 to +466
const prevPropsRef = useRef({ isUnlocked, totalUnapprovedConfirmationCount });

useEffect(() => {
const prevProps = prevPropsRef.current;

// Automatically switch the network if the user
// no longer has unapproved transactions and they
// should be on a different network for the
// currently active tab's dapp
if (
networkToAutomaticallySwitchTo &&
totalUnapprovedConfirmationCount === 0 &&
(prevProps.totalUnapprovedConfirmationCount > 0 ||
(prevProps.isUnlocked === false && isUnlocked))
) {
dispatch(automaticallySwitchNetwork(networkToAutomaticallySwitchTo));
}

prevPropsRef.current = { isUnlocked, totalUnapprovedConfirmationCount };
}, [
networkToAutomaticallySwitchTo,
isUnlocked,
totalUnapprovedConfirmationCount,
dispatch,
]);

useEffect(() => {
// Terminate the popup when another popup is opened
// if the user is using RPC queueing
if (
currentExtensionPopupId !== undefined &&
'metamask' in global &&
typeof global.metamask === 'object' &&
global.metamask &&
'id' in global.metamask &&
global.metamask.id !== undefined &&
currentExtensionPopupId !== global.metamask.id
) {
window.close();
}
}, [currentExtensionPopupId]);

useEffect(() => {
const windowType = getEnvironmentType();
const { openExtensionInBrowser } = globalThis.platform ?? {};
if (
showExtensionInFullSizeView &&
windowType === ENVIRONMENT_TYPE_POPUP &&
openExtensionInBrowser
) {
openExtensionInBrowser();
}
}, [showExtensionInFullSizeView]);

useEffect(() => {
const unlisten = history.listen((locationObj: Location, action: 'PUSH') => {
if (action === 'PUSH') {
dispatch(pageChanged(locationObj.pathname));
}
});

return () => {
unlisten();
};
}, [history, dispatch]);

useEffect(() => {
setTheme(theme);
}, [theme]);

useEffect(() => {
if (!currentCurrency) {
dispatch(setCurrentCurrency('usd'));
}
}, [currentCurrency, dispatch]);
Copy link
Contributor Author

@MajorLift MajorLift Aug 12, 2025

Choose a reason for hiding this comment

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

Side effects have been placed in separate useEffect hooks to prevent unnecessary re-renders triggered by unrelated dependencies.

See https://www.diffchecker.com/W5mhBkOY for diff.

Comment on lines +453 to +455
return () => {
unlisten();
};
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a cleanup function to prevent memory leaks.

Comment on lines +650 to +666
const isLoadingShown =
isLoading &&
completedOnboarding &&
///: BEGIN:ONLY_INCLUDE_IF(keyring-snaps)
!pendingConfirmations.some(
(confirmation: Confirmation) =>
confirmation.type ===
SNAP_MANAGE_ACCOUNTS_CONFIRMATION_TYPES.showSnapAccountRedirect,
) &&
///: END:ONLY_INCLUDE_IF
// In the redesigned screens, we hide the general loading spinner and the
// loading states are on a component by component basis.
!isCorrectApprovalType &&
!isCorrectTransactionType &&
// We don't want to show the loading screen on the deep link route, as it
// is already a fullscreen interface.
!isShowingDeepLinkRoute;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Refactored for deduplication. Original code:

    let isLoadingShown =
      isLoading &&
      completedOnboarding &&
      // In the redesigned screens, we hide the general loading spinner and the
      // loading states are on a component by component basis.
      !isCorrectApprovalType &&
      !isCorrectTransactionType &&
      // We don't want to show the loading screen on the deep link route, as it
      // is already a fullscreen interface.
      !isShowingDeepLinkRoute;

    ///: BEGIN:ONLY_INCLUDE_IF(keyring-snaps)
    isLoadingShown =
      isLoading &&
      completedOnboarding &&
      !pendingConfirmations.some(
        (confirmation) =>
          confirmation.type ===
          SNAP_MANAGE_ACCOUNTS_CONFIRMATION_TYPES.showSnapAccountRedirect,
      ) &&
      // In the redesigned screens, we hide the general loading spinner and the
      // loading states are on a component by component basis.
      !isCorrectApprovalType &&
      !isCorrectTransactionType &&
      // We don't want to show the loading spinner on the deep link route, as it
      // is already a fullscreen interface.
      !isShowingDeepLinkRoute;
    ///: END:ONLY_INCLUDE_IF

https://github.com/MetaMask/metamask-extension/pull/33276/files#diff-2466ed85b744b657eb0b324376eef5486080bf2b897eaa3af9b8c3ed0184ebeaL497-L524

@DDDDDanica DDDDDanica enabled auto-merge August 12, 2025 19:27
Copy link
Contributor

@HowardBraham HowardBraham left a comment

Choose a reason for hiding this comment

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

This was a beast, but I think we got it now!

@DDDDDanica DDDDDanica added this pull request to the merge queue Aug 13, 2025
@github-project-automation github-project-automation bot moved this from Review in progress to Review finalised - Ready to be merged in PR review queue Aug 13, 2025
Merged via the queue into main with commit 703afa1 Aug 13, 2025
271 of 286 checks passed
@DDDDDanica DDDDDanica deleted the chore/react-router-v6/250515-convert-Routes-to-function-component branch August 13, 2025 03:05
@github-actions github-actions bot locked and limited conversation to collaborators Aug 13, 2025
@metamaskbot metamaskbot added the release-13.2.0 Issue or pull request that will be included in release 13.2.0 label Aug 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

INVALID-PR-TEMPLATE PR's body doesn't match template no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed release-13.2.0 Issue or pull request that will be included in release 13.2.0 size-XL team-extension-platform Extension Platform team

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants