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.
- Fixed 404 errors on desktop shell assets by explicitly routing to /suite/ absolute paths
- Replaced missing FontAwesome icons in window-manager.js with inline SVGs since CDNs are banned
- 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
This fixes the issue where theme changes required a page refresh to apply
to the chat client area. The body element's data-theme attribute was
applying base.css theme rules that overrode the inline styles set by the
theme manager.
Changes:
- Add data-theme="sentient" to html element in base.html
- Remove body's data-theme attribute when loading themes in theme-manager.js
- This prevents base.css [data-theme="*"] selectors from overriding inline styles
Now both header and body background update immediately when switching themes.
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>
- Increment CACHE_VERSION from v1 to v2
- Forces all users to fetch fresh translations from API
- Fixes issue where old cache with placeholders was overriding correct HTML
- Browser cache had stale translations from before i18n embed fix
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add CACHE_VERSION constant (v1)
- Include version in cache key to auto-invalidate old caches
- Update clearCache to handle versioned keys
- Add comment explaining when to increment version
- Hide omnibox search mechanism when search_enabled=false in product config
- Hide apps menu launcher when menu_launcher_enabled=false or when no apps are visible
- Check effectiveApps (after filtering by compiled features) to determine if menu should be shown
- Automatically hide the apps menu button when there are no apps to display
This provides UI controls that respect the new search_enabled and menu_launcher_enabled
directives added to the .product configuration.
The duplicate functions at lines 455-486 were redefining cacheElements and
bindEvents with wrong element IDs (kebab-case vs camelCase in HTML).
This caused 'Cannot read properties of null' error on slides app init.
- Add docs.css to main index.html CSS includes
- Remove redundant link tag from docs.html
- Add body data-app attribute in htmx-app.js when section changes
- Use body[data-app='docs'] selector for reliable CSS targeting
- Force light background on #main-content when docs is active
- Created light.css with explicit sentient bridge hex values
- Updated theme-manager to always load a theme file (no null)
- Default and Light themes now both load light.css
- Sheet/Docs/Slides will now show white background with light themes
The listener was being registered on document.body inside initHTMX(),
but HTMX requests could start before body was ready.
Now register on document at script load time (immediately) to ensure
all HTMX requests get the Authorization header.
- Include gb-access-token in Authorization header for all HTMX requests
- Add X-Session-ID header for session tracking
- Fix 401 errors on all HTMX-powered API calls
- Create api-client.js for automatic auth token handling
- Include Authorization header in all API requests
- Support for localStorage/sessionStorage token persistence
- Handle 401/403 errors with global event dispatch
- Add file upload with progress tracking
- Update drive.js to use ApiClient
- Add api-client.js to index.html
- Add CRM tab to header navigation after tasks
- Add CSS breakpoint at 1350px for CRM tab hiding
- Add app-item breakpoint for CRM in dropdown
- Delete i18n.js (translations moved to botlib .ftl files)
- Update TODO.md with completed phases
- CRM: Pipeline view with Lead → Opportunity → Account flow (Dynamics nomenclature)
- Kanban pipeline with stages: Lead, Qualified, Proposal, Negotiation, Won, Lost
- List views for Leads, Opportunities, Accounts, Contacts
- Summary stats: Pipeline value, Conversion rate, Avg deal, Won this month
- Billing: Invoices, Payments, Quotes management
- Summary cards: Pending, Overdue, Paid this month, Revenue
- Invoice list with status filters (draft, sent, paid, overdue, cancelled)
- Payments tracking with method filters
- Quotes with status workflow (draft → sent → accepted/rejected)
- Products: Product & Service catalog
- Grid and List views with category/status filters
- Services tab with type filters (hourly, fixed, recurring)
- Price Lists management with currency support
- Tickets: AI-assisted support cases
- Case management with priority/category filters
- AI suggestion banner and auto-suggestions on description
- List + Detail split view
- Summary stats: Open, Urgent, Resolved today, AI resolved %
- Forms: Redirect to Tasks with AI prompt
- Quick example chips for common form types
- Redirects to Tasks with 'Create a form for me about [topic]'
- Menu: Added all 5 apps to dropdown menu after People
- i18n: Added nav labels in English and Portuguese
- Complete home page redesign with large icons, full descriptions, recent documents
- Add People (Contacts) menu item and page with contacts management
- Move Paper right after Chat in menu order
- Rename Tools to Compliance with shield icon
- Settings moved to end of menu
- Logo click now shows home page
- Add Project, Canvas, Goals, Player, Workspace, Video, Learn to menu
- New CSS for home page with modern card layout
- 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