botui/ui/suite/js
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
..
vendor feat(ui): implement Window Manager desktop shell based on BUILD V3 design 2026-02-24 19:02:48 -03:00
api-client.js feat(api-client): add centralized API client with auth token injection 2026-01-10 11:47:54 -03:00
auth-service.js Update: UI files and add error-reporter.js 2026-02-04 13:54:26 -03:00
base.js feat: Hide omnibox and apps menu based on product configuration 2026-01-29 23:56:00 -03:00
css-loader.js fix(slides): remove duplicate cacheElements/bindEvents functions causing null error 2026-01-12 14:05:06 -03:00
error-reporter.js WIP: Various UI updates from previous session 2026-02-08 12:21:11 +00:00
home.js refactor(ui): extract inline CSS/JS to external files 2026-01-10 20:12:48 -03:00
htmx-app.js fix: resolve infinite WebSocket reconnection loop 2026-02-25 10:15:47 -03:00
i18n.js fix(i18n): Invalidate cache to fix placeholder translations 2026-02-14 20:05:28 +00:00
security-bootstrap.js WIP: Various UI updates from previous session 2026-02-08 12:21:11 +00:00
suite_app.js feat(ui): implement Window Manager desktop shell based on BUILD V3 design 2026-02-24 19:02:48 -03:00
theme-manager.js fix: resolve infinite WebSocket reconnection loop 2026-02-25 10:15:47 -03:00
window-manager.js fix(ui): resolve Cannot read properties of null (reading 'appendChild') in window-manager.js 2026-02-24 19:49:04 -03:00