fix: load workspaces through remote HTTP proxies - #866
Conversation
roborev: Combined Review (
|
roborev: Combined Review (
|
The workspace refresh owner used crypto.randomUUID(), which browsers expose only in secure contexts. Plain-HTTP reverse proxies therefore crashed the sidebar before it could load any workspaces.\n\nUse Svelte's component-scoped identity so refresh ownership remains unique without depending on a secure-origin browser API.\n\nValidation: full frontend unit suite (3,873 passed, 2 skipped); focused sidebar suite (57 passed); frontend format, lint, kit-ui, Svelte, and Effect checks. Generated with Codex (gpt-5.6-sol) Co-authored-by: Codex <198982749+openai-codex@users.noreply.github.com>
Same-port reverse proxies already forward WebSocket upgrades, but the generated Vite client was told to dial the backend loopback address. For remote browsers, that address points at the browser machine instead of the development host. Let Vite infer protocol, host, and port from the page origin by default. Explicit environment overrides remain available for asymmetric proxy setups. Validation: focused Vite config suite (11 passed); isolated generated-client inspection; full frontend unit suite with two workers under host pressure (3,873 passed, 2 skipped); frontend format, lint, kit-ui, Svelte, and Effect checks. Generated with Codex (gpt-5.6-sol) Co-authored-by: Codex <198982749+openai-codex@users.noreply.github.com>
The component regression runs under jsdom, which cannot prove the shipped browser app survives a genuinely insecure HTTP origin. Loopback is also treated as trustworthy, so the existing full-stack server URL would not reproduce the failure. Exercise the embedded SPA and real workspace API through a test-owned non-loopback reverse proxy. The browser preconditions and SQLite-backed workspace row now protect the remote HTTP workflow in both Chromium and Firefox. Validation: mutation check against the old randomUUID call; full workspace-sidebar Playwright spec (26 passed, 6 skipped); full frontend unit suite (3,873 passed, 2 skipped); frontend format, lint, kit-ui, Svelte, and Effect checks. Generated with Codex (gpt-5.6-sol) Co-authored-by: Codex <198982749+openai-codex@users.noreply.github.com>
The insecure-origin regression needs a non-loopback address to reproduce browser security behavior. Running that listener during ordinary local E2E runs can expose the full-stack fixture to nearby network peers.\n\nRequire the isolated Docker E2E job to opt in. CI keeps the end-to-end proof without opening the listener on developer hosts. Generated with Codex (gpt-5.6-sol) Co-authored-by: Codex <198982749+openai-codex@users.noreply.github.com>
A Vite configuration test carried a developer-specific Tailnet hostname into the public pull request. Test fixtures must not preserve local machine or network identity.\n\nUse reserved example domains while retaining the same allowed-host and HMR override coverage. Generated with Codex (gpt-5.6-sol) Co-authored-by: Codex <198982749+openai-codex@users.noreply.github.com>
e04ded9 to
538c870
Compare
Opening kenn-forge through a plain-HTTP reverse proxy could leave the Workspaces view blank. The sidebar required a browser API that is unavailable on insecure origins. Vite also told remote browsers to connect hot module replacement to their own loopback address.
Use Svelte's component identity for workspace refresh ownership, and let Vite derive its development WebSocket endpoint from the page origin. Explicit HMR overrides remain available for proxies that expose a different host, protocol, or port. The full-stack insecure-origin regression opts in only inside the isolated Docker E2E job, so ordinary local runs never bind its non-loopback proxy.
Validation
generated by a clanker