Files
ironclaw/tests
firat.sertgoz ab276eb94d fix(gateway): time-gate SSE reconnect history reload (#2404) (#2415)
* fix(gateway): time-gate SSE reconnect history reload to prevent tab-switch flicker (#2404)

Every SSE reconnection unconditionally called loadHistory(), which clears
the entire chat DOM and re-renders all messages — losing scroll position
and causing visible flicker on every browser tab switch. Now tracks when
the SSE connection was lost and only reloads history if disconnected for
more than 10 seconds. Brief reconnects (tab visibility change, transient
network blip) preserve the existing DOM and rely on the "Done without
response" safety net for missed events.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: address review findings (iteration 1)

Set _sseDisconnectedAt before server restart in E2E test to prevent
flaky timeout when the restart completes in <10s.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-18 15:45:44 +09:00
..