From 2b32609014748736232e597bafa18def9bd5229b Mon Sep 17 00:00:00 2001 From: Neil <4138956+nwparker@users.noreply.github.com> Date: Thu, 13 Aug 2026 23:42:13 -0700 Subject: [PATCH] docs(ssh): say what 'unconditional' meant, since the cited lines have guards MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The disclaimer said terminals.ts:4259-4273 writes ptyIdsByTabId and tab.ptyId 'unconditionally', but those lines carry their own guards on whether a pty id exists. The claim was true only in the intended sense — unconditional with respect to sshConnected, the gate the disproved theory named — and a reader checking the citation would see conditionals and doubt the whole note. That is precisely the failure this rewrite existed to end: a comment that reads as evidence and is wrong on inspection. Now states the actual relationship rather than a word that needs context to be true. --- src/renderer/src/hooks/remote-workspace-snapshot-apply.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/renderer/src/hooks/remote-workspace-snapshot-apply.ts b/src/renderer/src/hooks/remote-workspace-snapshot-apply.ts index cc9fdf5d329..cc6cbf0b81d 100644 --- a/src/renderer/src/hooks/remote-workspace-snapshot-apply.ts +++ b/src/renderer/src/hooks/remote-workspace-snapshot-apply.ts @@ -196,7 +196,9 @@ export async function applyDirectSshRemoteWorkspaceSnapshot({ // WHICH state makes the orphan sweep fire were each disproved by the next reviewer // (`hydrateWorkspaceSession` vs `reconnectPersistedTerminals`, the abort race, the // `sshConnected` gate, and the claim that the predicate goes false at all — see - // terminals.ts:4259-4273, which writes `ptyIdsByTabId` and `tab.ptyId` unconditionally, and + // terminals.ts:4259-4273, which writes `ptyIdsByTabId` and `tab.ptyId` without consulting + // `sshConnected` at all — its own guards are on whether a pty id exists, not on the gate the + // disproved theory named — and // terminals.ts:936-957, which seeds `pendingReconnectPtyIdByTabId` during hydration). The // scope mismatch between `scopedTabIds` and the seed loops is the strongest remaining // candidate, not a conclusion.