mirror of
https://github.com/Mail-0/Zero.git
synced 2026-07-01 08:16:28 +00:00
# Refactor Command Palette to use URL State and Improve Agent Communication ## Description This PR refactors the command palette to use URL state instead of React state, allowing for better persistence and sharing of the command palette's open state. It also improves the agent communication architecture by implementing proper RPC targets for both database and agent operations. Key changes: - Refactored command palette to use URL query parameters instead of React state - Added loading indicator for search processing - Improved empty state messaging in command palette - Fixed filter clearing when navigating between folders - Enhanced agent communication with proper RPC targets - Removed unnecessary toast notifications - Fixed type issues in sidebar labels component ## Type of Change - 🐛 Bug fix (non-breaking change which fixes an issue) - ✨ New feature (non-breaking change which adds functionality) - ⚡ Performance improvement ## Areas Affected - [x] Email Integration (Gmail, IMAP, etc.) - [x] User Interface/Experience - [x] API Endpoints ## Testing Done - [x] Manual testing performed ## Checklist - [x] I have performed a self-review of my code - [x] My changes generate no new warnings - [x] All tests pass locally ## Additional Notes The command palette now maintains its state via URL parameters, which improves the user experience when navigating between pages. The agent communication architecture has been improved to use proper RPC targets, which should make the code more maintainable and robust. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Enhanced command palette loading UI with a spinning loader icon during searches. - Added output validation for label and mail count queries to improve data reliability. - **Improvements** - Unified the command palette open state with the URL query for better navigation and consistency. - Refined search handling to prevent concurrent searches and improve performance. - Sidebar labels now only appear when an account is active for a cleaner interface. - Updated navigation UI with revised sign-in button behavior and streamlined GitHub link label. - **Bug Fixes** - Resolved issues with command palette state and filter clearing on route changes. - **Removed** - Toast notifications for clearing filters, saving searches, and deleting saved searches have been removed. - Removed the navigation bar component and Product Hunt badge from the home content. - Removed interactive sign-in button from home content, replaced with static badge. - **Developer Changes** - Updated and streamlined type definitions for user accounts and connections. - Refactored backend authentication setup to use explicit connection IDs and added RPC proxy class for mail operations. <!-- end of auto-generated comment: release notes by coderabbit.ai -->