Skip to content

refactor(terminal): panes have two transports, local or remote runtime - #27489

Merged
OrcaWin merged 2 commits into
mainfrom
OrcaWin/p399-C1
Oct 11, 2026
Merged

OrcaWin merged 2 commits into
mainfrom
OrcaWin/p399-C1

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 36 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1207 $\color{#cf222e}{\Huge{\mathbf{−}}}$​5173 $\color{#cf222e}{\Huge{\mathbf{−}}}$​3966
Prod 43 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​165 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1420 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1255

ELI5

A terminal pane can talk to one of two places: this computer, or a paired Orca server (which is also how a managed SSH host is reached). The pane code still carried a third path for the old SSH relay, which was deleted in #27214/#27215. Nothing in the app can serve that path any more, so every attempt on it ended in an error. This PR deletes that third path.

What Changed

Before: a terminal tab on an SSH project that has not yet converted to its managed server (a profile from Orca ≤1.4.223) ran a long "direct SSH" flow when it mounted. It dialed the host, then asked this computer's terminal service to spawn or reattach a shell over the relay, which always failed with No PTY provider for connection and the toast "SSH connection is not active…". The same flow carried retry leases, relay snapshot prepaint, reattach input buffering and relay replay paint choices. None of that could succeed.

After: such a pane never spawns. It gets an inert transport, and the existing SSH reconnect overlay owns it, as it already did for every non-connected status. Mounting the pane still dials the host, exactly as before (ssh.needsPassphrasePrompt, then ssh.connect). A passphrase target still waits for the user, and a removed or runtime-owned target is never dialed. That connect converts the host to its managed server, and the converted row remounts the pane under the server. The only visible change is on a path that already failed: the transient "SSH connection is not active" toast is gone, and the overlay stays the one SSH surface.

Mechanism:

  • agent-idle-working-handlers.ts names the unconverted target session.unservedSshTargetId. There is no session.connectionId any more, so every pane arm that read it is gone: provider command delivery, shell-ready, the cwd-fallback gate, the startup-grid gate, local process-death, the deferred-sleep record and resume quoting.
  • New unserved-ssh-pane-connect.ts holds the mount dial, which shares the overlay's in-flight lock (trackSshConnect), and the inert transport. The transport reports ownsRecovery(), so typed input never remounts the pane.
  • Deleted the direct-SSH retry-lease plumbing on the session (directSshRetryAttempt, claim/adopt/reject helpers, the 31 s settlement timer). settlePaneAttachAttempt(status) keeps settling the tab recovery ledger. Also deleted the relay snapshot prepaint, the relay reconnect model paint and its probe, reattach input buffering, the connect gate, and the transport's admitPtyId option, which only the lease set.
  • Renamed the files that remain for what they hold: direct-ssh-retry-status.ts → pane-host-capability-flags.ts and hidden-restore-state-and-ssh-probe.ts → hidden-restore-state.ts.
  • The store ledgers (directSshPaneRetryByTabId and the rest) are now written but never read by panes. C2 deletes them. Persisted shape is unchanged.

Why

This is Phase 3.99 C1. Every new terminal change had to keep a dead relay arm intact, and the arm masked the real state of an unconverted host behind a misleading toast. I considered keeping a thin pane-side "connect then reattach" flow, but nothing can serve the reattach, so the pane would only gain another failure mode. The overlay plus the conversion remount is the path that actually works.

Proof the code is dead. Main registers no SSH PTY provider (registerSshPtyProvider has no production caller), so every connectionId spawn or attach ended at registry.ts "No PTY provider". rg for each removed symbol (directSshRetryAttempt, claimCapturedDirectSshRetryPty, prepaintParkedSshSnapshot, getSshMainModelSnapshotProbe, waitForSshConnection, resolveSshPaneConnectGate, buffersInputOnlyForSshReattach, resolveSshReconnectModelPaint, sshReconnectPaintsFromModel, DIRECT_SSH_PANE_RETRY_SETTLEMENT_TIMEOUT_MS, admitPtyId, session.connectionId …) over src config tests mobile packages scripts finds none left, including in the @ts-nocheck files. The session bag is typed any, so typecheck alone proves nothing here; the full terminal-pane suite and build:electron-vite both pass.

Net lines: production −1,174 (+146 / −1,320); tests −4,027 (+1,208 / −5,235); config −25.

Linked Issue

Phase 3.99 (owner-approved cleanup plan), PR C1.

Visual Proof

N/A. No new UI. The unconverted-host pane shows the existing reconnect overlay, which already showed for that status. CI's ssh-orcad-auto-convert lane now seeds a relay-era terminal tab and asserts that mounting it dials and converts the host (screenshot artifact relay-era-terminal-dialed.png).

Testing

  • pnpm tc; the full src/renderer/src/components/terminal-pane suite (5,063 tests); pnpm lint; pnpm run check:code-quality:changed; pnpm run build:electron-vite.

  • New pty-connection-unserved-ssh-pane.test.ts: never spawns, dials once per target across panes, a passphrase target waits, removed and connected targets are not dialed, no dial after dispose, a failed dial is reported, and typed input never requests recovery. I checked that the tests fail when the gate or ownsRecovery is removed.

  • Local-path tests that lived in deleted SSH files were kept and renamed (pty-connection-pending-spawn, -park-reveal-model-snapshot, -startup-draft-delivery); SSH-flavoured Command Code and stable-adoption tests now run on a local pane.

  • E2E: ssh-orcad-auto-convert (CI, Docker host) seeds a relay-era terminal tab and asserts that the pane's mount dial converts the host.

  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below

Review

P0/P1 review: self + independent reviewer; reports in the Phase 3.99 review folder.

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

  • SSH: no remote behaviour changes. A managed host is runtime:<env> and unaffected; an unconverted ssh: row is never treated as local and never exited.
  • Wire: renderer-only, with no RPC or IPC shape change. The IPC transport still accepts connectionId, and getConnectionId stays for the paste and link readers (C3).
  • Folder workspaces and WSL: they resolve through the same owner route. A WSL pane never has an SSH connection id.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

@OrcaWin
OrcaWin marked this pull request as ready for review October 11, 2026 14:04
@coderabbitai

coderabbitai Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

📝 Walkthrough

Walkthrough

The changes add an unserved-SSH pane connection path and update PTY spawn, disposal, and reattach handling. They remove direct-SSH retry-ledger logic and SSH reconnect model-snapshot painting. Park-reveal snapshot handling remains and gains test coverage. Startup delivery and pane capability selection use revised connection conditions. Reliability-gate references, CI timing records, and SSH upgrade E2E coverage are also updated.


Priority: ➖ Normal

Merge Risk: 🟡 Moderate · up to aca7d

A terminal on an SSH host that is connected but not yet converted to a managed server can appear blank, with no message or reconnect option. Fix this before merging. The other two findings are minor: a test check and edits to recorded test-run history.

Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 31.25% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 32 functions across 38 files. (2 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check Passed The title clearly describes the primary change: terminal panes now use local or remote-runtime transports instead of the obsolete direct-SSH relay path.
Description check Passed The description is complete and aligned with the template. It explains the user impact, implementation, rationale, linked work, visual proof, testing, scope, and checklist status. The unchecked manual…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.

Full details: Docstring Coverage

Explanation

Docstring coverage is 31.25% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 32 functions across 38 files. (2 skipped: 2 unsupported.)


  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 94f7b460-ab24-4d6c-834a-75d95c59ba84
📥 Commits

Reviewing files that changed from the base of the PR and between bbac3af and aca7d11.

📒 Files selected for processing (79)
  • config/focus-setting-read-baseline.txt
  • config/reliability-gates.jsonc
  • config/scripts/ci-shard-timings.json
  • src/renderer/src/components/terminal-pane/ipc-pty-connect.ts
  • src/renderer/src/components/terminal-pane/pty-connection-cold-restore-resume-command.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection-deferred-ssh-passphrase.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection-direct-ssh-reattach-retry.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection-direct-ssh-spawn-retry.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection-fresh-spawn-guards.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection-park-reveal-model-snapshot.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection-parked-ssh-snapshot.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection-pending-spawn.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection-pty-exit-teardown.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection-reattach-binding.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection-setup-split-spawn.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection-spawn-left-pane-unbound.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection-split-cwd-resolution.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection-ssh-reattach-early-input.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection-ssh-startup-draft-delivery.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection-startup-command-delivery.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection-startup-draft-delivery.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection-test-deps.ts
  • src/renderer/src/components/terminal-pane/pty-connection-test-store-state.ts
  • src/renderer/src/components/terminal-pane/pty-connection-types.ts
  • src/renderer/src/components/terminal-pane/pty-connection-unserved-ssh-pane.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection-windows-cjk-repaint.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection-windows-keyboard-reset.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection/agent-idle-working-handlers.ts
  • src/renderer/src/components/terminal-pane/pty-connection/apply-reattach-payload.ts
  • src/renderer/src/components/terminal-pane/pty-connection/cold-restore-resume-startup.ts
  • src/renderer/src/components/terminal-pane/pty-connection/connect-pane-pty.ts
  • src/renderer/src/components/terminal-pane/pty-connection/deferred-cold-restore-and-snapshot.ts
  • src/renderer/src/components/terminal-pane/pty-connection/deferred-session-attach.ts
  • src/renderer/src/components/terminal-pane/pty-connection/deferred-session-reattach-choice.ts
  • src/renderer/src/components/terminal-pane/pty-connection/deferred-session-reattach-connect.ts
  • src/renderer/src/components/terminal-pane/pty-connection/deferred-session-reattach-live-bookmark.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection/deferred-session-reattach-startup-snapshot.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection/direct-ssh-reattach-recovery.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection/direct-ssh-reattach-recovery.ts
  • src/renderer/src/components/terminal-pane/pty-connection/direct-ssh-retry-lease.ts
  • src/renderer/src/components/terminal-pane/pty-connection/fresh-spawn-start.ts
  • src/renderer/src/components/terminal-pane/pty-connection/hidden-restore-state.ts
  • src/renderer/src/components/terminal-pane/pty-connection/pane-host-capability-flags.ts
  • src/renderer/src/components/terminal-pane/pty-connection/pane-pty-visibility-bind.ts
  • src/renderer/src/components/terminal-pane/pty-connection/pane-serializer-settle.ts
  • src/renderer/src/components/terminal-pane/pty-connection/pane-transport-options.ts
  • src/renderer/src/components/terminal-pane/pty-connection/pty-connect-limits.ts
  • src/renderer/src/components/terminal-pane/pty-connection/pty-exit-hibernate.ts
  • src/renderer/src/components/terminal-pane/pty-connection/pty-input-recovery.ts
  • src/renderer/src/components/terminal-pane/pty-connection/pty-resize-geometry.ts
  • src/renderer/src/components/terminal-pane/pty-connection/reattach-payload-context.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection/reattach-payload-context.ts
  • src/renderer/src/components/terminal-pane/pty-connection/reattach-payload-ssh-reconnect-model-paint.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection/reattach-result-handler-park-reveal-verdict.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection/reattach-result-handler.ts
  • src/renderer/src/components/terminal-pane/pty-connection/reattach-success-settle.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection/resolve-ssh-reconnect-model-paint.ts
  • src/renderer/src/components/terminal-pane/pty-connection/run-deferred-connect.ts
  • src/renderer/src/components/terminal-pane/pty-connection/session-reconcile-dispose.ts
  • src/renderer/src/components/terminal-pane/pty-connection/spawn-deferred-sleep.ts
  • src/renderer/src/components/terminal-pane/pty-connection/ssh-reattach-input-buffering.ts
  • src/renderer/src/components/terminal-pane/pty-connection/ssh-session-connect.ts
  • src/renderer/src/components/terminal-pane/pty-connection/ssh-snapshot-prepaint.ts
  • src/renderer/src/components/terminal-pane/pty-connection/unbound-pane-spawn-recovery.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection/unbound-pane-spawn-recovery.ts
  • src/renderer/src/components/terminal-pane/pty-connection/unserved-ssh-pane-connect.ts
  • src/renderer/src/components/terminal-pane/pty-transport-reattach-admission.test.ts
  • src/renderer/src/components/terminal-pane/pty-transport-spawn-errors.test.ts
  • src/renderer/src/components/terminal-pane/pty-transport-types.ts
  • src/renderer/src/components/terminal-pane/ssh-pane-connect-gate.test.ts
  • src/renderer/src/components/terminal-pane/ssh-pane-connect-gate.ts
  • src/renderer/src/components/terminal-pane/ssh-reattach-model-restore.test.ts
  • src/renderer/src/components/terminal-pane/ssh-reattach-model-restore.ts
  • src/renderer/src/components/terminal-pane/ssh-reconnect-model-paint-gate.test.ts
  • src/renderer/src/components/terminal-pane/terminal-pane-lifecycle-types.ts
  • src/renderer/src/components/terminal-pane/terminal-pane-recovery.test.ts
  • src/renderer/src/store/terminals/terminal-tab-recovery-ledger.ts
  • tests/e2e/helpers/orcad-upgrade-profile.ts
  • tests/e2e/ssh-orcad-auto-convert.spec.ts
💤 Files with no reviewable changes (39)
  • src/renderer/src/components/terminal-pane/pty-connection-fresh-spawn-guards.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection-pty-exit-teardown.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection/spawn-deferred-sleep.ts
  • src/renderer/src/components/terminal-pane/pty-connection-windows-cjk-repaint.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection-direct-ssh-reattach-retry.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection-deferred-ssh-passphrase.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection/direct-ssh-reattach-recovery.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection-ssh-startup-draft-delivery.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection/direct-ssh-retry-lease.ts
  • src/renderer/src/components/terminal-pane/pty-connection/reattach-payload-ssh-reconnect-model-paint.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection/reattach-payload-context.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection/pty-connect-limits.ts
  • src/renderer/src/components/terminal-pane/pty-connection-parked-ssh-snapshot.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection/resolve-ssh-reconnect-model-paint.ts
  • src/renderer/src/components/terminal-pane/pty-connection/deferred-session-reattach-live-bookmark.test.ts
  • src/renderer/src/components/terminal-pane/ssh-reconnect-model-paint-gate.test.ts
  • src/renderer/src/components/terminal-pane/pty-transport-types.ts
  • src/renderer/src/components/terminal-pane/pty-connection-ssh-reattach-early-input.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection/direct-ssh-reattach-recovery.ts
  • src/renderer/src/components/terminal-pane/ssh-pane-connect-gate.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection/session-reconcile-dispose.ts
  • src/renderer/src/components/terminal-pane/pty-connection/ssh-snapshot-prepaint.ts
  • src/renderer/src/components/terminal-pane/pty-connection/deferred-session-reattach-choice.ts
  • src/renderer/src/components/terminal-pane/pty-connection/ssh-session-connect.ts
  • src/renderer/src/components/terminal-pane/pty-connection/reattach-result-handler-park-reveal-verdict.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection-test-deps.ts
  • src/renderer/src/components/terminal-pane/pty-connection-direct-ssh-spawn-retry.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection-reattach-binding.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection/ssh-reattach-input-buffering.ts
  • src/renderer/src/components/terminal-pane/ssh-reattach-model-restore.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection/deferred-cold-restore-and-snapshot.ts
  • src/renderer/src/components/terminal-pane/pty-connection/reattach-payload-context.ts
  • src/renderer/src/components/terminal-pane/pty-connection-spawn-left-pane-unbound.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection/deferred-session-reattach-startup-snapshot.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection-split-cwd-resolution.test.ts
  • src/renderer/src/components/terminal-pane/ssh-pane-connect-gate.ts
  • src/renderer/src/components/terminal-pane/pty-connection-windows-keyboard-reset.test.ts
  • config/scripts/ci-shard-timings.json
  • src/renderer/src/components/terminal-pane/ssh-reattach-model-restore.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.

"runner": "local",
"platform": "macos",
"command": "pnpm test src/renderer/src/components/terminal-pane/pty-transport-connect-spawn.test.ts src/renderer/src/components/terminal-pane/pty-connection-deferred-reattach-live-output.test.ts src/renderer/src/components/terminal-pane/pty-connection-hidden-snapshot-live-overlap.test.ts src/renderer/src/components/terminal-pane/pty-connection-replay-payload-handling.test.ts src/renderer/src/components/terminal-pane/pty-connection/reattach-payload-ssh-reconnect-model-paint.test.ts",
"command": "pnpm test src/renderer/src/components/terminal-pane/pty-transport-connect-spawn.test.ts src/renderer/src/components/terminal-pane/pty-connection-deferred-reattach-live-output.test.ts src/renderer/src/components/terminal-pane/pty-connection-hidden-snapshot-live-overlap.test.ts src/renderer/src/components/terminal-pane/pty-connection-replay-payload-handling.test.ts",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Preserve the command recorded for this evidence run.

This dated run now names a different test, but its result, duration, and summary still describe the earlier run. The same change affects the dated commands at Lines 11996, 12032, 13542, 13560, and 13578. Restore the commands that were executed. Record replacement-suite results only as new evidence runs.

Comment on lines +331 to +336
beginAgentStartupDeliveryAttempt({
worktreeId: 'wt-1',
tabId: 'tab-1',
launchToken: 'launch-token-1'
})
).toBe(true)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Use the delivery module imported after vi.resetModules().

connectPanePty imports a fresh delivery-module instance after the reset. This assertion uses the top-level import from before the reset. It can return true without checking whether the active instance released the startup delivery. Import beginAgentStartupDeliveryAttempt inside this test, as the first two tests do.

Comment on lines +35 to +39
const isConnected = (): boolean =>
useAppStore.getState().sshConnectionStates.get(targetId)?.status === 'connected'
if (isConnected()) {
return
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🔎 Supported by static analysis

🏁 Script executed:

#!/bin/bash
rg -nP -C4 'sshConnectionStates|SshReconnect|reconnect overlay' --type=ts -g '!**/*.test.ts' src/renderer/src/components/terminal-pane | head -120

Repository: stablyai/orca

Length of output: 12927


🏁 Script executed:

#!/bin/bash
set -e
printf '%s\n' '--- target helper ---'
nl -ba src/renderer/src/components/terminal-pane/pty-connection/unserved-ssh-pane-connect.ts | sed -n '1,180p'
printf '%s\n' '--- overlay references ---'
rg -n -F --glob '*.ts' --glob '*.tsx' -- 'showSshReconnectOverlay' src/renderer/src/components/terminal-pane src/renderer/src | head -80
printf '%s\n' '--- reconnect portal definitions ---'
rg -n -F --glob '*.ts' --glob '*.tsx' -- 'TerminalPaneSshReconnectPortals' src/renderer/src/components/terminal-pane
rg -n -i --glob '*.ts' --glob '*.tsx' -- 'SshReconnect|ssh reconnect|reconnect overlay' src/renderer/src/components/terminal-pane | head -160

Repository: stablyai/orca

Length of output: 25902


Report the connected-but-unconverted state.

When sshConnectionStates reports connected, connectUnservedSshPaneTarget returns without reporting an error. The SSH reconnect overlay also excludes the connected status, so this pane can have no status or recovery signal. Report the inert-pane message before returning.

🐛 Suggested fix
   if (isConnected()) {
+    // Why: no dial will run, so the inert transport's message is the only signal this pane gets.
+    session.reportError(
+      'SSH connection is active but this workspace has not converted yet. Reconnect from Settings if it does not reload.'
+    )
     return
   }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const isConnected = (): boolean =>
useAppStore.getState().sshConnectionStates.get(targetId)?.status === 'connected'
if (isConnected()) {
return
}
const isConnected = (): boolean =>
useAppStore.getState().sshConnectionStates.get(targetId)?.status === 'connected'
if (isConnected()) {
// Why: no dial will run, so the inert transport's message is the only signal this pane gets.
session.reportError(
'SSH connection is active but this workspace has not converted yet. Reconnect from Settings if it does not reload.'
)
return
}

@OrcaWin
OrcaWin merged commit 9c59878 into main Oct 11, 2026
62 of 70 checks passed
OrcaWin added a commit that referenced this pull request Oct 11, 2026
Panes stopped spawning on unconverted ssh: rows in #27489, so the retry,
live-binding and history ledgers were written but never read. Delete them,
the retry and settle actions, and the detach transfer. The disconnect and
new-authority clears keep nulling stale ssh: PTY ids exactly as before.

Co-authored-by: m4air <m4air@Mac.localdomain>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant