Skip to content

Conversation

@MajorLift
Copy link
Contributor

@MajorLift MajorLift commented Nov 20, 2025

Description

Enables React Compiler code transformation and optimizations for Webpack builds.

Webpack CLI arguments

--reactCompilerDebug

This sets the panicThreshold compiler option for stricter debugging.

There are still a large number of React Compiler errors present in the app that do not break functionality but prevent compiler optimizations from being applied. We should aim for eventually being able to create non-production builds with panicThreshold set to critical_errors, and then to all_errors.

--reactCompilerVerbose

This outputs compilation status and error descriptions per file, as well as compiler run result statistics.

The output distinguishes between actionable errors, which are fixable from our end, and "unsupported" errors that are caused by limitations or unimplemented features in React Compiler itself.

Screenshot 2025-11-21 at 3 54 04 PM

Open in GitHub Codespaces

Changelog

CHANGELOG entry: null (build)

Related issues

Manual testing steps

  1. Create Webpack dev build using yarn webpack.
  2. Inspect ./dist/{chrome,firefox}/js-ui_{com,d,p,pages}*
  3. Search for "react_compiler_runtime__WEBPACK_IMPORTED_MODULE_0__.c"
  4. There should be many examples of React Compiler-transformed code that uses a $ variable e.g.
  const $ = (0,react_compiler_runtime__WEBPACK_IMPORTED_MODULE_0__.c)(4);
  let t2;
  if ($[0] !== t1) {
    t2 = t1 === undefined ? {
      expireClipboard: true
    } : t1;
    $[0] = t1;
    $[1] = t2;
  } else {
    t2 = $[1];
  }

Screenshots/Recordings

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

Enable React Compiler in Webpack builds with new CLI flags, a loader for ui/** React files, verbose stats, and corresponding policy/dependency updates.

  • Build system (Webpack):
    • Add React Compiler loader and logger (utils/loaders/reactCompilerLoader.ts); target React 17; optional verbose stats plugin.
    • New CLI flags in utils/cli.ts: --reactCompilerVerbose and --reactCompilerDebug (all|critical|none); included in dry-run output and defaults test.
    • Compile React files in ui/{components,contexts,hooks,layouts,pages} via new rule using react-compiler-webpack; add UI_DIR_RE matcher.
  • Dependencies/Config:
    • Add react-compiler-webpack dependency; update .depcheckrc.yml ignores; refresh yarn.lock.
    • Update LavaMoat policies to allow React Compiler runtime/webpack and Babel syntax plugins for JSX/TypeScript.

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

MajorLift and others added 30 commits November 5, 2025 09:02
@metamaskbot
Copy link
Collaborator

Builds ready [30f49be]
UI Startup Metrics (1165 ± 96 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup116598914419612221383
load100184912318610511174
domContentLoaded99584412188410441165
domInteractive2614105212187
firstPaint56015112363899811158
backgroundConnect2031872379207221
firstReactRender27185393144
getState29176893348
initialActions102112
loadScripts799650101583850966
setupStore1053031118
numNetworkReqs1257821575
BrowserifyPower User HomeuiStartup18861521277327720632434
load1015885159717510251549
domContentLoaded1000874157617410001535
domInteractive43172705730189
firstPaint6099315974479411554
backgroundConnect22320331415230245
firstReactRender7947115138998
getState17613034045188294
initialActions104112
loadScripts79366713641717961321
setupStore191061112444
numNetworkReqs1096629447124199
WebpackStandard HomeuiStartup8467051214898751040
load665580108388693849
domContentLoaded660575106187688842
domInteractive2715119232391
firstPaint255731098200224677
backgroundConnect1254481433
firstReactRender2921118133340
getState2714115133546
initialActions103112
loadScripts657573105885686834
setupStore1163451220
numNetworkReqs1257720574
WebpackPower User HomeuiStartup14551190273124515761889
load68358715191446931021
domContentLoaded67258115071446781005
domInteractive42173275431182
firstPaint309931514217391676
backgroundConnect1583861827
firstReactRender8143104139099
getState15912332637168261
initialActions103112
loadScripts6695791497142676996
setupStore21869142755
numNetworkReqs1496430956182280
FirefoxBrowserifyStandard HomeuiStartup12341083171611212761468
load104894714538410921203
domContentLoaded104894714538410921203
domInteractive59322603583116
firstPaint------
backgroundConnect3621139203889
firstReactRender22184652237
getState1268514932
initialActions102012
loadScripts102593214287810701157
setupStore11611713928
numNetworkReqs1156816759
BrowserifyPower User HomeuiStartup27931970369435529513524
load1228966181219613481614
domContentLoaded1228966181219613471614
domInteractive14234709137150503
firstPaint------
backgroundConnect236251068252398860
firstReactRender90431492096133
getState25358889259206855
initialActions3125337
loadScripts1178948173918612511591
setupStore1216779187131737
numNetworkReqs90592174382207
WebpackStandard HomeuiStartup14511280179911715111713
load1245107315209513051443
domContentLoaded1245107315209513051443
domInteractive55261713480128
firstPaint------
backgroundConnect392286134271
firstReactRender27206772836
getState135152191145
initialActions103112
loadScripts1221105814969212871393
setupStore125179181121
numNetworkReqs1156815753
WebpackPower User HomeuiStartup29082302388533431523646
load14211133195222015731886
domContentLoaded14201133195222015731885
domInteractive13230667142139524
firstPaint------
backgroundConnect18228908199218703
firstReactRender89401992397141
getState31374896284535866
initialActions51549334
loadScripts13811110191121514861834
setupStore100678515791557
numNetworkReqs91612244384203
📊 Page Load Benchmark Results

Current Commit: 30f49be | Date: 11/24/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.05s (±42ms) 🟡 | historical mean value: 1.03s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 732ms (±38ms) 🟢 | historical mean value: 719ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 78ms (±12ms) 🟢 | historical mean value: 78ms ⬆️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.05s 42ms 1.03s 1.34s 1.07s 1.34s
domContentLoaded 732ms 38ms 711ms 994ms 743ms 994ms
firstPaint 78ms 12ms 64ms 184ms 88ms 184ms
firstContentfulPaint 78ms 12ms 64ms 184ms 88ms 184ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

@github-actions github-actions bot added size-M and removed size-S labels Nov 25, 2025
@metamaskbot
Copy link
Collaborator

Builds ready [88afa9e]
UI Startup Metrics (1295 ± 129 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup12951040161512913791528
load1040852125910210891216
domContentLoaded1034848125310110851209
domInteractive2615105212187
firstPaint58292126741610361207
backgroundConnect21619225714223243
firstReactRender372499114158
getState63211772874131
initialActions105112
loadScripts8246511054998701000
setupStore1463961726
numNetworkReqs41281453430143
BrowserifyPower User HomeuiStartup21191774271521622552599
load1020882145013310211373
domContentLoaded1006876144313310071358
domInteractive35171593230129
firstPaint5678714064139721313
backgroundConnect288203811143245643
firstReactRender904217723108124
getState18313530735203242
initialActions106113
loadScripts79867712301347931150
setupStore221074122547
numNetworkReqs103672855697269
WebpackStandard HomeuiStartup8697251199999181109
load64256087080680821
domContentLoaded63755686379672815
domInteractive2714110212390
firstPaint32889848212588684
backgroundConnect1263571430
firstReactRender3422102113748
getState5215121247095
initialActions105113
loadScripts63455585478670807
setupStore16692141542
numNetworkReqs41271493430142
WebpackPower User HomeuiStartup18181288264324219502218
load6485491296108653902
domContentLoaded6385421287108643888
domInteractive33161422930123
firstPaint3441161295239584781
backgroundConnect62859214318537
firstReactRender914117025114132
getState18614170871187217
initialActions105112
loadScripts6365411279106641880
setupStore20759122245
numNetworkReqs1747041280225383
FirefoxBrowserifyStandard HomeuiStartup14211204202318515161834
load107896313469111071311
domContentLoaded107796313469111071310
domInteractive61311523286122
firstPaint------
backgroundConnect64243875270161
firstReactRender301993133458
getState3082603628118
initialActions213123
loadScripts105293913148410811245
setupStore2511184232466
numNetworkReqs39281292732123
BrowserifyPower User HomeuiStartup26432032446841928103469
load1141979161013411501478
domContentLoaded1141971161013411501478
domInteractive12036555100114385
firstPaint------
backgroundConnect1143051877133287
firstReactRender82373153290124
getState26061926198281717
initialActions207123
loadScripts1111943156413211101452
setupStore17711775188265615
numNetworkReqs102603116580239
WebpackStandard HomeuiStartup16731378230520617512220
load13101128164111413701564
domContentLoaded13101123164111413691564
domInteractive67283064990167
firstPaint------
backgroundConnect70202774781167
firstReactRender311972103647
getState29102313125110
initialActions215123
loadScripts12821113159510813461493
setupStore2710193272386
numNetworkReqs41281302837124
WebpackPower User HomeuiStartup30402203588577931674780
load14501181280837815132680
domContentLoaded14501181280837815132679
domInteractive1083047310495423
firstPaint------
backgroundConnect149271146204138468
firstReactRender89373164292180
getState349401422275587897
initialActions401011127
loadScripts13691150264426714251775
setupStore12561270183126494
numNetworkReqs100612595979245
📊 Page Load Benchmark Results

Current Commit: 88afa9e | Date: 11/25/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.04s (±68ms) 🟡 | historical mean value: 1.05s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 730ms (±66ms) 🟢 | historical mean value: 731ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 75ms (±10ms) 🟢 | historical mean value: 77ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.04s 68ms 1.01s 1.33s 1.26s 1.33s
domContentLoaded 730ms 66ms 699ms 1.01s 933ms 1.01s
firstPaint 75ms 10ms 60ms 152ms 84ms 152ms
firstContentfulPaint 75ms 10ms 60ms 152ms 84ms 152ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

@metamaskbot
Copy link
Collaborator

Builds ready [7266050]
UI Startup Metrics (1393 ± 133 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup13931063193113314521684
load1110893153110611621301
domContentLoaded1104874152210611561289
domInteractive30161332624110
firstPaint54894154442410621282
backgroundConnect22820427013237254
firstReactRender402381124566
getState74232193581150
initialActions107113
loadScripts88266812791039341075
setupStore1575171730
numNetworkReqs41271523430143
BrowserifyPower User HomeuiStartup20511752263519821312519
load1020895150013310371331
domContentLoaded1006884148913410211323
domInteractive34171462732121
firstPaint50810414333679391157
backgroundConnect282203740134235568
firstReactRender864019526104121
getState17913232235195250
initialActions106112
loadScripts79867612871337961126
setupStore20107092139
numNetworkReqs103642905794276
WebpackStandard HomeuiStartup88573713441159071152
load65756797191688863
domContentLoaded65256296291684858
domInteractive2815120242296
firstPaint26081928174306645
backgroundConnect1167491130
firstReactRender39242212737105
getState53251542567105
initialActions103112
loadScripts64956095289682856
setupStore15769101644
numNetworkReqs41271513430144
WebpackPower User HomeuiStartup19141342258527220682404
load6925881114108698958
domContentLoaded6825831108108684949
domInteractive37171713435144
firstPaint283961122219252723
backgroundConnect73761315627565
firstReactRender904314120103122
getState194140750102188237
initialActions103012
loadScripts6805811099106682937
setupStore23699152550
numNetworkReqs1676940279219387
FirefoxBrowserifyStandard HomeuiStartup14821198212320016181898
load1126971149212612001403
domContentLoaded1125970149212612001402
domInteractive66311583391126
firstPaint------
backgroundConnect70272635480207
firstReactRender29196393349
getState2611127182467
initialActions204123
loadScripts1092955141411111671354
setupStore30132313031104
numNetworkReqs39281302634118
BrowserifyPower User HomeuiStartup26382005479039327573183
load11771007171215512111538
domContentLoaded11761007171215512111537
domInteractive1223648097118391
firstPaint------
backgroundConnect1203458796122321
firstReactRender86362733091126
getState299431160227369816
initialActions2139423
loadScripts1134990168314211501466
setupStore17513778205175736
numNetworkReqs100623205984233
WebpackStandard HomeuiStartup16131361324824716682077
load12721092280318413081470
domContentLoaded12721092280318413071470
domInteractive56281333081112
firstPaint------
backgroundConnect59242353664128
firstReactRender28197593249
getState2610215292457
initialActions204122
loadScripts12461077271317412811439
setupStore35112464524135
numNetworkReqs40291292639121
WebpackPower User HomeuiStartup31412172571980032694986
load14771181338535116102171
domContentLoaded14761181338535116102171
domInteractive11925588120105458
firstPaint------
backgroundConnect133271223141137405
firstReactRender99364176396278
getState288721093238401817
initialActions2040423
loadScripts14121129321631514881850
setupStore14661135204148606
numNetworkReqs103632556182248
📊 Page Load Benchmark Results

Current Commit: 7266050 | Date: 11/26/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.05s (±73ms) 🟡 | historical mean value: 1.05s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 734ms (±70ms) 🟢 | historical mean value: 731ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 77ms (±11ms) 🟢 | historical mean value: 77ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.05s 73ms 1.01s 1.32s 1.30s 1.32s
domContentLoaded 734ms 70ms 698ms 999ms 976ms 999ms
firstPaint 77ms 11ms 60ms 164ms 84ms 164ms
firstContentfulPaint 77ms 11ms 60ms 164ms 84ms 164ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

davidmurdoch pushed a commit that referenced this pull request Nov 26, 2025
…er/react-compiler` ESLint rule violations (#37480)

<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## Motivation

This commit enables React Compiler for Babel-transformed Browserify
builds, and for ESLint (via the `react-compiler/react-compiler`
ruleset). We can expect long-term UI performance benefits and developer
time savings from this change. The Compiler transparently adds
memoization code for React components and hooks, among other
optimizations, and enforces React best practices.

## **Description**

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

Because enabling React Compiler requires addressing all violations of
the `react-compiler/react-compiler` rule, this commit contains a large
number of formatting changes and renames that do not require close
review, alongside refactors and logical changes that do.

I would suggest that reviewers primarily focus on whether a given change
is problematic, rather than on whether it is necessary. If the
motivation for any change is unclear, it's safe to assume that it fixes
an error thrown in CI. The objective of this commit is to ship fixes
that unblock React Compiler without introducing regressions in
functionality or performance. Suggestions on implementing React best
practices will be catalogued and addressed in follow-up tickets.

The 10% bundle size increase is due to new memoizations being applied as
React Compiler transforms files during the build process, which is the
tradeoff for improvements in runtime interaction and responsiveness
metrics. Despite this change, the UI startup and pageLoad benchmark
results show no evidence of degradations in initial load time.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/37480?quickstart=1)

## **Changelog**

<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`

If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`

(This helps the Release Engineer do their job more quickly and
accurately)
-->

CHANGELOG entry: null (non-user facing but regressions possible)

## **Related issues**

- Epic: #33059
- Previous: #37383
- Next: #38007

## **Manual testing steps**

1. Create a Browserify dev build by running `yarn start`.
2. Inspect `./dist/(chrome|firefox)/ui-[3-17].js`.
3. Search for "`_reactCompilerRuntime.c`".
4. There should be many examples of React Compiler-optimized code that
uses a `$` variable e.g.
```js
  const $ = (0, _reactCompilerRuntime.c)(22);
  const {
    pathname
  } = (0, _reactRouterDomV5Compat.useLocation)();
  const dispatch = (0, _reactRedux.useDispatch)();
  const t = (0, _useI18nContext.useI18nContext)();
  let t0;
  if ($[0] !== pathname) {
    t0 = (0, _snaps2.decodeSnapIdFromPathname)(pathname);
    $[0] = pathname;
    $[1] = t0;
  } else {
    t0 = $[1];
  }
```

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **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.














<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Enables React Compiler in Browserify Babel builds and enforces the
react-compiler ESLint rule, with broad hook/memoization refactors,
selector renames, tests updates, and dependency/policy changes.
> 
> - **Build/Tooling**:
> - Enable React Compiler via Babel override for
`ui/**/{components,contexts,hooks,layouts,pages}` with
`babel-plugin-react-compiler` (target 17).
> - Add `react-compiler-runtime` and `babel-plugin-react-compiler` deps;
update `esbuild`, `koa` (v3), and related tooling.
> - Enforce `react-compiler/react-compiler` ESLint rule and plugin
across JS/TS React configs.
> - **Policies/Config**:
> - Extend LavaMoat policies and depcheck ignores for React Compiler
packages and updated sub-deps.
> - **UI/Hook Refactors (compliance + perf)**:
> - Replace patterns violating React Compiler (e.g., `useMemo` state
updates, unstable callbacks, missing keys) with
`useCallback`/`useRef`/guards; fix array checks, keys, debounce
handling, and effect deps.
> - Improve polling hooks (`usePolling`, `useMultiPolling`) with input
change detection and cleanup; stabilize navigation and debounce
handlers.
> - Add `isNativeAsset` and use in `AssetPage`; compute asset balances
immutably.
> - **Reliability/Null Safety**:
> - Guard optional `request?.metadata?.id` across confirmations/snaps
flows; miscellaneous null-safe checks.
> - **Selectors/Types**:
> - Rename selectors: `useSafeChainsListValidationSelector` →
`getUseSafeChainsListValidation`; `use4ByteResolutionSelector` →
`getUse4ByteResolution` (and propagate).
> - Tighten types (e.g., `ownerId` optional handling, asset type
helpers).
> - **Tests**:
> - Update tests to use `renderHook` for hooks; adjust mocks to renamed
selectors and new patterns.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
c47e3f6. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: MetaMask Bot <[email protected]>
Base automatically changed from jongsun/build/251103-enable-react-compiler to main November 26, 2025 20:08
@MajorLift
Copy link
Contributor Author

@metamaskbot update-policies

@metamaskbot
Copy link
Collaborator

Policies updated.
👀 Please review the diff for suspicious new powers.

🧠 Learn how: https://lavamoat.github.io/guides/policy-diff/#what-to-look-for-when-reviewing-a-policy-diff

@MajorLift
Copy link
Contributor Author

@metamaskbot update-policies

@metamaskbot
Copy link
Collaborator

Policies updated.
👀 Please review the diff for suspicious new powers.

🧠 Learn how: https://lavamoat.github.io/guides/policy-diff/#what-to-look-for-when-reviewing-a-policy-diff

@MajorLift MajorLift removed the DO-NOT-MERGE Pull requests that should not be merged label Nov 26, 2025
@MajorLift MajorLift marked this pull request as ready for review November 26, 2025 22:08
@MajorLift MajorLift moved this from Review in progress to Needs dev review in PR review queue Nov 26, 2025
@metamaskbot
Copy link
Collaborator

Builds ready [83cf846]
UI Startup Metrics (1297 ± 126 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup12971036165612613741516
load1043856134311111151238
domContentLoaded1037849133610911121229
domInteractive271699212292
firstPaint59895134842710171235
backgroundConnect21519226013222242
firstReactRender3823148154258
getState62201652873130
initialActions107113
loadScripts82965611391069021017
setupStore1352951724
numNetworkReqs41281433330140
BrowserifyPower User HomeuiStartup21621770299226523092730
load1060919155414310451495
domContentLoaded1043910154214210281476
domInteractive37181683036125
firstPaint63595156743710091490
backgroundConnect270207787118239619
firstReactRender64431171668103
getState20113769677214263
initialActions105112
loadScripts82869813271428161264
setupStore23976122750
numNetworkReqs1456936869196302
WebpackStandard HomeuiStartup85073016331258451100
load634566135699638817
domContentLoaded629562135199632811
domInteractive2715237282282
firstPaint23881877168222633
backgroundConnect1163671330
firstReactRender3620169203791
getState56172963569113
initialActions105112
loadScripts626560134197630803
setupStore1465491539
numNetworkReqs41281463330140
WebpackPower User HomeuiStartup16841274215425019322080
load676592101094686950
domContentLoaded667586100695676944
domInteractive34171582931120
firstPaint256921006172256661
backgroundConnect118760419972562
firstReactRender58428596374
getState17312970356178198
initialActions103112
loadScripts66458499793674936
setupStore19854102142
numNetworkReqs1676640480212386
FirefoxBrowserifyStandard HomeuiStartup14601195202117815491860
load1122970153311311681416
domContentLoaded1122970153311311681416
domInteractive64321693587146
firstPaint------
backgroundConnect71273415477194
firstReactRender3019105113348
getState2710220282463
initialActions206123
loadScripts108895014609611291263
setupStore2610205252463
numNetworkReqs39281232634118
BrowserifyPower User HomeuiStartup25992121468844727273647
load1157989234819211561567
domContentLoaded1156989234719211561567
domInteractive12335524113110457
firstPaint------
backgroundConnect133311438159132369
firstReactRender5736121155997
getState289661027222385795
initialActions3033423
loadScripts1108947163114011141461
setupStore20912846217309706
numNetworkReqs101613196280244
WebpackStandard HomeuiStartup16111310248220817022042
load12771101168212213481540
domContentLoaded12761101168212313481540
domInteractive53272003277113
firstPaint------
backgroundConnect66182194067170
firstReactRender28197373038
getState2992223624114
initialActions205123
loadScripts12491080156711213231495
setupStore3291813426122
numNetworkReqs41281302838123
WebpackPower User HomeuiStartup29132290538567630004603
load14221193293931014052213
domContentLoaded14211193293831014042213
domInteractive1113248510995445
firstPaint------
backgroundConnect148291425181147471
firstReactRender60392082759111
getState28485864220370789
initialActions411021237
loadScripts13501127279226013391767
setupStore15991004199173688
numNetworkReqs100592575977242
📊 Page Load Benchmark Results

Current Commit: 83cf846 | Date: 11/26/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.03s (±52ms) 🟡 | historical mean value: 1.04s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 720ms (±49ms) 🟢 | historical mean value: 723ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 76ms (±13ms) 🟢 | historical mean value: 78ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.03s 52ms 1.01s 1.32s 1.09s 1.32s
domContentLoaded 720ms 49ms 696ms 1.00s 757ms 1.00s
firstPaint 76ms 13ms 56ms 196ms 84ms 196ms
firstContentfulPaint 76ms 13ms 56ms 196ms 84ms 196ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 58 Bytes (0%)
  • ui: 0 Bytes (0%)
  • common: 54 Bytes (0%)

Comment on lines +359 to +375
reactCompilerVerbose: {
array: false,
default: false,
description:
'Enables/disables React Compiler verbose mode and statistics',
group: toOrange('Developer assistance:'),
type: 'boolean',
},
reactCompilerDebug: {
array: false,
choices: ['all', 'critical', 'none'],
default: 'none',
description:
'Sets React Compiler panic threshold that fails the build for all errors or critical errors only. If `none`, the build will not fail.',
group: toOrange('Developer assistance:'),
type: 'string',
},
Copy link
Contributor

Choose a reason for hiding this comment

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

these should be grouped with the other "Developer assistance:" CLI commands in this object

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed size-M team-extension-platform Extension Platform team

Projects

Status: Needs dev review

Development

Successfully merging this pull request may close these issues.

React Compiler: Developer features for React Compiler Webpack loader React Compiler: Enable for Webpack builds

4 participants