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 21, 22:15 UTC
fix(server): prevent HTML preview navigation timeouts (#34403)
Matthew Kulina committed
Nov 11, 2026 at 18:25 UTC
eb964beccceae25113e0f954613bbcd2e43f7131
2 files changed
+9
-1
apps/server/src/htmlRender/HtmlRender.test.ts
+1
@@ -453,6 +453,7 @@ process.on("SIGTERM", () => {});
453
const quit = () => { fs.writeFileSync(${JSON.stringify(exitRecord)}, "asked to close"); process.exit(0); };
454
const reply = (message) => fs.writeSync(4, JSON.stringify(message) + "\\0");
455
const results = {
456
+ "Target.createBrowserContext": { browserContextId: "context" },
457
"Target.createTarget": { targetId: "page" },
458
"Target.attachToTarget": { sessionId: "session" },
459
"Runtime.evaluate": { result: { value: 100 } },
apps/server/src/htmlRender/headlessChrome.ts
+8
-1
@@ -418,10 +418,17 @@ const launchBrowser = Effect.fnUntraced(function* (input: {
418
);
419
});
420
421
+ // Chrome's default context can stall Fetch interception during navigation.
422
+ const { browserContextId } = yield* send(
423
+ "Target.createBrowserContext",
424
+ {},
425
+ Schema.Struct({ browserContextId: Schema.String }),
426
+ );
427
+
428
const openPage = Effect.fnUntraced(function* (width: number, appearance: ThemeAppearance) {
429
const { targetId } = yield* send(
430
"Target.createTarget",
424
- { url: "about:blank" },
431
+ { url: "about:blank", browserContextId },
432
Schema.Struct({ targetId: Schema.String }),
433
);
434
const { sessionId } = yield* send(