Commit graph

73 commits

Author SHA1 Message Date
d0563391b6 ``` Add comprehensive email account management and user settings
interface

Implements multi-user authentication system with email account
management, profile settings, drive configuration, and security
controls. Includes database migrations for user accounts, email
credentials, preferences, and session management. Frontend provides
intuitive UI for adding IMAP/SMTP accounts with provider presets and
connection testing. Backend supports per-user vector databases for email
and file indexing with Zitadel SSO integration and automatic workspace
initialization. ```
2025-11-21 09:28:35 -03:00
4d2a8e4686 @media (prefers-color-scheme: dark)
-  Enhanced accessibility features (focus states, reduced motion)
-  Added connection status component styles
-  Improved responsive design
-  Added utility classes for common patterns

-  Added semantic HTML5 elements (`<header>`, `<main>`, `<nav>`)
-  Comprehensive ARIA labels and roles for accessibility
-  Keyboard navigation support (Alt+1-4 for sections, Esc for menus)
-  Better event handling and state management
-  Theme change subscriber with meta theme-color sync
-  Online/offline connection monitoring
-  Enhanced console logging with app info

-  `THEMES.md` (400+ lines) - Complete theme system guide
-  `README.md` (433+ lines) - Main application documentation
-  `COMPONENTS.md` (773+ lines) - UI component library reference
-  `QUICKSTART.md` (359+ lines) - Quick start guide for developers
-  `REBUILD_NOTES.md` - This summary document

**Theme files define base colors:** ```css :root { --primary: 217 91%
60%; /* HSL: blue */ --background: 0 0% 100%; /* HSL: white */ } ```

**App.css bridges to working variables:** ```css :root { --accent-color:
hsl(var(--primary)); --primary-bg: hsl(var(--background));
--accent-light: hsla(var(--primary) / 0.1); } ```

**Components use working variables:** ```css .button { background:
var(--accent-color); color: hsl(var(--primary-foreground)); } ```

-  Keyboard shortcuts (Alt+1-4, Esc)
-  System dark mode detection
-  Theme change event subscription
-  Automatic document title updates
-  Meta theme-color synchronization
-  Enhanced console logging
-  Better error handling
-  Improved accessibility

-  Theme switching via dropdown
-  Theme persistence to localStorage
-  Apps menu with section switching
-  Dynamic section loading (Chat, Drive, Tasks, Mail)
-  WebSocket chat functionality
-  Alpine.js integration for other modules
-  Responsive design
-  Loading states

- [x] Theme switching works across all 19 themes
- [x] All sections load correctly
- [x] Keyboard shortcuts functional
- [x] Responsive on mobile/tablet/desktop
- [x] Accessibility features working
- [x] No console errors
- [x] Theme persistence works
- [x] Dark mode detection works

``` documentation/ ├── README.md # Main docs - start here ├──
QUICKSTART.md # 5-minute guide ├── THEMES.md # Theme system details ├──
COMPONENTS.md # UI component library └── REBUILD_NOTES.md # This summary
```

1. **HSL Bridge System**: Allows theme files to use shadcn-style HSL
   variables while the app automatically derives working CSS properties
2. **No Breaking Changes**: All existing functionality preserved and
   enhanced
3. **Developer-Friendly**: Comprehensive documentation for customization
4. **Accessibility First**: ARIA labels, keyboard navigation, focus
   management
5. **Performance Optimized**: Instant theme switching, minimal reflows

- **Rebuild**:  Complete
- **Testing**:  Passed
- **Documentation**:  Complete
- **Production Ready**:  Yes

The rebuild successfully integrates the theme system throughout the UI
while maintaining all functionality and adding comprehensive
documentation for future development.
2025-11-21 09:28:02 -03:00
11a9730ae9 I've completed a comprehensive rebuild of the General Bots Desktop UI to
properly integrate the theme system. Here's what was accomplished:

-  Converted all color variables to HSL format compatible with theme
  files
-  Created a two-layer bridge system:
  - **Layer 1**: Base HSL variables (from theme files: `--primary: 217
    91% 60%`)
  - **Layer 2**: Working CSS variables (auto-derived: `--accent-color:
    hsl(var(--primary))`)
-  Added support for alpha transparency: `hsla(var(--primary) / 0.1)`
2025-11-21 07:42:20 -03:00
444b424739 Refactor chat module to use unified theme system
Rewrites chat.css to use centralized CSS variables from app.css instead
of maintaining its own theme definitions. Moves all theme variables
(colors, spacing, shadows, transitions) to app.css as the single source
of truth. Improves chat UI consistency, adds better connection status
indicators, and enhances responsive design.
2025-11-20 21:09:23 -03:00
eb4084fe2d Add public assets route and improve chat initialization
- Add /public static file route for themes and shared assets
- Fix chat app initialization for dynamic script loading
- Add ThemeManager with dropdown selector for 19 theme variants
- Improve module lazy loading with better retry logic
- Add loading overlay for smoother app startup
- Refactor app.css to use unified theme variables
- Format code and organize imports consistently
2025-11-20 20:39:20 -03:00
37a15ea9e0 simplifying the chat interface. 2025-11-20 18:29:55 -03:00
564ad32417 . Adjust chat layout dimensions and remove context indicator
Reduced footer height from 90px to 75px and adjusted related spacing
throughout
2025-11-20 16:29:10 -03:00
8c2b17c615 Fix messages layout and improve scrollbar styling
Switch messages area to fixed positioning with centered transform for
better layout stability. Enhance scrollbar appearance with thin style,
improved colors
2025-11-20 16:02:48 -03:00
42f5ce609c - Fix all js errors. 2025-11-20 14:40:15 -03:00
a823f319c3 Load layout before Alpine and adjust chat CSS 2025-11-20 14:35:23 -03:00
9f1d74b101 Introduce chatApp singleton and guarded init
- Implement singleton pattern for chatApp to prevent multiple instances
- Gate initialization with isInitialized to skip repeated init calls
- Add guards for auth and WebSocket connections to avoid overlaps
- Filter non-message payloads and only render content messages
- Improve scroll-to-bottom button visibility and interaction
- Update scrollbar styling, including dark theme rules
2025-11-20 14:28:21 -03:00
382a01658d Refactor TALK delivery and streaming pipelines 2025-11-20 13:40:40 -03:00
e146add4b2 Migrate HTTP API from Actix to Axum 2025-11-20 13:28:35 -03:00
df36448f14 fix: correct syntax error and improve chat UI initialization
- Removed stray `o` character after `pendingContextChange` declaration to fix a syntax error in `chat.js`.
- Added safety check before calling `focus()` on the message input element.
- Implemented `preloadChatCSS()` to preload chat styles and prevent flash‑of‑unstyled‑content.
- Added GSAP fade‑in animation when switching sections for smoother visual transition.
- Ensured input field is auto‑focused after a section loads.
- Changed the default initial section from `drive` to `chat` to align with new default behavior.
2025-11-17 12:16:53 -03:00
e38554ea51 refactor(web): add SPA fallback route and clean up server
- Removed the unused `serve_html` handler and its import.
- Added a fallback static file service that serves `index.html` for any unmatched path, enabling proper SPA routing.
- Reordered service registration to place the fallback before the explicit index route.
- Cleaned up redundant blank lines and imports in `mod.rs`.

**Client-side (chat.js) updates**
- Renamed the message input variable from `input` to `messageInputEl` for clarity.
- Introduced `pendingContextChange` placeholder for future context handling.
- Switched initialization event from `document 'ready'` to `window 'load'`.
- Updated DOM element assignments and focus calls to use the new variable name.
- Removed unused sidebar auto‑close logic and obsolete session loading functions (`loadSessions`, `loadSessionHistory`).
- Minor refactoring and comment adjustments to improve readability and eliminate dead code.
2025-11-17 12:11:13 -03:00
41fd167d50 feat(layout): add section caching with dynamic container
Refactor `layout.js` to improve section loading performance:
- Removed unused sections from the `sections` map.
- Introduced `sectionCache` to store loaded sections.
- Created a reusable `#section-container` element for managing section DOM nodes.
- Implemented lazy loading with a loading placeholder and show/hide logic for cached sections.
- Optimized CSS handling by reusing existing stylesheet links instead of removing and recreating them.
- Added safeguards to avoid reloading already‑loaded JS modules.
2025-11-17 10:16:01 -03:00
f9a1e3a8c0 refactor(web): consolidate routing and expose auth handler
- Add `*.log` to `.gitignore` to exclude log files from version control.
- Change `auth_handler` to `pub` in `src/auth/mod.rs` to make the endpoint publicly accessible.
- Remove unused `bot_index` import and route; replace direct service registration with `web_server::configure_app` in `src/main.rs`.
- Refactor `src/web_server/mod.rs`:
  - Remove the `bot_index` handler.
  - Introduce `serve_html` helper for loading HTML pages.
  - Simplify static file serving by configuring separate routes for JS and CSS assets.
  - Centralize all route and static file configuration in `configure_app`.
- Clean up related imports and improve error handling for missing pages.
2025-11-17 10:00:12 -03:00
737f934d68 Clean up desktop module files 2025-11-16 22:57:02 -03:00
017d4aecd0 feat: add Chat navigation link and section mapping
- Added a new "Chat" link in the desktop navigation bar with appropriate click handling and active state styling.
- Updated the layout configuration to include the Chat section, mapping it to `chat/chat.html`.
- Enables users to switch to the Chat interface directly from the main navigation.
2025-11-16 22:53:51 -03:00
db008f6739 refactor: remove obsolete navigation links from desktop index.html
Removed several unused navigation items (Dashboard, Editor, Player, Paper, Settings, Tables, News) from the desktop version of the application. This cleanup simplifies the UI, reduces dead code, and prevents users from accessing sections that are no longer part of the product.
2025-11-16 22:40:10 -03:00
f20771aa85 fix(web_server): update static file path and remove unused index import
Changed static file path to a relative path (`./web/desktop`) for better portability across environments and removed the unused `index` import from `main.rs` to tidy up module references.
2025-11-16 09:07:53 -03:00
6c2a575887 feat(editor): redesign editor UI with 3DBevel theme and ribbon layout
Revamps editor.css to introduce a modern 3DBevel-inspired visual theme, adds structured variables, and implements new UI components including title bar, ribbon tabs, and quick access toolbar for improved usability and maintainability.
2025-11-15 22:03:30 -03:00
02eaac783f feat(editor, settings): refactor state handling and enhance validation
Refactored editor.page.html to use a Vue-style `data()` function for reactive state, adding a new `content` property and cleaning up redundant inline styles. Updated profile-form.html to replace single `error` handling with field-specific `errors.<field>` bindings, improving form validation clarity and user feedback.
2025-11-15 21:52:53 -03:00
f2624aef94 feat(ui): update dashboard styles and expand layout sections
Update dashboard CSS to use new color scheme matching visual identity, replacing CSS variables with specific color values. Improved button hover state with background transition instead of opacity.

Expanded layout.js with additional application sections including dashboard, editor, player, and settings to support new navigation structure.
2025-11-15 20:00:29 -03:00
b9395cb0d7 feat(desktop): add new navigation links to index.html
Added new navigation links for Dashboard, Editor, Player, Paper, Settings, Tables, and News sections. Each link includes click handlers to switch sections and active state styling. This expands the application's navigation options for better user access to different features.
2025-11-15 19:52:24 -03:00
01e89c9358 feat: add actix-files dependency for file serving support
Added actix-files and its dependencies (http-range, mime_guess, unicase, v_htmlescape) to enable static file functionality in the botserver. This will allow serving static assets and files through the web server. The change includes all required transitive dependencies for proper file handling and MIME type detection.
2025-11-15 19:08:26 -03:00
3014822ace feat: consolidate assets and improve navigation structure
- Consolidated CSS and JS assets by moving them to local files (app.css, gsap.min.js, marked.min.js)
- Removed livekit-client CDN dependency as it appears unused
- Moved navbar logic to separate layout.js file for better organization
- Changed navigation links to use hash-based routing (#chat, #drive, etc)
- Removed redundant navbar template fetching in favor of static inclusion
- Simplified HTML structure by removing commented code and redundant elements

These changes improve maintainability and performance by reducing external dependencies and better organizing frontend assets.
2025-11-15 10:16:09 -03:00
4b185f00f9 feat: add HTTP server and refactor initialization
- Added HTTP server with CORS support and various endpoints
- Introduced http_tx/http_rx channels for HTTP server control
- Cleaned up build.rs by removing commented code
- Updated .gitignore to use *.rdb pattern instead of .rdb
- Simplified capabilities.json to empty object
- Improved UI initialization with better error handling
- Reorganized module imports in main.rs
- Added worker count configuration for HTTP server

The changes introduce a new HTTP server capability while cleaning up and improving existing code structure. The HTTP server includes authentication, session management, and websocket support.
2025-11-15 09:48:46 -03:00
6e78618b2e feat: update webview URL and frontend dist path
Changed the default webview URL from 'tables.html' to 'index.html' in main.rs to reflect the new entry point. Updated the frontend distribution path in tauri.conf.json from './web/desktop' to './web/html' to better represent the directory structure. These changes align with recent frontend reorganization.
2025-11-14 17:04:51 -03:00
73805c4a98 feat(desktop): add desktop mode support with Tauri integration
- Changed default feature to include 'desktop' in Cargo.toml
- Replaced --noui flag with --desktop flag in launch.json
- Added Tauri desktop mode implementation in main.rs
- Simplified command line argument handling
- Cleaned up code formatting in main.rs

The changes introduce a new mode for running the application as a desktop app using Tauri framework, while maintaining the existing server functionality. The desktop mode loads a webview window with a specific HTML interface.
2025-11-14 16:54:55 -03:00
3bf29777a4 feat(ui): optimize index.html structure and content
- Changed DOCTYPE to lowercase for HTML5 compliance
- Removed redundant CSS and JavaScript code
- Simplified theme variables and styling
- Improved message processing logic
- Added better event management
- Streamlined UI components

The changes focus on code cleanliness, performance improvements, and maintainability while preserving all functionality. The HTML structure is now more semantic and follows modern web standards.
2025-11-12 19:02:21 -03:00
32e1d740bc feat: remove redundant traces and update LLM server args
- Remove trace logs in compact_prompt.rs that were cluttering logs without adding value
- Simplify LLM server args in local.rs by removing redundant --reasoning-format parameter
- Add ID to float menu div in index.html for better DOM targeting
- Clean up code by removing unnecessary debug logging while maintaining functionality
2025-11-12 16:04:33 -03:00
7de29e6189 feat(automation): increase schedule field size and improve task checking
- Increased schedule field size from bpchar(12) to bpchar(20) in database schema
- Reduced task checking interval from 60s to 5s for more responsive automation
- Improved error handling for schedule parsing and execution
- Added proper error logging for automation failures
- Changed automation execution to use bot_id instead of nil UUID
- Enhanced HEAR keyword functionality (partial diff shown)
2025-11-12 15:04:04 -03:00
9c3fde5eb7 feat(bot, web): improve progress display and simplify context indicator
Use `print!` with stdout flush for smoother in-place GPU/CPU/token progress updates in the bot module. Simplify context indicator logic in the web UI by always removing visibility class to streamline behavior.
2025-11-07 10:01:05 -03:00
b614d2650a feat: add cron dependency and theme broadcast functionality
Add the `cron` crate (v0.15.0) to Cargo.toml and Cargo.lock to enable scheduling capabilities.
Introduce a new `broadcast_theme_change` helper in `src/automation/mod.rs` that parses CSV theme data and pushes JSON theme update events to all active response channels.
Clean up unused imports in the automation module and add `ConfigManager` import for future configuration handling.
Update `add-req.sh` to adjust the list of processed directories (comment out `auth`, enable `basic`, `config`, `context`, and `drive_monitor`).
These changes lay groundwork for scheduled tasks and dynamic theme updates across the application.
2025-11-05 21:10:03 -03:00
b2760113af fix(migrations, ui): remove redundant constraint check and logo click handler
Removed `IF NOT EXISTS` from the unique constraint in `system_automations` to ensure proper enforcement, and deleted the unused `floatLogo` click event listener to clean up UI behavior.
2025-11-05 15:29:01 -03:00
7493c69fec feat(announcements): add theme colors and custom logo config
Added new configuration options for theme colors (green, yellow) and a custom logo URL to enhance branding and visual customization in announcement templates.
2025-11-05 15:23:02 -03:00
741d736715 feat: update deepseek_r3 regex and add test case
Updated the regex pattern in DeepseekR3Handler to use (?s) flag for dot-matches-newline behavior when removing <think> tags. Added comprehensive test case that verifies the handler correctly processes content with multiline think tags. Also made styling changes to the web interface, though the full diff was truncated.
2025-11-05 14:28:14 -03:00
d2ba036791 feat(session): add interaction tracking and history management
Added interaction count tracking for sessions with Redis or in-memory fallback. Implemented conversation history replacement functionality to compact and update message history. The changes include:
- New AtomicUsize counter in SessionManager for interaction tracking
- increment_and_get_interaction_count method with Redis support
- replace_conversation_history to update and compact message history
- Maintains existing functionality while adding new features
2025-11-03 17:22:54 -03:00
4c279d2a19 feat: optimize suggestions and LLM server configuration
- Added duplicate filtering for suggestions in both backend (Rust) and frontend (JavaScript)
- Changed announcement summary schedule from every 15 minutes to hourly at :37
- Simplified LLM prompt for document summarization
- Updated LLM server configuration with reduced GPU layers and increased context size
- Removed memory mapping and lock settings for LLM server
- Improved HTML formatting and added missing newline at EOF
2025-11-03 13:38:55 -03:00
b5e1501454 feat: add trace logging, refactor bot streaming, add config fallback
- Added `trace!` logging in `bot_memory.rs` to record retrieved memory values for easier debugging.
- Refactored `BotOrchestrator` in `bot/mod.rs`:
  - Removed duplicate session save block and consolidated message persistence.
  - Replaced low‑level LLM streaming with a structured `UserMessage` and `stream_response` workflow, improving error handling and readability.
- Updated configuration loading in `config/mod.rs`:
  - Imported `get_default_bot` and enhanced `get_config` to fall back to the default bot configuration when the primary query fails.
  - Established a fresh DB connection for the fallback path to avoid borrowing issues.
2025-11-03 10:13:39 -03:00
b3415a3db4 feat(ui): remove redundant styles and adjust theme toggle position
- Remove redundant background and filter properties from logo-icon and assistant-avatar
- Remove redundant filter property from light theme logo-icon
- Invert assistant-avatar image in light theme for better visibility
- Move theme-toggle button further right (60px to 160px) to prevent overlap
2025-11-03 08:34:32 -03:00
a5bfda4d09 feat(automation): add LLM server readiness check and improve user session handling
- Added LLM server readiness check in AutomationService before starting tasks
- Renamed `user` parameter to `user_session` in execute_talk for clarity
- Updated BotResponse fields to use user_session data instead of hardcoded values
- Improved Redis key generation in execute_talk to use user_session fields
- Removed commented Redis code in set_current_context_keyword

The changes ensure proper initialization of automation tasks by checking LLM server availability first, and improve code clarity by using more descriptive variable names for user session data.
2025-11-02 23:54:14 -03:00
1d7d0e10c0 feat(automation): add unique constraint and refactor action execution
- Added UNIQUE constraint on system_automations (bot_id, kind, param) to prevent duplicate automations
- Refactored execute_action to accept full Automation struct instead of just param
- Simplified bot name resolution by using automation.bot_id directly
- Improved error handling in action execution with proper error propagation
- Removed redundant bot name lookup logic by leveraging existing bot_id
2025-11-02 20:57:53 -03:00
6e36384f45 feat: simplify message content in hear_talk function
Removed the redundant "I heard: " prefix from the message content in the execute_talk function. The message is now stored as-is without additional formatting, making it more straightforward and consistent with other message handling.
2025-11-02 12:28:07 -03:00
a5d3343c09 feat(ui): update design system with new theme and visual enhancements
- Replace Orbitron/Inter fonts with Space Grotesk/JetBrains Mono
- Implement new color scheme with primary, secondary, and accent variables
- Add radial gradient background with animated glow effects
- Introduce grain overlay for texture
- Redesign sidebar with improved transitions and blur effects
- Update empty state styling and remove neon effects
- Optimize layout spacing and shadows
- Streamline API call in chat initialization

The changes modernize the UI with a more cohesive design language, better visual hierarchy, and improved readability while maintaining functionality. The new theme features a dark color palette with vibrant accents and subtle textures for depth.
2025-11-02 11:13:40 -03:00
9673f41195 feat: add styled suggestion buttons and move them from messages to footer
Added new CSS classes for suggestion buttons and container, moving them from message content to footer. Removed inline styles in favor of CSS classes for better maintainability. The suggestions now appear at the top of the footer with consistent styling and hover effects.
2025-11-02 11:01:36 -03:00
9010396a87 feat(ui): improve suggestion handling and input clearing
Enhanced suggestion handling to include empty state in message selection and improved UX by:
- Clearing input field after selecting a suggestion
- Adding selected suggestion as user message to chat
- Maintaining all existing functionality while simplifying the flow

Changes ensure more intuitive user interaction with suggestions while keeping the chat interface clean.
2025-11-02 10:51:42 -03:00
888bfc859d feat: refactor Redis operations to synchronous in add_suggestion
Changed async Redis operations to synchronous in add_suggestion_keyword function. Removed unnecessary async/await and tokio::spawn since the operations are now blocking. This simplifies the code while maintaining the same functionality of storing suggestions and context state in Redis. Error handling remains robust with proper early returns.
2025-11-02 10:45:57 -03:00
acca68493f feat: simplify Redis key format and clean up code
- Remove comments from launch.json configuration
- Simplify Redis key format in set_current_context_keyword by removing context_name
- Remove unused /api/start endpoint and related session start logic
- Change log level from info to trace for config sync messages
- Add trace logging to drive_monitor module

The changes focus on code cleanup and simplification, particularly around session handling and logging. The Redis key format was simplified as the context_name was deemed unnecessary for uniqueness.
2025-11-02 07:50:57 -03:00