TypeScript
perf(mobile): Metro runs the React Compiler, with a coverage ratchet (#20967)
Julius Marminge9b30776b3ea5
diff --git a/apps/mobile/app.config.ts b/apps/mobile/app.config.tsindex 49777d9291a..b10b00864f2 100644--- a/apps/mobile/app.config.ts+++ b/apps/mobile/app.config.ts@@ -489,6 +489,10 @@ const config: ExpoConfig = {},},owner: "pingdotgg",+ experiments: {+ // Metro only runs babel-plugin-react-compiler when this is set; see src/reactCompilerCoverage.test.ts.+ reactCompiler: true,+ },};export default config;diff --git a/apps/mobile/package.json b/apps/mobile/package.jsonindex 10300d2e293..e0b9c0e4136 100644--- a/apps/mobile/package.json+++ b/apps/mobile/package.json@@ -140,6 +140,7 @@"uniwind": "1.12.1"},"devDependencies": {+ "@babel/core": "^7.29.7","@effect/vitest": "catalog:","@pierre/trees": "1.0.0-beta.6","@types/mdast": "^4.0.4",diff --git a/apps/mobile/src/Stack.tsx b/apps/mobile/src/Stack.tsxindex a8c13378d99..25952c73cc5 100644--- a/apps/mobile/src/Stack.tsx+++ b/apps/mobile/src/Stack.tsx@@ -669,7 +669,9 @@ function NotFoundScreen() {const RootStackConfig = createWorkspaceStackNavigator({initialRouteName: "Home",- layout: RootStackLayout,+ // React Navigation calls layouts as plain functions inside its own render. Passing a+ // compiled component directly would put its memo cache among the navigator's hooks.+ layout: (props) => <RootStackLayout {...props} />,screenOptions: {headerShown: false,},@@ -1012,7 +1014,7 @@ export const RootStack = RootStackConfig.with(function AdaptiveRootStack({ Navigreturn (<Navigator- screenLayout={GuardedScreenLayout}+ screenLayout={(props) => <GuardedScreenLayout {...props} />}screenOptions={({ route }) => {if (route.name !== "SettingsSheet" && route.name !== "NewTaskSheet") {return {};diff --git a/apps/mobile/src/features/threads/thread-list-v2-items.tsx b/apps/mobile/src/features/threads/thread-list-v2-items.tsxindex b08237b70e0..d9e88b8043f 100644--- a/apps/mobile/src/features/threads/thread-list-v2-items.tsx+++ b/apps/mobile/src/features/threads/thread-list-v2-items.tsx@@ -605,21 +605,28 @@ export const ThreadListV2Row = memo(function ThreadListV2Row(props: {const handleArchive = useCallback(() => onArchiveThread(thread), [onArchiveThread, thread]);const canUnsettle = variant === "slim";- const [snoozeGateTick, bumpSnoozeGateTick] = useState(0);+ // The React Compiler caches render results on props and state, so a clock read+ // in render would stay frozen until `thread` changes: the gate could never+ // expire and its timer would re-fire every 50ms. The gate's clock is state.+ const [snoozeGateClock, setSnoozeGateClock] = useState(() => ({ thread, now: Date.now() }));+ if (snoozeGateClock.thread !== thread) setSnoozeGateClock({ thread, now: Date.now() });+ const snoozeGateNow = new Date(snoozeGateClock.now).toISOString();const snoozeGateExpiryMs = props.snoozeSupported- ? resolveThreadListV2SnoozeGateExpiryMs(thread, { now: new Date().toISOString() })+ ? resolveThreadListV2SnoozeGateExpiryMs(thread, { now: snoozeGateNow }): null;useEffect(() => {- if (snoozeGateExpiryMs === null) return;- const delayMs = Math.min(Math.max(0, snoozeGateExpiryMs - Date.now()) + 50, 2_147_483_647);- const id = setTimeout(() => bumpSnoozeGateTick((tick) => tick + 1), delayMs);+ // A gate still closed past its expiry is held by runtime status, not time,+ // so no clock tick can open it.+ if (snoozeGateExpiryMs === null || snoozeGateExpiryMs <= snoozeGateClock.now) return;+ const delayMs = Math.min(snoozeGateExpiryMs - Date.now() + 50, 2_147_483_647);+ const id = setTimeout(() => setSnoozeGateClock({ thread, now: Date.now() }), delayMs);return () => clearTimeout(id);- }, [snoozeGateExpiryMs, snoozeGateTick]);+ }, [snoozeGateExpiryMs, snoozeGateClock.now, thread]);const swipeActions = resolveThreadListV2SwipeActions({variant,settlementSupported: props.settlementSupported,snoozeSupported: props.snoozeSupported,- snoozable: canSnooze(thread, { now: new Date().toISOString() }),+ snoozable: canSnooze(thread, { now: snoozeGateNow }),snoozed: snoozedRow,});const snoozePresets = useMemo(diff --git a/apps/mobile/src/reactCompilerCoverage.test.ts b/apps/mobile/src/reactCompilerCoverage.test.tsnew file mode 100644index 00000000000..dabc0192437--- /dev/null+++ b/apps/mobile/src/reactCompilerCoverage.test.ts@@ -0,0 +1,226 @@+// @effect-diagnostics nodeBuiltinImport:off - compiles real source files on disk.+import * as NodeFS from "node:fs";+import * as NodeModule from "node:module";+import * as NodePath from "node:path";+import { describe, expect, it } from "vite-plus/test";++const mobileRoot = NodePath.resolve(__dirname, "..");+const requireFromMobile = NodeModule.createRequire(NodePath.join(mobileRoot, "package.json"));+const babel: {+ transformFileSync: (file: string, options: Record<string, unknown>) => unknown;+} = requireFromMobile("@babel/core");+const metroConfig: Promise<{ transformer: { babelTransformerPath: string } }> =+ requireFromMobile("./metro.config.js");++// Files the compiler skips today. A skipped file still ships, just unmemoized.+// This list only shrinks: the test fails when a file here starts compiling, so+// delete its entry (and its manual useMemo/useCallback/memo) in the same change.+const KNOWN_BAILOUTS: Record<string, string> = {+ "src/components/ComposerAttachmentStrip.tsx": "unsupported syntax",+ "src/components/ComposerContextAttachment.tsx":+ "throw inside try, try without catch, try/finally",+ "src/components/ComposerEditor.tsx": "try/finally",+ "src/components/VideoPreviewModal.ios.tsx": "try without catch",+ "src/components/VideoPreviewModal.tsx": "ref read during render",+ "src/components/ui/AndroidAnchoredMenu.tsx": "ref read during render",+ "src/components/ui/Menu.tsx": "ref read during render",+ "src/components/ui/OverlayPortal.tsx": "unsupported syntax",+ "src/features/cloud/ConnectOnboardingRouteScreen.tsx": "try without catch",+ "src/features/connection/ConnectionsNewRouteScreen.tsx": "try without catch",+ "src/features/devices/DevicePreviewRouteScreen.tsx": "try without catch",+ "src/features/diffs/nativeReviewDiffSurface.ts": "ref read during render",+ "src/features/files/AttachmentFileScreen.tsx": "manual memo not preserved",+ "src/features/files/FileMarkdownPreview.tsx": "try without catch",+ "src/features/files/FileTreeBrowser.tsx": "ref read during render",+ "src/features/files/SourceFileSurface.tsx": "try without catch",+ "src/features/files/ThreadFilesRouteScreen.tsx": "manual memo not preserved",+ "src/features/files/useFileTreeEntries.ts": "manual memo not preserved",+ "src/features/home/HomeScreen.tsx": "ref read during render",+ "src/features/home/WorkspaceConnectionTitle.tsx": "ref read during render",+ "src/features/home/home-list-options.ts": "manual memo not preserved",+ "src/features/home/thread-swipe-actions.tsx": "ref read during render",+ "src/features/home/useThreadListActions.ts": "try without catch",+ "src/features/layout/AdaptiveWorkspaceLayout.tsx": "ref read during render",+ "src/features/layout/workspace-inspector-pane.tsx": "mutates a frozen value",+ "src/features/layout/workspace-pane-divider.tsx": "ref read during render",+ "src/features/projects/AddProjectScreen.tsx": "try without catch",+ "src/features/pull-requests/PullRequestDiscussionScreen.tsx": "try/finally",+ "src/features/pull-requests/PullRequestInlineCommentScreen.tsx": "try without catch",+ "src/features/pull-requests/PullRequestMergeControls.tsx": "throw inside try, try/finally",+ "src/features/pull-requests/PullRequestReviewSheet.tsx": "try/finally",+ "src/features/pull-requests/PullRequestReviewersScreen.tsx": "throw inside try, try/finally",+ "src/features/pull-requests/PullRequestRouteScreen.tsx": "manual memo not preserved",+ "src/features/pull-requests/guide/PullRequestGuideScreen.tsx": "conditional inside try",+ "src/features/pull-requests/guide/ReviewGuideExcerpt.tsx": "conditional inside try",+ "src/features/pull-requests/guide/useReviewGuide.ts": "try without catch",+ "src/features/pull-requests/usePullRequestAction.ts": "throw inside try, try/finally",+ "src/features/pull-requests/usePullRequestListActions.ts": "throw inside try, try/finally",+ "src/features/pull-requests/usePullRequestListControls.ts": "unsupported syntax",+ "src/features/pull-requests/usePullRequestThreads.ts": "throw inside try, try/finally",+ "src/features/review/ReviewSheet.tsx": "try without catch",+ "src/features/review/reviewDiffRendering.tsx": "mutates a frozen value",+ "src/features/review/useNativeReviewDiffHighlighting.ts": "conditional inside try",+ "src/features/settings/SettingsAboutRouteScreen.tsx": "try without catch",+ "src/features/settings/SettingsAuthRouteScreen.tsx": "ref read during render",+ "src/features/settings/SettingsEnvironmentDetailRouteScreen.tsx":+ "try without catch, try/finally",+ "src/features/settings/SettingsEnvironmentsRouteScreen.tsx": "try without catch",+ "src/features/settings/SettingsNotificationsRouteScreen.tsx": "try without catch",+ "src/features/settings/SettingsProjectOverviewRouteScreen.tsx": "try without catch",+ "src/features/settings/SettingsProviderAccountsRouteScreen.tsx": "conditional inside try",+ "src/features/settings/SettingsScheduledTasksRouteScreen.tsx": "unsupported syntax",+ "src/features/settings/components/SettingsDragHandle.tsx": "ref read during render",+ "src/features/terminal/ThreadTerminalRouteScreen.tsx": "ref read during render",+ "src/features/threads/NewTaskContextPickerScreens.tsx":+ "manual memo not preserved, try without catch",+ "src/features/threads/NewTaskDraftScreen.tsx": "try/finally",+ "src/features/threads/NewTaskRouteScreen.tsx": "try without catch",+ "src/features/threads/PendingUserInputCard.tsx": "mutates a frozen value",+ "src/features/threads/QuestionAttachments.tsx": "try/finally",+ "src/features/threads/ThreadArrangementSheet.tsx": "ref read during render",+ "src/features/threads/ThreadComposer.tsx": "try without catch",+ "src/features/threads/ThreadDetailScreen.tsx": "mutates a frozen value",+ "src/features/threads/ThreadFeed.tsx": "ref read during render, throw inside try, try/finally",+ "src/features/threads/ThreadGitControls.tsx": "manual memo not preserved",+ "src/features/threads/ThreadNavigationSidebar.tsx": "ref read during render",+ "src/features/threads/ThreadQueueControl.tsx": "ref read during render, try without catch",+ "src/features/threads/ThreadRouteScreen.tsx": "try without catch",+ "src/features/threads/ThreadSettingsSheet.tsx": "manual memo not preserved, try without catch",+ "src/features/threads/UsageLimitRecoveryCard.tsx": "throw inside try, try/finally",+ "src/features/threads/git/GitCommitSheet.tsx": "manual memo not preserved",+ "src/features/threads/git/GitOverviewSheet.tsx": "try without catch",+ "src/features/threads/new-task-flow-provider.tsx": "try without catch",+ "src/features/threads/thread-work-log.tsx": "manual memo not preserved",+ "src/features/threads/use-composer-command-menu.ts": "manual memo not preserved",+ "src/features/threads/use-thread-list-v2-shelf-preferences.ts": "ref read during render",+ "src/features/usage/UsageLimitsSection.tsx": "try without catch",+ "src/features/usage/UsageRouteScreen.tsx": "try without catch",+ "src/features/voice-input/VoiceInputProvider.tsx": "ref read during render",+ "src/features/voice-input/useVoiceInputController.ts": "ref read during render",+ "src/lib/attachmentDocument.ts": "try/finally",+ "src/native/StackHeader.tsx": "ref read during render",+ "src/native/T3ComposerEditor.ios.tsx": "ref read during render",+ "src/native/T3ComposerEditor.native.tsx": "ref read during render",+ "src/state/composer-attachment-uploads.ts": "try without catch",+ "src/state/mediaActions.ts": "try without catch",+ "src/state/queries.ts": "manual memo not preserved",+ "src/state/use-thread-composer-state.ts": "try without catch",+ "src/state/use-thread-selection.ts": "ref read during render",+ "src/state/use-vcs-action-state.ts": "manual memo not preserved",+};++// Caller flags Metro passes for an iOS release bundle. supportsReactCompiler is+// what `experiments.reactCompiler` in app.config.ts turns on.+const metroCaller = {+ name: "metro",+ bundler: "metro",+ platform: "ios",+ isDev: false,+ isServer: false,+ isNodeModule: false,+ supportsStaticESM: true,+ supportsReactCompiler: true,+};++const sourceFiles = NodeFS.readdirSync(NodePath.join(mobileRoot, "src"), { recursive: true })+ .map(String)+ .filter((file) => /\.tsx?$/.test(file) && !/\.(test\.tsx?|d\.ts)$/.test(file))+ .map((file) => `src/${file.split(NodePath.sep).join("/")}`)+ .sort();++type CompilerLoc = { readonly start?: { readonly line?: number } } | null;++interface CompilerEvent {+ readonly kind: string;+ readonly detail?: {+ readonly options?: {+ readonly category?: string;+ readonly reason?: string;+ readonly loc?: CompilerLoc;+ readonly details?: readonly { readonly loc?: CompilerLoc }[];+ };+ };+}++// babel.config.js is the file Metro loads; the logger rides on the preset's+// own react-compiler option so the plugin runs with Metro's exact settings.+function compilerBailouts(file: string): string[] {+ const events: CompilerEvent[] = [];+ const babelConfig = requireFromMobile("./babel.config.js")({ cache: () => {} });+ const presets = babelConfig.presets.map(([name, options]: [string, object]) =>+ name === "babel-preset-expo"+ ? [+ requireFromMobile.resolve(name),+ {+ ...options,+ "react-compiler": {+ logger: { logEvent: (_: string, event: CompilerEvent) => events.push(event) },+ },+ },+ ]+ : [name, options],+ );+ babel.transformFileSync(NodePath.join(mobileRoot, file), {+ babelrc: false,+ configFile: false,+ cwd: mobileRoot,+ presets,+ caller: metroCaller,+ code: false,+ });+ return events+ .filter((event) => event.kind === "CompileError" || event.kind === "CompileSkip")+ .map(+ (event) =>+ `line ${(event.detail?.options?.loc ?? event.detail?.options?.details?.[0]?.loc)?.start?.line ?? "?"}: ${event.detail?.options?.category ?? event.kind} ${event.detail?.options?.reason ?? ""}`,+ );+}++describe("React Compiler coverage", () => {+ it("Metro's transformer applies the compiler", async () => {+ const { transformer } = await metroConfig;+ const metroTransformer = requireFromMobile(transformer.babelTransformerPath);+ const filename = NodePath.join(+ mobileRoot,+ "src/features/archive/ArchivedThreadsRouteScreen.tsx",+ );+ const transformed = (reactCompiler: string) => {+ const { ast } = metroTransformer.transform({+ filename,+ src: NodeFS.readFileSync(filename, "utf8"),+ plugins: [],+ options: {+ dev: false,+ hot: false,+ platform: "ios",+ projectRoot: mobileRoot,+ type: "module",+ enableBabelRCLookup: false,+ experimentalImportSupport: false,+ customTransformOptions: { reactCompiler, routerRoot: "app" },+ },+ });+ return JSON.stringify(ast.program.body);+ };+ expect(transformed("true")).toContain("react/compiler-runtime");+ expect(transformed("false")).not.toContain("react/compiler-runtime");+ });++ it("app.config.ts turns the compiler on for Metro", () => {+ const appConfig = NodeFS.readFileSync(NodePath.join(mobileRoot, "app.config.ts"), "utf8");+ expect(appConfig).toMatch(/experiments:\s*\{[^}]*reactCompiler:\s*true/);+ });++ it.each(sourceFiles)("compiles %s", (file) => {+ const bailouts = compilerBailouts(file);+ if (file in KNOWN_BAILOUTS) {+ expect(bailouts, `${file} compiles now; remove it from KNOWN_BAILOUTS`).not.toEqual([]);+ } else {+ expect(bailouts).toEqual([]);+ }+ });++ it("lists only files that exist", () => {+ expect(Object.keys(KNOWN_BAILOUTS).filter((file) => !sourceFiles.includes(file))).toEqual([]);+ });+}, 300_000);diff --git a/docs/internals/mobile-development.md b/docs/internals/mobile-development.mdindex d1d375584bb..19ff413166a 100644--- a/docs/internals/mobile-development.md+++ b/docs/internals/mobile-development.md@@ -34,3 +34,17 @@ copies those into its virtual store instead of linking them. Metro bundles the cso an edit to a module's TypeScript is invisible to a running dev client until`vp i` re-syncs it, while Gradle and CocoaPods compile the worktree directorydirectly. A JavaScript change that "has no effect" on device is usually this.++## React Compiler++Metro runs the compiler only because `experiments.reactCompiler` is set in `app.config.ts`. Expo+then passes `supportsReactCompiler` to `babel-preset-expo`, which owns the plugin options; there is+no `babel.config.js` entry to look for. Release bundles use `panicThreshold: "NONE"`, so a function+the compiler can't prove safe ships unmemoized with no build error.+[`reactCompilerCoverage.test.ts`](../../apps/mobile/src/reactCompilerCoverage.test.ts) runs the+same preset over every source file. It fails on a new bailout, and on a file in `KNOWN_BAILOUTS`+that now compiles, so the list only shrinks. When you fix a listed file, delete its entry and its+manual `useMemo`/`useCallback`/`memo` in the same change. Most mobile bailouts are `try` without+`catch` or with `finally`, and refs read during render; see [Web UI](web-ui.md#react-compiler)+for the usual rewrites. Mobile runs `t3code/no-manual-memo` with `allowMemoHooks`, so memo+directives are errors but the hooks stay legal until `KNOWN_BAILOUTS` is empty.diff --git a/oxlint-plugin-t3code/rules/no-manual-memo.test.ts b/oxlint-plugin-t3code/rules/no-manual-memo.test.tsindex cd6d26dba1b..1b3709eb06a 100644--- a/oxlint-plugin-t3code/rules/no-manual-memo.test.ts+++ b/oxlint-plugin-t3code/rules/no-manual-memo.test.ts@@ -28,4 +28,26 @@ describe("t3code/no-manual-memo", () => {"reports React.useMemo",`const total = React.useMemo(() => items.length, [items]);`,);++ rule.invalid('reports "use no memo"', `function Panel() { "use no memo"; return null; }`);++ rule.invalid('reports a module-level "use no forget"', `"use no forget";\nexport const a = 1;`);++ rule.valid("allows the same text as a string value", `const label = "use no memo";`);+});++const ratchet = createOxlintRuleHarness("t3code/no-manual-memo", {+ filename: "fixture.tsx",+ ruleOptions: [{ allowMemoHooks: true }],+});++describe("t3code/no-manual-memo with allowMemoHooks", () => {+ ratchet.valid("allows useMemo", `const total = useMemo(() => items.length, [items]);`);++ ratchet.valid("allows useCallback", `const onClick = useCallback(() => save(), []);`);++ ratchet.invalid(+ 'still reports "use no memo"',+ `function Panel() { "use no memo"; return null; }`,+ );});diff --git a/oxlint-plugin-t3code/rules/no-manual-memo.ts b/oxlint-plugin-t3code/rules/no-manual-memo.tsindex fd8e61b653c..b66dfddc319 100644--- a/oxlint-plugin-t3code/rules/no-manual-memo.ts+++ b/oxlint-plugin-t3code/rules/no-manual-memo.ts@@ -1,6 +1,19 @@import { defineRule, type ESTree } from "@oxlint/plugins";const MANUAL_MEMO_HOOKS = new Set(["useCallback", "useMemo"]);+// "use no memo" and "use no forget" skip a component the compiler would bail on,+// which hides the bailout from the coverage checks as much as "use memo" does.+const MEMO_DIRECTIVES = new Set(["use memo", "use no memo", "use no forget"]);++const readAllowMemoHooks = (options: ReadonlyArray<unknown>): boolean => {+ const [first] = options;+ return (+ typeof first === "object" &&+ first !== null &&+ "allowMemoHooks" in first &&+ first.allowMemoHooks === true+ );+};function manualMemoHookName(callee: ESTree.Node): string | null {if (callee.type === "Identifier") {@@ -24,22 +37,40 @@ export default defineRule({type: "suggestion",docs: {description:- 'Disallow useCallback, useMemo and "use memo" directives in files the React Compiler must compile; it memoizes them.',+ "Disallow useCallback, useMemo and memo directives in files the React Compiler must compile; it memoizes them.",},+ schema: [+ {+ type: "object",+ properties: {+ allowMemoHooks: {+ type: "boolean",+ description:+ "Still permit useMemo and useCallback while a codebase ratchets toward full compiler coverage; directives stay banned.",+ },+ },+ additionalProperties: false,+ },+ ],+ defaultOptions: [{ allowMemoHooks: false }],},create(context) {+ const allowMemoHooks = readAllowMemoHooks(context.options);return {// A "use memo" helper only exists to force a cache scope the compiler withheld,// which hides the ordering or structure problem that withheld it.ExpressionStatement(node) {- if (node.directive !== "use memo") return;+ if (typeof node.directive !== "string" || !MEMO_DIRECTIVES.has(node.directive)) return;context.report({node,message:- 'Drop "use memo": restructure so the compiler caches this on its own, e.g. move plain uses of a value before the hook call that splits its scope, or inline the helper.',+ node.directive === "use memo"+ ? 'Drop "use memo": restructure so the compiler caches this on its own, e.g. move plain uses of a value before the hook call that splits its scope, or inline the helper.'+ : `Drop "${node.directive}": fix the code the compiler cannot prove safe instead of skipping it.`,});},CallExpression(node) {+ if (allowMemoHooks) return;const name = manualMemoHookName(node.callee);if (name === null) return;context.report({diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 8c6cd98d70c..34d87fc0785 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -585,6 +585,9 @@ importers:specifier: 1.12.1version: 1.12.1(@expo/[email protected](patch_hash=90fa980e8b6480631fb2fbb04559834e3c612db40c550cd828f11be297d8d760)([email protected])([email protected])([email protected])([email protected]))([email protected])([email protected]([email protected])([email protected]))([email protected]([email protected])([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected])([email protected])([email protected]))(@types/[email protected])([email protected])([email protected])([email protected]))([email protected])([email protected])devDependencies:+ '@babel/core':+ specifier: ^7.29.7+ version: 7.29.7'@effect/vitest':specifier: 4.0.5version: 4.0.5(patch_hash=2731c9c3761c595f25ddc625a7d61ca376b389d5b3049ecb837c8940f21cfa02)(@types/[email protected])(@vitest/[email protected])(@vitest/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))([email protected])([email protected])([email protected])([email protected])([email protected])@@ -2289,11 +2292,6 @@ packages:resolution: {integrity: sha512-1k2lAGRMfHTcwuNYcCNUmaUffmQv8KWMfh2iJUUeRlwlwH4FdNG7mfPI10NPfLHJFThE4Tyr4mv7kTNZOiPuBg==}engines: {node: '>=6.9.0'}- '@babel/[email protected]':- resolution: {integrity: sha512-hnORnjP/1P/zFEndoeX+n+t1RwWRJiJpM/jO7FW32Kn9r5+sJB2JWOdYo4L6k78j15eCwY3Gm/7364B1EMwtNg==}- engines: {node: '>=6.0.0'}- hasBin: true-'@babel/[email protected]':resolution: {integrity: sha512-E8lTAYNB1KW+FH+VGJuZM1ioAx2E6oVlvQFRrf5P8ZZmsiJXYAD9vTFV7yyEURNzgh1dFqMZuO6tUwcARbqFCA==}engines: {node: '>=6.0.0'}@@ -13321,10 +13319,6 @@ snapshots:'@babel/template': 7.29.7'@babel/types': 7.29.8- '@babel/[email protected]':- dependencies:- '@babel/types': 7.29.8-'@babel/[email protected]':dependencies:'@babel/types': 7.29.8@@ -16974,7 +16968,7 @@ snapshots:dependencies:'@babel/core': 7.29.7'@babel/generator': 7.29.7- '@babel/parser': 7.29.7+ '@babel/parser': 7.29.8'@babel/types': 7.29.8ansis: 4.3.1babel-dead-code-elimination: 1.0.12diff --git a/vite.config.ts b/vite.config.tsindex 25d75f3edd3..812e5d504fc 100644--- a/vite.config.ts+++ b/vite.config.ts@@ -361,6 +361,13 @@ export default defineConfig({excludeFiles: ["**/*.test.ts", "**/*.test.tsx"],rules: { "t3code/no-hermes-unsupported-apis": "error" },},+ {+ // Mobile is ratcheting toward full React Compiler coverage+ // (apps/mobile/src/reactCompilerCoverage.test.ts). Directives would hide bailouts from it;+ // the manual memo hooks go once the allowlist there is empty.+ files: ["apps/mobile/src/**/*.{ts,tsx}"],+ rules: { "t3code/no-manual-memo": ["error", { allowMemoHooks: true }] },+ },{files: ["apps/mobile/src/features/archive/ArchivedThreadsScreen.tsx",