webclient: make session loads cheap, cancellable and honest
...
Opening a session moved ~1 MB of history JSON and a 1.5 MB bundle
uncompressed, then reloaded the whole transcript on every WebSocket
reconnect; a failed request wiped what was on screen.
Server: GZipMiddleware(1 KB) - one history page shrinks 5.1x, the SPA
bundle 3.2x.
Client:
- session_sync asks /meta instead of reloading history, and only when
the view is idle;
- session loading keeps the previous transcript until the new data
arrives, aborts the request it replaced, ignores stale responses and
surfaces a retryable error banner;
- search-jump pagination no longer pages through the previous session's
history;
- REST calls get a 30 s timeout and caller abort support;
- WS queue overflow rejects the message and marks the bubble "not sent"
instead of silently dropping the oldest;
- tool card bodies mount on first open (a 38-card session drops ~1 MB of
markup and ~25k elements);
- identical /sessions requests coalesce, the streaming watch is a cheap
signature, the content-tool key is one store computed, useTime shares
one 30 s ticker, connect() clears the retry timer.
e2e opens result cards explicitly now that bodies are lazy.
Eugene Sukhodolskiy
committed
18 hours ago