Commit graph

34 commits

Author SHA1 Message Date
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
bfc8f4da77 fix: improve WebSocket reconnection logic and add debugging
- 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>
2026-02-24 22:11:26 -03:00
8bfe97e92e fix: allow anonymous chat connections when auth fails
- 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>
2026-02-24 21:47:09 -03:00
2f53b65aeb feat(ui): implement Window Manager desktop shell based on BUILD V3 design
- 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
2026-02-24 19:02:48 -03:00
756da22dd5 fix(ui): robust contrast calculation for named colors and variables
All checks were successful
BotUI CI / build (push) Successful in 3m22s
2026-02-20 20:37:47 -03:00
093f417ff7 fix(ui): dynamic suggestion text and borders contrast, cache busting
Some checks failed
BotUI CI / build (push) Failing after 5s
2026-02-20 17:43:28 -03:00
84684c6687 fix(ui): dynamic text contrast for chat balloons and suggestion chips 2026-02-20 17:08:41 -03:00
138ad31a32 update: sync for alm 2026-02-20 12:59:02 -03:00
4987a15858 fix: Update chat UI theme management
Some checks failed
BotUI CI / build (push) Failing after 49m45s
2026-02-20 01:14:14 +00:00
785187868e fix(ui): prevent empty chat bubbles when message content is empty 2026-02-18 21:36:03 +00:00
ea8003e213 fix(ui): remove theme selector from suite layout and projector 2026-02-18 20:52:11 +00:00
a8bff4e1a7 fix: Send tool display text instead of internal ID when clicking tools
All checks were successful
BotUI CI / build (push) Successful in 5m42s
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>
2026-02-16 00:04:37 +00:00
f0aba607e9 feat: Use typewriter theme for cristo and make suggestion buttons smaller
All checks were successful
BotUI CI / build (push) Successful in 4m31s
- Change cristo bot default theme from mellowgold to typewriter
- Reduce suggestion button size: padding 6px 12px (was 10px 18px)
- Reduce font size to 12px (was 14px)
- Reduce min-height to 30px (was 40px)
- Reduce border-radius to 20px (was 24px)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-15 23:48:40 +00:00
8bb8f9d96a fix: Hide search bar and Drive/Tasks nav when logged out, improve theme switching
- 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>
2026-02-15 21:53:50 +00:00
a29255c848 fix: Update theme selector to change chat colors and add login page logo
- 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>
2026-02-15 21:33:18 +00:00
b68fc0aa85 Update chat UI
All checks were successful
BotUI CI / build (push) Successful in 4m42s
2026-02-14 10:13:40 +00:00
161012c6a6 Update submodule changes
Some checks failed
BotUI CI / build (push) Failing after 18m37s
2026-02-13 22:31:49 +00:00
af78f31565 Remove chat header and fix theming from config.csv
Some checks failed
BotUI CI / build (push) Has been cancelled
- 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>
2026-02-10 14:07:23 +00:00
a8bc5530b0 Add config-colors.css and update UI components
- Add config-colors.css for dynamic color theming
- Update base.html, chat components for better UX
- Improve theme manager and HTMX app integration
2026-02-10 13:54:16 +00:00
e135ebf2e6 Hide voice icon, use light theme, add cursor blink
- Hide voice input button in chat interface
- Change default theme from 'sentient' to 'light'
- Add blinking cursor animation to chat input field
2026-02-04 09:56:24 -03:00
27e839f22a Fix bot_id routing: Extract bot name from URL path
- Add bot_name field to WsQuery struct
- Extract bot_name from URL path (e.g., /edu, /chat/edu)
- Pass bot_name to backend WebSocket URL
- Use URL path for bot identification instead of relying on client message
2026-01-28 17:17:36 -03:00
db0f0c1178 fix(ui): Use absolute paths for CSS/JS assets in suite apps to resolve loading errors 2026-01-28 16:26:09 -03:00
e32e9b793a Update UI components and add drive-sentient.js 2026-01-16 11:29:47 -03:00
eb785b9a69 Fix UI button handlers and add missing JS modules
- Add admin-functions.js with 40+ button handlers
- Load admin scripts in main suite/index.html
- Fix slides.html gbSlides -> window.slidesApp
- Add canvas.js, dashboards.js, goals.js modules
- Export missing functions in drive.js, chat.js
2026-01-13 14:49:22 -03:00
9a4c8bf6a6 Add Phase 4 (@ Mentions) and Phase 5 (Business Reports)
Phase 4 - Chat @ Mentions:
- Add mention dropdown with entity type search
- Add mention tags rendering in messages
- Add entity card tooltip on hover
- Add navigation to entity on click
- Support @lead, @opportunity, @account, @contact, @invoice, @case, @product, @service

Phase 5 - Business Reports:
- Create analytics/partials/business-reports.html
- Add CRM reports: Sales Pipeline, Lead Conversion, Won/Lost, Forecast
- Add Billing reports: Revenue Summary, Aging, Payment History, Monthly
- Add Support reports: Cases by Priority, Resolution Time, Category, AI Rate
- Add tabbed interface for report sections

i18n:
- Add chat mention translations (en, pt-BR, es)
2026-01-10 07:06:39 -03:00
d8e52bf330 feat(auth): Add user profile loading and auth state management
- 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
2026-01-06 22:57:00 -03:00
b4c49314a6 Fix apps dropdown menu positioning near the grid button
- 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
2026-01-03 17:19:17 -03:00
1a50680712 refactor: eliminate router duplication, graceful shutdown, data-driven static routes
Some checks failed
GBCI / build (push) Failing after 9s
2025-12-20 19:58:04 -03:00
9fe234aa3c Update UI components, styling, and add theme-sentient and intents 2025-12-15 23:16:09 -03:00
3439a5722c Fix all app CSS loading - add all app CSS to index.html head 2025-12-15 16:48:36 -03:00
5a574ab52d fix: CSS variable consistency - use app.css bridge variables
- Update chat.css to use consistent CSS variable names from app.css
- Changed --primary-color to --accent-color
- Changed --surface-color to --secondary-bg
- Changed --text-color to --text-primary
- Changed --background-color to --primary-bg
- Changed --primary-hover to --accent-hover
- Ensures proper theming across all 6 themes
2025-12-10 23:38:54 -03:00
f2e2e96b3e fix: suite chat now works like minimal UI with HTMX loading
- Fixed chat layout CSS to use absolute positioning for proper HTMX loading
- Fixed CSS path from relative to absolute (/chat/chat.css)
- Added chat CSS to main index.html for pre-loading
- Added HTMX afterSettle event listener to initialize chat module
- Added WebSocket proxy for SSL cert handling (Cargo.toml, mod.rs)
2025-12-10 22:58:09 -03:00
1f95ac7a15 refactor: Extract inline CSS/JS to separate files for monitoring module
- Create individual CSS files: monitoring.css, alerts.css, health.css, logs.css, metrics.css, resources.css
- Create individual JS files: monitoring.js, alerts.js, health.js, logs.js, metrics.js, resources.js
- Update HTML files to reference external CSS/JS files
- Add CSS/JS files for other modules (analytics, chat, mail, meet, tasks, etc.)
- Remove obsolete implementation plan files
2025-12-07 09:56:27 -03:00
5486318321 - Spliting from botserver. 2025-12-03 18:42:22 -03:00