fix(tiles): a tile that joined before its pane existed resends its size

A session Run makes while the grid is open joins as a tile right away, so
the tile connects and sends its size before Run starts the pane. The
server only records a resize for a session with no PTY and spawns the pane
at 120x40, and Run's own resize step measures the parked main terminal
(display: none, so nothing). Measured live for Shell and Claude: a 97x17
tile over a 120x40 pane, for good (#464).

The chrome refresh now remembers each tile's last-seen pid and calls
TerminalTile.paneStarted() when it appears or changes. paneStarted()
forgets the sent size and sends it; a hidden tile (a zoomed neighbour)
sends nothing and keeps it forgotten, so its next fit() sends it, which a
plain fit({ force: true }) would lose. Keyed on the sessions map, so a
handleInit after an SSE drop counts too.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Codeman maintainer
2026-10-06 19:46:04 +02:00
parent f1e5b82ecc
commit fa9d5879b3
8 changed files with 109 additions and 3 deletions
+4
View File
@@ -31,6 +31,10 @@ or settled a question the spec left open. The invariants as built are in
- **4009 lands on the Attach overlay**, and 4003/4004/4010 remove the tile.
- **"+ / New session in this case"** runs the normal Run for that case and joins through
the same auto-join as any Run from this tab.
- **A tile that joins before its pane exists resends its size when the pid appears**
(`TerminalTile.paneStarted()`): the server drops a resize for a session with no PTY and
spawns at 120x40, and Run's own resize measures the parked main terminal. Applying a
pre-spawn resize at spawn time on the server would make this unnecessary (follow-up).
## Problem