Repository navigation
fix(terminals): terminal IDs, agent rows and dashboard rows follow the owner - #27243
Conversation
…e owner Copy Terminal ID on a paired-server pane copies the owning server's handle instead of asking this desktop's runtime, which has no record of that pane. Sidebar agent rows and dashboard reveals tell the workspace's owning server which tab was opened, as a tab-strip click does. A paired-server dashboard card with no preview says the session is remote instead of claiming its pane closed.
…later navigation The row and dashboard reveal now send the exact split pane to the owner and record it in the focus intent, guarded by the tab visible at the click, so a later navigation away is never overridden when the tab arrives.
|
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 actionable issue remains from the reviewed changes. Real paired-server click-to-focus behavior still needs the planned manual confirmation. Pre-merge checks |
|
ELI5
When Orca is connected to another Orca server, some terminals and agents live on that server. Three buttons still asked this computer about them, and this computer does not know them. Now they ask, or tell, the server that actually owns them.
What Changed
orcaCLI accepts. Mechanism: such a pane is already bound to an ID of the formremote:<server>@@<handle>, and that handle is the server's terminal ID. The copy now reads it from the pane's binding. Before, it asked this desktop's runtime, which has no record of a server-owned pane. Local and SSH panes keep asking this desktop's runtime, which does own them.terminalPreview.*, D4-V2c).Why
The bug in all three is that the action asked or told the wrong machine. Copying the handle from the pane's existing binding needs no network call and works while the server is briefly unreachable. Re-resolving through the server was the alternative, and it adds a failure mode for no gain, because the binding is kept current whenever the server reissues the handle. For row clicks, the tab strip, command palette and tab number shortcuts already send
session.tabs.activateto the owner. Rows now share one small helper for that instead of each growing their own path. The preview message follows the SSH rule indocs/reference/ssh-execution-boundary.md: if this client cannot see a pane, that proves nothing about the pane's state (unverifiable), and it is never evidence the pane exited.Linked Issue
Fixes #11664
Fixes #15553
Fixes #25688
Refs #12739, #22196: the tests show that a row click now reaches the owning server with the right tab. The full click-to-focus behaviour on a real paired server still needs to be confirmed in the multi-host fixture before these close.
Visual Proof
N/A. This changes clipboard contents, a server request and a one-line message. These are covered by unit tests. On this machine, launching Electron is not allowed for agents.
Testing
Each acceptance test was written first and run against
origin/mainsource, where it fails. With this change they all pass:terminal-handle-copy.test.ts: a paired-server pane copiesterm_on_serverand never calls this desktop's runtime. An unreadableremote:id is refused.terminal-preview-unavailable-message.test.ts:hostKind: 'remote'andremote:pty ids get the remote message.WorktreeCardAgents.activation.test.tsx: hydrated and not-yet-hydrated live rows notify the owner.reveal-dashboard-agent.test.ts: a dashboard reveal notifies the owner, and a failed reveal touches nothing.terminal-tab-owner-activation.test.ts: the owner comes from the workspace, the pane and visible-tab guard are passed on, and local workspaces make no call.web-runtime-session-tab-activate-close.test.ts:session.tabs.activatecarries the picked pane, and the focus intent records both the pane and the guard.pnpm tc:web, focusedpnpm test(57 files around the changed code),oxlint,pnpm run check:code-quality:changed, owner-routing and max-lines ratchets all pass.I manually tested these changes locally
Automated tests added/updated, or explained why not below
Review
Self-review plus an independent read-only review (P0/P1 only).
Agent skill upstream boundary
Notes
session.tabs.activatealready exists and is what tab clicks send. Old servers handle it the same way.getRuntimeEnvironmentIdForWorktree, which already covers the folder arm.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)