mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-09 16:59:43 +02:00
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:
@@ -134,6 +134,7 @@ export class FakeTile {
|
||||
reconnectNow = vi.fn();
|
||||
fit = vi.fn();
|
||||
localFit = vi.fn();
|
||||
paneStarted = vi.fn();
|
||||
destroy = vi.fn(() => {
|
||||
this._destroyed = true;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user