feat(split): Pane B reconnects as soon as the server is back

When SSE comes back after a server restart, handleInit's reconnect
branch already re-opens the primary pane's socket; it now also calls
the split pane tile's reconnectNow(), so Pane B no longer waits out its
backoff (up to 10 s between tries) after every deploy. Live: Pane B was
back 4.6 s after the server process respawned, i.e. as soon as it
listened.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Codeman maintainer
2026-10-06 11:03:09 +02:00
parent 497711a05e
commit 9e032bdc3e
2 changed files with 17 additions and 0 deletions
+4
View File
@@ -4581,6 +4581,10 @@ class CodemanApp {
// a give-up) nothing else would re-establish it from here.
if (this._wsSessionId !== restoreId) this._connectWs(restoreId);
void this._onSessionNeedsRefresh({ id: restoreId });
// The split pane's second terminal reconnects on its own backoff (up to
// 10 s between tries); the server is back now, so skip the wait. A no-op
// while its socket is open, stopped for good, or destroyed.
this._splitPane?.reconnectNow?.();
} else {
this.activeSessionId = null;
// `auto`: the app is restoring a session on load, not a human opening