Repository navigation
fix(ssh): a password SSH host waits for you at launch instead of prompting - #30025
Conversation
…nstead of prompting Restores the persisted 'last sign-in needed a typed credential' flag that the relay removal (#27214) stopped writing, and at launch marks those hosts as awaiting sign-in so background reconnects (startup restore, managed-server status checks and tunnels) refuse without dialing instead of opening the password dialog. The user's own Connect lifts it and prompts. The terminal toast shows the refusal as an SSH state, not a bug to report. Co-Authored-By: Claude <[email protected]>
…he harness-shaped registration 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 Merge Risk: ⚪ Minimal · up to
|
…e composer The Run on picker's Connect button called the passive runtimeEnvironments.getStatus for Orca-server hosts. Since stablyai#30025 a password SSH host waits at launch for an explicit connect, and only the connect handler lifts that sign-in gate, so the button showed "needs you to sign in" and never opened the password dialog. Call runtimeEnvironments.connect instead, keeping the 15 s wait and the host's real error toast. Fixes stablyai#52882 Co-authored-by: Neil <[email protected]>
…e composer (#52903) The Run on picker's Connect button called the passive runtimeEnvironments.getStatus for Orca-server hosts. Since #30025 a password SSH host waits at launch for an explicit connect, and only the connect handler lifts that sign-in gate, so the button showed "needs you to sign in" and never opened the password dialog. Call runtimeEnvironments.connect instead, keeping the 15 s wait and the host's real error toast. Fixes #52882 Co-authored-by: Neil <[email protected]>
ELI5
If you sign in to an SSH host with a password, Orca forgets that password when it quits (it always has). Since the move to managed servers, Orca also tries to reach that host the moment it starts, so the password dialog pops up at launch, before you've touched anything. Now Orca remembers that the host needs a password and waits: the host shows as disconnected, and you get the password dialog only when you choose Connect.
What Changed
Before (1.4.229): a password (or passphrase, or keyboard-interactive) SSH host opens a blocking "SSH Password" dialog every time Orca starts, with no workspace opened. Users updating from 1.4.227 relay hosts had never seen this. 1.4.227 deferred those hosts to tab focus.
After: at launch the host shows as Disconnected in the status bar's Remote Hosts menu, and an open workspace on it shows a calm amber note: "pwhost needs you to sign in. Reconnect to sign in." Nothing is dialed and no dialog opens until you choose Connect (status bar, Settings, or the workspace's reconnect). Then you get the dialog once, and everything reattaches.
Mechanism:
lastRequiredPassphraseon the SSH target after a sign-in that asked for any typed credential. Startup restore used it to defer those hosts to tab focus. The relay removal (refactor(ssh): connect fails for hosts orcad can't serve; remove the relay client path #27214) deleted that write, so new hosts never got the flag. Managed-server status checks and tunnels (runtime-environment-status-owner→ensureOrcadManagedTunnel→SshConnectionManager.connect) never consulted it anyway. This PR writes the flag again from the one place every transport reportsconnected(handleSshConnectionStateChange). It's set when a credential was asked for or a remembered one was replayed, and cleared when the host signed in with neither.ssh:connectwithoutautomatic,runtimeEnvironments:connect, test connection, or a sign-in that succeeds anyway). A window re-registration doesn't re-mark hosts the user already signed in to.Nothing is stored. Passwords stay in memory only, exactly as in 1.4.227. Nothing new crosses the wire.
Why
Linked Issue
Internal regression report (coworker updating 1.4.227 → 1.4.229). No GitHub issue.
Visual Proof
Same isolated profile, same password-only SSH host, a workspace with a remote terminal open at quit, relaunch:
Testing
Live, on macOS (this Mac), fully isolated (
ORCA_BACKGROUND_LAUNCH=1, throwaway HOME/userData under /tmp, no windows shown). The host was a user-levelsshdwith HOME redirected to /tmp, fronted by an ssh2 proxy that accepts only password / keyboard-interactive auth, and logs every auth attempt.Packaged 1.4.227: added a password host, connected (a managed server was deployed), then quit and relaunched. The password dialog opened at launch (227's managed route also never wrote the flag).
Packaged 1.4.229 on the upgraded profile: the password dialog opened at launch. It did the same with
lastRequiredPassphrase: truealready persisted, which is the relay-era coworker state.This branch, same upgraded profile:
true.Unit tests that fail before this change:
src/main/ipc/ssh-sign-in-requirement.test.ts(launch gating, explicit connect lifts it, re-registration, flag set/replayed/cleared). Also added: a manager refusal case inssh-connection-manager.test.ts, and the toast interminal-ssh-sign-in-error.test.ts. Ransrc/main/ipc/ssh*,src/main/ssh/ssh-connection*,src/main/ssh/ssh-credential*andsrc/renderer/src/components/terminal-pane: 579 files, all pass.pnpm lint(full, including the ratchets),pnpm tc, andcheck:code-quality:changedall pass. Codex review: clean after one P2 (a test fixture) was fixed.Not verified live: Linux and Windows hosts. The change is desktop-main logic with no platform branches.
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Agent skill upstream boundary
Notes
Security: no credential is stored or sent anywhere. The change only decides when the existing in-memory prompt may open. SSH: remote hosts are reached exactly as before once the user connects. No wire or host-published content changed. Mobile: unaffected.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)