Skip to content

(sidebar): archive and delete stop a live remote session on its host first - #276

Merged
devsuitup merged 1 commit into
mainfrom
fix/271-bulk-stop-remote
Sep 12, 2026
Merged

devsuitup merged 1 commit into
mainfrom
fix/271-bulk-stop-remote

Conversation

@devsuitup

Copy link
Copy Markdown
Owner

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 to remoteDescriptorSeen) and stopBeforeArchive(session) → { ok, error }:

    kind state call
    remote alive remoteStopSession(alias, id)
    remote not alive nothing
    local has PTY stopSession(id)
    local no PTY nothing
  • 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 in title) 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 refuses delete-session for 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 bare stopSession; 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).
  • Mutation: reverting archive-all to the bare activePtyIds → stopSession turns two tests red; reverted.
  • task check: 1305 + 119 pass, 0 fail, pre-existing skips.

…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.
@devsuitup
devsuitup merged commit d95ddd7 into main Sep 12, 2026
10 checks passed
@devsuitup
devsuitup deleted the fix/271-bulk-stop-remote branch September 12, 2026 12:42
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.

(sidebar): bulk archive/delete must stop remote sessions on the host, not just detach

1 participant