Files
Brennan Benson 985176b11b fix(remote-runtime): reopen client-event streams after connection replacement (#40881)
* fix(remote-runtime): end remote streams when the host connection is replaced

A remote stream remembered its host connection's transport generation and,
once the generation moved on, main silently dropped every frame without
closing the stream. The chat reader still believed it was connected and never
reopened, so messages stayed "Sending…" until the tab was reopened.

Advancing the generation (including eviction) now ends every pending and
retained subscription fenced on the old one; readers resume from their applied
cursor on the new connection.

Tracked in STA-14427.

* fix(remote-runtime): resubscribe client events when their stream ends

Main now ends streams whose host connection was replaced, but the renderer's
client-event owner ignored the close and kept a dead subscription while its key
stayed the same, so repository, worktree and SSH updates stopped. It now drops
that subscription on close (also when the close lands mid-setup) and
resubscribes through its existing retry.

Tracked in STA-14427.

* fix(remote-runtime): back off client-event resubscribes until a stream stays up

A host that accepted the client-event subscription and then dropped it made
the owner resubscribe about once a second forever, because each install reset
the failure count. Every close now counts toward the existing capped backoff,
and the count resets only once a stream has stayed up for 30 seconds.

Tracked in STA-14427.

* fix(remote-runtime): retain the landed transport retirement implementation

* fix(remote-runtime): isolate client-event retries by host
2026-11-10 17:08:11 -08:00
..