mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-10 09:19:42 +02:00
feat(tiles): Attach overlay for a tile whose session is not attached or has exited
A tile has no live terminal when its session has no PTY attached (pid null, e.g. restored after a server restart), when the agent exited in a live pane (paneExit), or when the server closed the tile's socket because the session exited (4009, which used to leave only the "session ended" marker). Its body now says which, with an Attach button, in an overlay laid over the terminal so the body and its xterm keep their size. Attach is the single view's own re-attach: POST /interactive (or /shell for a shell) with NO body, at most one in flight per session, since the route has no in-flight guard of its own. A tripped PTY-exit breaker goes through the same confirm before clearBreaker: true, and nothing automatic ever sends it. On success the tile is remounted onto the new pane (a socket stopped for good cannot reconnect), keeping the keyboard if it had it; the overlay stays away while the server catches up, and a failed attach says so and keeps it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -19527,6 +19527,42 @@ html[data-session-list="sidebar"][data-sidebar="collapsed"] .btn-sidebar-toggle
|
||||
box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--accent, #4a9eff) 60%, transparent);
|
||||
}
|
||||
|
||||
/* The Attach overlay: a tile whose session has no PTY attached, or whose
|
||||
agent exited. Absolute over the body, so the body and its xterm keep their
|
||||
size. */
|
||||
.tile-attach {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
z-index: 2;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 10px;
|
||||
background: color-mix(in srgb, var(--term-bg, #161b23) 88%, transparent);
|
||||
font-size: 13px;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.tile-attach[hidden] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.tile-attach-btn {
|
||||
padding: 4px 14px;
|
||||
font: inherit;
|
||||
color: var(--accent-ink, #fff);
|
||||
background: var(--accent, #4a9eff);
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.tile-attach-btn:disabled {
|
||||
opacity: 0.5;
|
||||
cursor: progress;
|
||||
}
|
||||
|
||||
/* Quiet "loading" state while the tile's capture waits in the grid's one load
|
||||
queue (or runs). */
|
||||
.tile.tile--loading .tile-body::after {
|
||||
|
||||
Reference in New Issue
Block a user