* fix: report a clear cli error when no herdr server is running
socket cli commands surfaced a raw io::Error debug string
(`Error: Os { code: 2, ... }`) when nothing was listening on the
api socket, which read like a bad --cwd path. map dead-socket
connect failures to a `server_not_running` json error carrying the
resolved socket path, printed once at the edge that surfaces the
error; recovering callers (plugin offline registry fallback, agent
start polling) recognize the marker and keep their existing
behavior.
refs #1941
* fix: map dead-socket errors on the unchecked cli request path
refs #1941
* fix: make server-not-running guidance session-aware
refs #1941
Enable termination-signal handling so SIGHUP and SIGTERM follow the graceful
quit path and restore terminal state. Log handler registration failures and
add PTY coverage for direct SIGHUP and server EOF restoration
Co-authored-by: Matt Coles <macols@amazon.com>
live_server_holds_one_pty_master_fd_per_pane counted only /proc/<pid>/fd links
resolving to exactly /dev/ptmx. On devpts setups such as WSL2 and many
containers, a PTY master fd resolves to /dev/pts/ptmx instead, so the test found
zero masters and failed with "had 0 ptmx master fds; expected 1" even though the
server held the pane's master fd. Match both ptmx node paths; pty slaves still
resolve to /dev/pts/<N> and stay uncounted, so the one-master-per-pane invariant
is unchanged.
handle_pane_died only clamped the stale active/selected indices after
removing a workspace that closed itself, so it never shifted them down
when the removed workspace sat before the focused one. With workspaces
[x, y, z] and focus on y, removing x left active pointing at z, silently
moving the user into a workspace they did not select.
Resolve both indices by workspace id across the removal, as
close_selected_workspace already does, keeping the clamp as the fallback
for when the removed workspace was the focused one. Also scroll the
focused workspace back into view, which the explicit-close path already
did and this one did not.
refs #1621
Co-authored-by: Can Celik <ogulcancelik@gmail.com>
herdr tab close on a workspace's only tab returned tab_close_failed,
while the TUI close-tab action on the same tab closes the tab and
cascades to closing the workspace. Cascade in the API too, emitting
tab.closed then workspace.closed. When the cascade would close a whole
worktree group, return confirmation_required instead, matching
pane.close and the TUI prompt.
refs #1760