@devries-cameron20 / t3code Mirror · read-only / commits / 4f651cb10d
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 22, 20:45 UTC

test(web): ChatView's React Compiler check no longer times out on slow CI runners (#22649)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

Theo Browne committed Oct 20, 2026 at 23:01 UTC 4f651cb10d2a885be82748e22a280eeef591200f
1 file changed +17 -9
apps/web/src/reactCompilerCoverage.test.ts
+17 -9
@@ -18,16 +18,24 @@ const webSourceFiles = NodeFS.readdirSync(NodePath.join(repoRoot, "apps/web/src"
18 .filter((file) => !file.endsWith(".gen.ts"))
19 .map((file) => `apps/web/src/${file}`);
20
21 +// ChatView is ~9k lines. Compiling it takes ~9s on a fast machine and passes the
22 +// 15s project timeout on loaded CI runners.
23 +const slowFiles = new Set(["apps/web/src/components/ChatView.tsx"]);
24 +
25 +const compile = async (file: string) => {
26 + const absolute = NodePath.join(repoRoot, file);
27 + const result = await transform(absolute, NodeFS.readFileSync(absolute, "utf8"), {
28 + jsx: { runtime: "automatic", development: false, refresh: false },
29 + reactCompiler: { reportDiagnostics: true },
30 + });
31 + const bailouts = result.errors.map((error) => error.codeframe ?? error.message);
32 + expect(bailouts).toEqual([]);
33 +};
34 +
35 // Lint reports most compiler bailouts, but not every one (try/finally, throw
36 // inside try). A skipped file still builds, just unmemoized, so check the output.
37 describe("React Compiler coverage", () => {
24 - it.each(webSourceFiles)("compiles %s", async (file) => {
25 - const absolute = NodePath.join(repoRoot, file);
26 - const result = await transform(absolute, NodeFS.readFileSync(absolute, "utf8"), {
27 - jsx: { runtime: "automatic", development: false, refresh: false },
28 - reactCompiler: { reportDiagnostics: true },
29 - });
30 - const bailouts = result.errors.map((error) => error.codeframe ?? error.message);
31 - expect(bailouts).toEqual([]);
32 - });
38 + it.each(webSourceFiles.filter((file) => !slowFiles.has(file)))("compiles %s", compile);
39 + // oxlint-disable-next-line t3code/no-test-timeout-or-unreasoned-skip -- CPU-bound compile of a huge file, not a hidden wait.
40 + it.each([...slowFiles])("compiles %s", compile, 60_000);
41 });