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.
- Add connection timeout (5s) to detect silent failures
- Log WebSocket close events with code and reason
- Prevent infinite reconnection loops after max attempts
- Clear connection timeout when WebSocket opens or closes
- Show user-friendly error after max reconnection attempts
This helps diagnose why WebSocket connections are failing
and prevents the infinite reconnection loop issue.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Modified chat auth failure handler to proceed with WebSocket connection
- Generates anonymous user_id and session_id using crypto.randomUUID()
- WebSocket handler already supports anonymous connections (creates UUIDs if not provided)
- Removes error notification and retry loop that prevented chat from working
This allows chat to work publicly without requiring authentication,
which is the expected behavior for public bots.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Built custom vanilla JS Window Manager (window-manager.js)
- Replaced default.gbui with new desktop.html featuring Windows 95 spatial metaphor + Tailwind aesthetics
- Redesigned icons, taskbar, sidebar, and workspace to exactly match the target PDF layout
- Migrated Chat, Tasks, and Terminal into pure HTMX fragments to load seamlessly inside floating panels
- Added missing CSS rules to handle window rendering without CDNs
Fixed issue where clicking a tool button sent the internal ID (e.g., "03-missa")
instead of the display text (e.g., "⛪ Agendar Missa") to the chat.
The bug was in chat.html where invoke_tool actions were sending action.tool
(the internal ID) instead of sugg.text (the user-friendly display text).
Now tool buttons work correctly on the first click without sending internal IDs.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Hide omnibox search bar when user is not logged in
- Hide Drive, Tasks, CRM, and Calendar navigation items when logged out
- Update theme manager to use correct CSS path (/suite/public/themes/)
- Improve theme switching to update all color variables including --color1/--color2
- Fix bot config color override logic to respect user's theme selection
- Add disconnect notification flag to prevent duplicate notifications
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Fix theme CSS path from /public/themes/ to /suite/public/themes/
- When user selects theme, update chat color variables to match
- Only apply bot config colors if user hasn't selected custom theme
- Add bot logo support to login page
- Add CSS styling for login logo image
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Remove chat header (logo and title) from chat window since logo
will be displayed in top bar from config.csv
- Update CSS to use --chat-color1 and --chat-color2 for all themed elements
- Remove hardcoded theme overrides that interfered with config colors
- Fix text contrast: bot messages now use color2 background with black text
- Update suggestion buttons to use theme colors from config.csv
- Clean up JavaScript to remove references to deleted header elements
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add JavaScript to load user profile from /api/auth/me endpoint
- Save access_token to localStorage/sessionStorage on login
- Update user menu to show actual user name and email
- Toggle Sign in/Sign out based on authentication state
- Add IDs to user menu elements for dynamic updates
- Changed apps-dropdown right position from 60px to 0 in app.css
- Wrapped apps button and dropdown in a container with position:relative
- Moved dropdown to be a sibling of the button inside the container
- Removed duplicate dropdown from header-right section