fix(tiles): Attach reads the response envelope; an exited agent gets no Attach

Found live: the attach and shell routes report a refusal in the envelope of
a 200 ({success: false}), and Attach read only res.ok, so a refused attach
remounted the tile as if it had worked. It now reads the envelope.

The refusal in question: an agent that exited in a live pane (paneExit, e.g.
a shell ended with `exit 3`) still has the pane's tmux client running, so
both routes refuse to start anything ("Session already has a running
process"), and the single view has no restart for it either. Its tile now
shows the exit with a pointer to Close session instead of an Attach button
that cannot work. A session with no PTY attached, or one whose socket closed
because it exited (4009), still gets Attach.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Codeman maintainer
2026-10-06 18:09:18 +02:00
parent dbff114dda
commit d331db1141
3 changed files with 59 additions and 16 deletions
+8 -1
View File
@@ -19645,10 +19645,17 @@ body.tile-grid-resizing--row * {
color: var(--text-muted);
}
.tile-attach[hidden] {
.tile-attach[hidden],
.tile-attach [hidden] {
display: none;
}
.tile-attach-hint {
max-width: 80%;
font-size: 12px;
text-align: center;
}
.tile-attach-btn {
padding: 4px 14px;
font: inherit;