# fix\(preview\): report navigation timeout accurately · PR \#24356 · pingdotgg/t3code

[View on GitCafe](https://git.cafe/pingdotgg/t3code/pull/24356)

Repository: [pingdotgg/t3code](https://git.cafe/pingdotgg/t3code)

Visibility: public

State: merged

Source repository: Unavailable fork

Source branch: fix/preview-timeout-diagnostic

Target branch: main

Head commit: 29ae8e2f73c470653a3786934148fcab60125965

[Discussion and reviews](https://git.cafe/pingdotgg/t3code/pull/24356)

[Commits](https://git.cafe/pingdotgg/t3code/pull/24356/commits?format=markdown)

[Files changed](https://git.cafe/pingdotgg/t3code/pull/24356/diffs?format=markdown)

## Description

---

## Problem

`preview_open` reported “timed out after 660000ms” when Playwright stopped initial navigation after 15000ms. On Linux, opening a page with a controlled 20-second HTTP response delay reproduced the misleading message in 21.780 seconds on current main.

## Change

Carry the timeout used by server-browser navigation in the existing operation-error detail. The broker reports a positive integer host timeout capped at its own request budget, and falls back to the request budget when no valid host value is available. Navigation waits and budgets stay unchanged.

## Scope and approval

Fixes https://github.com/pingdotgg/t3code/issues/24278

GitCafe: https://git.cafe/pingdotgg/t3code/issues/24278

Triaged bug via the automated issue flow. This reuses the existing focused diagnostic fix; no duplicate PR was created. The current title and all issue comments were checked, with no maintainer comment in the preceding 24 hours. No new setting, capability, or persisted state is introduced.

## Verification

- Red on main [27e0c68](https://github.com/pingdotgg/t3code/commit/27e0c684c585f955252d65f06206dd11a143bff5): `preview_open reports its navigation timeout instead of the request budget` fails with expected `timeoutMs: 15000`, actual `timeoutMs: 660000`.
- Green: `vp test run src/preview/ServerBrowser.test.ts src/mcp/PreviewAutomationBroker.test.ts` from `apps/server`: 52 tests passed across two files. Scoped lint and server `tsc --noEmit` passed; only existing Effect suggestions were printed.
- Independent gpt-6.1-sol and claude-opus-5-5 reviewers found no blocking findings. Proof audit passed.
- The four changed files tested locally are byte-identical to PR head [f722b70](https://github.com/pingdotgg/t3code/commit/f722b703439e002d251cbc831c772a34eebf66fb), which already includes current main.

| Runtime | Before | After |
| --- | --- | --- |
| Linux x64, isolated worktree dev server, real server-browser Chromium; fresh tab opening the same controlled 20-second HTTP response | `timed out after 660000ms`, elapsed 21.780s | `timed out after 15000ms`, elapsed 15.702s |

Both server traces retain `page.goto: Timeout 15000ms exceeded.` The delay reproduces the navigation timeout mechanism; a cold Vite dependency-optimization run was not separately tested. Two after attempts interrupted by dev-server reloads returned HTTP 503 and were discarded; the stable attempt above supplies the proof.

[Before runtime transcript](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/83a60b29a25b0c6f/before-runtime.txt) · [After runtime transcript and attempt log](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/e38fb65dc947a2ac/after-runtime.txt) · [Reproduction driver](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/5b11d88c60056f25/slow-server.py) · [Evidence index](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/3bda6b2c06c9d9b1/evidence-index.md) · [Proof matrix](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/dbbb78d82a604b58/issue24278-proof-audit-pass1.md)

Server-only diagnostic change: no changed render paths; capture matrix is empty. Web and desktop consume the same MCP diagnostic. No client UI, provider adapter, or wire schema changes. Separate macOS, Windows, and mobile runs were not needed for the Linux server timeout diagnostic. Repro drivers and evidence are uploaded, not committed.

Original implementation: Codex harness, routed model `group/deepseek-v4.1-flash`, reasoning `max`. Automated verification: gpt-6.1-sol through Codex and claude-opus-5-5 through T3 Code delegation.

