Conversation
`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 #43: compiler adoption is a different subject from the render antipattern scans, and nothing in either scan cites it.
`babel-plugin-react-compiler` 1.0.0 logs `CompileSuccess` for every function in a file whose top-level directive then discards the transform. Only a directive inside one function's body logs `CompileSkip`. The compiled count therefore rises with opt-outs and is read against the opt-out count.
…s it metamask-mobile#31171 (enable the React Compiler across the Metro bundle) replaced the two-path allowlist. The plugin now applies to every file except under Jest, with no `target` override, so its default of React 19 applies. The triage reference also named two internal planning tickets.
…ng it Removing the directive and re-running the compiler settles it: zero new errors means the directive was masking nothing.
MajorLift
marked this pull request as ready for review
September 15, 2026 20:02
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
The React Compiler fails open: a component it cannot compile ships unoptimized with a green build and no warning, and raising
panicThresholdto'all_errors'to find those components returns an error list that mixes unsupported-syntax noise with real bugs. Its memoization is also not guaranteed to preserve the identity auseEffectdependency needs, so removing auseMemothe compiler seems to make redundant can silently change when an effect fires.Overview
Extends the mobile
performanceskill with a React Compiler error-triage reference and an effect-dependency exception.references/mm-react-compiler-error-triage.mdtells the agent to sort compiler errors into unsupported (the compiler'sTodocategory) and actionable errors, and to ratchetpanicThresholdin non-production builds rather than set it once.references/mm-react-compiler.mdnow describes the compiler as running app-wide on its defaulttarget: '19', as set up in metamask-mobile#31171 (fully enable React Compiler), in place of the path allowlist and thetarget: '18'rule, and tells the agent to keep anyuseMemooruseCallbackwhose output is auseEffectdependency.