(sidebar): archive and delete stop a live remote session on its host first - #276
Merged
Merged
Conversation
…first Closes #271. The four archive/delete sites go through stopBeforeArchive(): a live remote session is stopped over remote-stop-session before the archive, a local one with a PTY keeps stopSession, anything else is left alone. A refusal or ssh failure skips that session's archive, flashes the control and keeps the others going. Delete never stops a remote session, since main refuses the delete anyway.
This was referenced Sep 12, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #271. Follows the lifecycle verbs of #272 (stop = terminate the process, for remote rows too).
What
public/stop-session-ui.js:isRemoteSessionAlive(session)(adapter snapshot, falling back toremoteDescriptorSeen) andstopBeforeArchive(session) → { ok, error }:remoteStopSession(alias, id)stopSession(id)public/sidebar.js: project archive-all, slug-group archive, per-session archive toggle and per-session delete go through it. A refusal (recycled pid) or ssh failure skips that session's archive, flashes the control (Failed, error intitle) and lets the others proceed. The archive-all confirmation names the host alias(es) it will stop; the two sites without a pre-existing confirm get no new dialog. Delete never stops a remote session: main refusesdelete-sessionfor remote (REMOTE_READ_ONLY), and stopping before a refused delete would be the worst outcome.Docs:
session-state.md(archive/delete = stop-then-action, remote-delete exception),docs/session-browser.md.Proof
test/dom-sidebar-stop-before-archive.test.js(14): decision table + the four sites (remote alive → host stop with alias, never barestopSession; local with PTY →stopSession; local without → no call; group archive with one refusal → that session kept, the others archived, button flashed; remote delete → no stop, refusal message unchanged).activePtyIds → stopSessionturns two tests red; reverted.task check: 1305 + 119 pass, 0 fail, pre-existing skips.