Skip to content

fix(dev): recover preview hosts and finish single-origin support - #641

Merged
ronak-guliani merged 3 commits into
mainfrom
fix/preview-recovery-single-origin
Oct 3, 2026
Merged

ronak-guliani merged 3 commits into
mainfrom
fix/preview-recovery-single-origin

Conversation

@ronak-guliani

@ronak-guliani ronak-guliani commented Oct 2, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Port upstream #12535: on preview request timeout, evict the host, clear queued commands, and complete its stream. Serialize queue offering with generation eviction. The real web preview-host transport waits one second after normal stream completion before registering again; transport failures keep their existing reconnect path, and timed-out browser actions are never replayed.
  • Timeout eviction intentionally retires the whole host generation. Other in-flight calls on that generation fail early rather than being replayed, because their dispatch/completion state may be ambiguous. Their PreviewAutomationClientDisconnectedError now explains that the host generation was evicted; the regression test uses a 1s timed-out request and a buffered sibling with a 10s budget.
  • Finish browser single-origin dev: omit baked backend URLs in dev/dev:web, proxy backend routes including /ws (and websocket /api), keep proxy and backend fallback routes in sync, and avoid pinning browser HMR to localhost. Desktop and server-only modes keep their direct backend URLs.

Validation

  • Focused suites: 138 tests pass, including the production preview-host transport completion-delay test and the buffered sibling-request eviction assertion.
  • pnpm fmt:check, pnpm lint, and pnpm typecheck pass.
  • Browser smoke of single-origin support on commit 0c05121835: local app loaded; transformed primary-target module has empty VITE_HTTP_URL/VITE_WS_URL; /.well-known/t3/environment returns backend JSON through Vite; /ws returns the backend's expected unauthenticated JSON 401 through Vite, matching direct-backend behavior. Browser console had no errors. No tailnet/LAN run was performed.
  • Full pnpm test remains non-green in this environment: parallel run hit worker exit 137/timeouts; a serial run passed 2,078 tests but two unchanged web suites (ChatSplitArea.test.tsx, ChatView.test.ts) fail importing @pierre/diffs/worker/worker.js?worker because self is not defined.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L labels Oct 2, 2026
@ronak-guliani
ronak-guliani merged commit b39c642 into main Oct 3, 2026
5 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant