botui/ui/suite/chat
Rodrigo Rodriguez (Pragmatismo) 7c1deca8ae fix: resolve infinite WebSocket reconnection loop
The ui_server proxies WebSocket connections. It was accepting the client's WebSocket connection (ws.onopen triggered on the client), but if it couldn't connect to the backend (or if the backend disconnected), it would drop the client connection right away (ws.onclose triggered).

The issue was that reconnectAttempts was being reset to 0 inside the ws.onopen handler. Because the connection was briefly succeeding before failing, the reconnectAttempts counter was resetting to 0 on every attempt, completely circumventing the exponential backoff mechanism and causing a tight reconnection loop.

Modified the WebSocket logic across all relevant UI components to delay resetting reconnectAttempts = 0. Instead of resetting immediately upon the TCP socket opening, it now safely waits until a valid JSON payload {"type": "connected"} is successfully received from the backend.
2026-02-25 10:15:47 -03:00
..
chat.css fix(ui): dynamic suggestion text and borders contrast, cache busting 2026-02-20 17:43:28 -03:00
chat.html fix: resolve infinite WebSocket reconnection loop 2026-02-25 10:15:47 -03:00
chat.js Fix UI button handlers and add missing JS modules 2026-01-13 14:49:22 -03:00
projector.html fix(ui): remove theme selector from suite layout and projector 2026-02-18 20:52:11 +00:00