From 34ed12447814d6b4a35fcae0d39bfd7db886aaa9 Mon Sep 17 00:00:00 2001 From: Michael Suchacz <203725896+ibetitsmike@users.noreply.github.com> Date: Sun, 19 Jul 2026 07:29:53 +0200 Subject: [PATCH] fix(site): align React Compiler check scope with vite.config.mts (#27216) ## Stack Context First PR of a 6-PR stack that thins the agent instruction corpus (~4,800 lines down to ~2,800) by removing startup bloat, assigning each procedure one canonical owner, and fixing rules that drifted from reality. Split from #27203 for reviewability. ## Why? `site/vite.config.mts` compiles `src/pages/AIBridgePage/` with the React Compiler, but `site/scripts/check-compiler.mjs` did not include that directory. Compiler regressions in AIBridgePage were invisible to CI: code could silently bail out of compilation with no signal. The two lists had already drifted once, which is exactly how this class of bug recurs. ## What? - Add `src/pages/AIBridgePage/` to the check-compiler scope. Verified all 381 functions in scope compile cleanly. - Cross-reference the two lists with comments so the next person who edits one finds the other. This is the only behavioral (non-docs) change in the stack, which is why it sits at the bottom. > This PR was prepared by Mux (AI agent) on Mike's behalf. --- site/scripts/check-compiler.mjs | 5 +++-- site/vite.config.mts | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/site/scripts/check-compiler.mjs b/site/scripts/check-compiler.mjs index 2ea58a8e8c..e28c1f9496 100644 --- a/site/scripts/check-compiler.mjs +++ b/site/scripts/check-compiler.mjs @@ -16,10 +16,11 @@ import { transformSync } from "@babel/core"; // Resolve the site/ directory (ESM equivalent of __dirname + ".."). const siteDir = new URL("..", import.meta.url).pathname; -// Only AgentsPage is currently opted in to React Compiler. Add new -// directories here as more pages are migrated. +// Directories opted in to React Compiler. Keep this list in sync with +// the include filter in vite.config.mts. const targetDirs = [ "src/pages/AgentsPage", + "src/pages/AIBridgePage", ]; const skipPatterns = [".test.", ".stories.", ".jest."]; diff --git a/site/vite.config.mts b/site/vite.config.mts index 22722659b3..d739b4b6d7 100644 --- a/site/vite.config.mts +++ b/site/vite.config.mts @@ -17,6 +17,7 @@ const compilerPreset = reactCompilerPreset(); compilerPreset.rolldown.filter = { ...compilerPreset.rolldown.filter, id: { + // Keep in sync with targetDirs in scripts/check-compiler.mjs. include: [/src\/pages\/AgentsPage\//, /src\/pages\/AIBridgePage\//], }, };