Repository navigation
feat(ssh): open a plain SSH terminal to a host whose move to its Orca server is blocked - #31716
Conversation
… server is blocked A refused or unserved host fails the whole connect, so the user had no way to reach their work there. The blocked-move banner and the SSH host row now offer an unmanaged, unpersisted ssh login in a non-modal window. Main builds the argv from the saved target (no -T, BatchMode or Orca multiplexing; the config alias stays bare so ssh_config applies) and spawns ssh with an argv array through the local PTY spawn primitive. Co-Authored-By: Claude <[email protected]>
…re the preview terminal's keys Co-Authored-By: Claude <[email protected]>
…ags and spawn-helper repair Co-Authored-By: Claude <[email protected]>
… plain SSH Extracts the preview's xterm setup (Unicode widths, links, IME bridge, kitty flags, copy/paste and shortcut policy, user-input routing) into openStandaloneTerminal, so the plain SSH terminal reuses it instead of a second copy. Plain SSH output is now acked once rendered, and main pauses ssh while too much is unrendered. Co-Authored-By: Claude <[email protected]>
…ends a paused pty on Windows Co-Authored-By: Claude <[email protected]>
… minimized Co-Authored-By: Claude <[email protected]>
…main Co-Authored-By: Claude <[email protected]>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 3 minutes. View limit details
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to
|
…hich Tooltip needs Co-Authored-By: Claude <[email protected]>
ELI5
When Orca can't finish setting itself up on an SSH host, connecting to that host fails, and every Orca terminal on it stops working. Your files on the host are untouched, but until now Orca gave you no way to reach them. This adds an Open plain SSH terminal button for exactly that case. It opens an ordinary
sshlogin in a small window that you can move, minimize or close, so you can keep working on the host while the setup problem is sorted out.What Changed
Before: a host whose move to its Orca server was blocked (a refusal, an unsupported host, a failed setup) failed the whole connect. The terminal pane showed "SSH connection required" with only Retry, and Settings showed only the reason. A user with work on the host had no way in from Orca (reported in Slack for a host called "lambda").
After: while the move is blocked, the banner in the terminal pane and the host's row in Settings > SSH Hosts both offer Open plain SSH terminal.
Mechanism:
src/main/ssh/plain-ssh-terminal/,src/main/ipc/ssh/plain-ssh-terminal-handlers.ts):plainSsh:opentakes only a saved target id.write,resize,closeandacktake a session id and are checked against the window that opened it.dataandexitevents go only to that window.system-ssh-args.ts, nowappendSshTargetDestinationArgs. There is no-T, BatchMode or Orca ControlMaster, and--comes before the destination. A config alias stays bare, so the user's ssh_config (Include, Match, ProxyJump, their own ControlMaster) applies. Host-key checking is never changed.spawnPtyExecutable, added next tospawnShellWithFallback, so it gets the same ConPTY options and the same spawn-helper repair. The env comes frombuildInheritedLocalPtyEnvironment, extracted from the pane env builder with no change in behaviour.AgentTerminalPreview's xterm setup moved intocomponents/standalone-terminal/open-standalone-terminal.ts: Unicode widths, links, the IME bridge, kitty flags, copy/paste/right-click, the shortcut policy and input routing. The preview and plain SSH both use it. The only new knob isanswersQueries: plain SSH is its session's only emulator, so it answers cursor, device and keyboard queries; the preview, which only mirrors, keeps suppressing them.createPreviewClipboardPasternow takes an input sink instead of routing by pty id.Why
pty:spawnand the daemon only take a command string typed into a shell, and every terminal tab is tied to a worktree and persisted. A dedicated session can't be restored, synced or used by agents, which is exactly the "not an Orca workspace" promise. It also needs no shell interpolation.ref-oss check: VS Code Remote opens a plain local terminal profile when its remote server can't start. It is unmanaged and separate from remote workspaces, which matches this approach. The standalone-terminal extraction follows the same "one terminal implementation" rule as VS Code's xterm wrapper.
Linked Issue
Reported in Slack (a user locked out of host "lambda" whose move was refused). No GitHub issue.
Visual Proof
Screenshots to follow. The new UI is covered by
PlainSshTerminalPanels.test.tsx: the label, minimize/close, the exit behaviour and the missing-OpenSSH message.Testing
plain-ssh-terminal-args.test.ts:-T, BatchMode, multiplexing or host-key overrides;--.plain-ssh-terminal-sessions.test.ts:PlainSshTerminalPanels.test.tsx:open-standalone-terminal.test.ts: query replies are forwarded only whenanswersQueriesis set.dashboard-popoutsuite (23 files, 222 tests) passes unchanged after the extraction.src/main/ssh/plain-ssh-terminal,src/main/ipc/ssh,src/main/providers,src/renderer/src/components/{plain-ssh-terminal,standalone-terminal,dashboard-popout,settings},src/preload.node-ptyplus real OpenSSH throughspawnPtyExecutable, with the argv frombuildPlainSshTerminalArgs(-p 1 -- [email protected]). It exited with 255 and "Connection refused" in the pty.Review
gpt-6.1-sol, high): the final round is clean. Earlier rounds found these problems, all fixed:Agent skill upstream boundary
Notes
findSystemSsh, including WindowsSystem32\OpenSSH, and spawned through node-pty's ConPTY path.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)