Skip to content

feat: Extends performance domain with React Compiler error triage - #145

Draft
MajorLift wants to merge 1 commit into
MetaMask:mainfrom
MajorLift:add/react-compiler-triage
Draft

feat: Extends performance domain with React Compiler error triage#145
MajorLift wants to merge 1 commit into
MetaMask:mainfrom
MajorLift:add/react-compiler-triage

Conversation

@MajorLift

@MajorLift MajorLift commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Motivation

React Compiler adoption fails in a way the compiler itself reports badly. It emits a large undifferentiated error list, most of which is Todo and unsupported-syntax noise the author cannot act on, and a minority that is a real bug in the component. Without a way to sort the two, the usual outcome is that the whole list is treated as noise and the compiler stays off.

There is a second failure with no error attached at all. The compiler's memoization does not preserve the identity a useEffect dependency needs, so removing a useMemo the compiler appears to make redundant can silently change effect firing, in this component or in a consumer.

Overview

Adds mm-react-compiler-error-triage to the mobile performance skill, and the effect-dependency exception to mm-react-compiler.

  • Sorting compiler errors into Todo / unsupported versus actionable.
  • Ratcheting panicThreshold rather than setting it once.
  • Keeping any useMemo or useCallback whose output is a useEffect dependency.

The render-antipattern scans are in #43. Neither of them cites this material. Compiler adoption is a different question from whether a selector returns a fresh reference.

Showcase

No trial run yet. Nothing here speaks to how the triage performs against a real error list.

`mm-react-compiler-error-triage` — sorting compiler errors into `Todo`
and unsupported versus actionable, ratcheting `panicThreshold`, and the
`useMemo`/`useCallback` exception for effect dependencies, whose output the
compiler's memoization does not preserve.

Split out of MetaMask#43: compiler adoption is a different subject from the render
antipattern scans, and nothing in either scan cites it.
MajorLift added a commit to MajorLift/metamask-skills that referenced this pull request Sep 1, 2026
Compiler adoption is a different subject from the render antipattern scans,
and neither scan cites it. The three inbound links go with it, so nothing
here points at a file this branch no longer carries.

Also removes five `MetaMask-planning` epic and audit-ticket ids from four
files. They are a private repo's numbers and this repo is public; none of
them is on `main`, so this branch introduced all five. Provenance now reads
"the extension performance audit". The public `metamask-extension` PR
references are kept.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant