Repository navigation
fix(web): the paired server is the web client's only host - #27266
Conversation
A paired web client is a browser tab with no PTYs, files, browser or second window of its own, yet owners it read as "local" still routed to it: setup terminals and server-local rows hit the local PTY stub, the dashboard pop-out was a silent no-op, Open in Orca Browser threw an uncaught error, and the macOS traffic-light inset was reserved. Route a transport-less owner through the paired server at the shared owner resolvers, open the in-window dashboard, refuse document previews with a reason, and reserve no traffic-light inset in the web client. Co-Authored-By: Claude <[email protected]>
Co-Authored-By: Claude <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to No identified issue currently blocks merging. Pre-merge checks |
|
ELI5
The web client is Orca running in a browser tab, connected to one paired Orca server. A browser tab has no terminals, files, browser window or macOS window buttons of its own: everything lives on that server. Several places still treated the browser tab as if it were a computer that could run things, so they quietly did nothing or failed. Now the web client treats its paired server as its only host.
What Changed
Before and after, in the web client:
local, Orca read that as "this browser" and failed with "Local PTYs are unavailable in the web client" or "Couldn't determine which host owns this workspace". After: they start on the paired server.Mechanism:
paired-web-client-host.ts(new): in a paired web client with exactly one saved server, an owner route that has no server (local, or an SSH target with no server named) is sent through that server.localbecomesruntime:<server>; an SSH target keeps its name and gains the server as transport. The never-routable sentinel host stays refused.resolveWorktreeOperationRouteResultand the selected-host route (worktree-operation-route.ts),getRuntimeEnvironmentIdForWorktree, the folder-workspace owner, and the single-server fallback used by setup terminals. An id that two hosts publish is still refused, not guessed.agent-dashboard-open-mode.ts(new) gives the effective open mode; the sidebar entry, the shortcut, the board's settings menu and the Experimental setting read it.doc-preview-web-client.ts(new) refuses the document preview plan in the web client;canShowWorkspaceFileBrowserActionalready hides an action whose plan is refused.app-window-chrome.tsexportshasMacTrafficLights(macOS and not the web client); the titlebar pad and--mac-traffic-lights-widthuse it.Why
The design for this slice is "the paired server is the web client's only host". Rows the server sends are already stamped with the server as owner, so most workspaces already worked. What remained were the paths that fell back to
local: a restored active-workspace selection, rows that predate stamping, folder workspaces and setup terminals. Fixing it once in the shared resolvers covers every caller (terminals, file explorer, paste and drop, background launches) instead of patching each symptom.Alternatives considered:
local.Desktop behavior is unchanged: every new branch is gated on the web client flag.
Linked Issue
Fixes #9047
Fixes #22618
Fixes #19299
Also completes the pop-out half of #22218 (already closed; its preview half landed in #27250).
Visual Proof
N/A for screenshots from this machine (no local Electron or web runs are allowed here). The titlebar change removes an 80px empty pad at the top-left of the web client on macOS browsers; the dashboard change replaces a dead click with the in-window board; the file action is no longer offered in the web client. Each is covered by a test below.
Testing
New tests, each failing on
origin/main(7 failures) and passing here:paired-web-client-host.test.ts: in a web client, a workspace whose selection or row sayslocal, a setup terminal, and a local folder workspace all route to the paired server; an SSH target keeps its place with the server as transport; an id two hosts publish is still refused; a desktop window still routeslocalto this computer.agent-dashboard-open-mode.test.ts: pop-out on desktop, in-window board in the web client.app-window-chrome.test.ts: the inset is reserved on macOS desktop and not in a web client on a Mac browser.file-preview.test.ts: in the web client the action is hidden, opening returns a reason, and the address-bar conversion shows a toast instead of throwing.Also ran: all renderer tests that touch the web client flag or the dashboard (53 files),
src/renderer/src/lib,right-sidebar,terminal-paneandwebsuites;pnpm tc; oxlint;pnpm run check:code-quality:changed; owner-routing ratchet (unchanged at 223).Review
Agent skill upstream boundary
Notes
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)