tui: auto-reconnect WebSocket with exponential backoff
A dropped server socket no longer leaves the TUI stranded. WsBridge now
runs a supervisor that connects, forwards events until the socket closes,
then backs off and reconnects indefinitely — the only thing that ends it is
stop(). The status panel flips to 'reconnecting…' and the next message the
user sends is held in the input queue until a fresh socket is live, so a
brief blip doesn't eat their input (send failures requeue + force a
reconnect; nothing is lost).

Backoff: 1s→2s→4s… cap 30s, reset on success; stop() cancels it promptly.
Interface preserved (start/stop/.client/.connected); an optional client=
param lets tests inject a fake client.

Co-Authored-By: Claude <noreply@anthropic.com>
1 parent acc3adc commit dd5cd5201bfad1e38a1bf045dcc35a09fb00103a
@Eugene Sukhodolskiy Eugene Sukhodolskiy authored 23 hours ago
Showing 2 changed files
View
clients/terminal/tui/ws_bridge.py
View
tests/clients/test_ws_bridge.py 0 → 100644