# Refactor Agent Architecture with Driver/Agent Split
## Description
This PR refactors the agent architecture by splitting the ZeroAgent class into two separate classes: ZeroDriver and ZeroAgent. The ZeroDriver handles mail operations and database interactions, while ZeroAgent focuses on chat functionality. This separation of concerns improves code organization and maintainability.
Key changes:
- Created a new ZeroDriver class to handle mail operations and database interactions
- Modified ZeroAgent to focus on chat functionality
- Updated RPC target from AgentRpcDO to DriverRpcDO
- Fixed variable declarations from `let` to `const` in mail-display.tsx
- Updated environment configuration in wrangler.jsonc to include the new ZeroDriver class
## Type of Change
- [x] ⚡ Performance improvement
- [x] 🎨 UI/UX improvement
## Areas Affected
- [x] Email Integration (Gmail, IMAP, etc.)
- [x] Data Storage/Management
- [x] API Endpoints
- [x] Development Workflow
## Testing Done
- [x] Manual testing performed
## Security Considerations
- [x] No sensitive data is exposed
- [x] Authentication checks are in place
## Checklist
- [x] I have performed a self-review of my code
- [x] I have commented my code, particularly in complex areas
- [x] My changes generate no new warnings
## Additional Notes
This architectural change improves separation of concerns and should make the codebase more maintainable. The ZeroDriver handles all mail-related operations while ZeroAgent focuses on chat functionality, creating a cleaner division of responsibilities.
# Automatic Email Draft Generation Feature
This PR implements an automatic email draft generation feature that creates AI-powered responses when new emails are received. The system analyzes incoming emails, determines their intent, and generates contextually appropriate draft replies.
The feature includes:
- Smart filtering to skip newsletters, no-reply emails, user's own emails, and old messages
- Intent analysis to categorize emails (questions, requests, meetings, urgent matters)
- Context-aware responses using the full email thread history
- Proper draft formatting with correct recipients and subjects
- Integration with existing ThreadWorkflow after user notification
- Storage of draft references in the summary table
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
* **New Features**
* Introduced automatic draft email generation for Google provider threads, creating suggested replies based on the intent of incoming messages.
* Drafts are generated only for relevant, recent, and non-automated emails, ensuring responses are contextually appropriate.
* **Bug Fixes**
* Improved reliability by ensuring database connections remain open throughout the entire thread processing workflow.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
# READ CAREFULLY THEN REMOVE
Remove bullet points that are not relevant.
PLEASE REFRAIN FROM USING AI TO WRITE YOUR CODE AND PR DESCRIPTION. IF YOU DO USE AI TO WRITE YOUR CODE PLEASE PROVIDE A DESCRIPTION AND REVIEW IT CAREFULLY. MAKE SURE YOU UNDERSTAND THE CODE YOU ARE SUBMITTING USING AI.
- Pull requests that do not follow these guidelines will be closed without review or comment.
- If you use AI to write your PR description your pr will be close without review or comment.
- If you are unsure about anything, feel free to ask for clarification.
## Description
Please provide a clear description of your changes.
---
## Type of Change
Please delete options that are not relevant.
- [ ] 🐛 Bug fix (non-breaking change which fixes an issue)
- [ ] ✨ New feature (non-breaking change which adds functionality)
- [ ] 💥 Breaking change (fix or feature with breaking changes)
- [ ] 📝 Documentation update
- [ ] 🎨 UI/UX improvement
- [ ] 🔒 Security enhancement
- [ ] ⚡ Performance improvement
## Areas Affected
Please check all that apply:
- [ ] Email Integration (Gmail, IMAP, etc.)
- [ ] User Interface/Experience
- [ ] Authentication/Authorization
- [ ] Data Storage/Management
- [ ] API Endpoints
- [ ] Documentation
- [ ] Testing Infrastructure
- [ ] Development Workflow
- [ ] Deployment/Infrastructure
## Testing Done
Describe the tests you've done:
- [ ] Unit tests added/updated
- [ ] Integration tests added/updated
- [ ] Manual testing performed
- [ ] Cross-browser testing (if UI changes)
- [ ] Mobile responsiveness verified (if UI changes)
## Security Considerations
For changes involving data or authentication:
- [ ] No sensitive data is exposed
- [ ] Authentication checks are in place
- [ ] Input validation is implemented
- [ ] Rate limiting is considered (if applicable)
## Checklist
- [ ] I have read the [CONTRIBUTING](https://github.com/Mail-0/Zero/blob/staging/.github/CONTRIBUTING.md) document
- [ ] My code follows the project's style guidelines
- [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in complex areas
- [ ] I have updated the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix/feature works
- [ ] All tests pass locally
- [ ] Any dependent changes are merged and published
## Additional Notes
Add any other context about the pull request here.
## Screenshots/Recordings
Add screenshots or recordings here if applicable.
---
_By submitting this pull request, I confirm that my contribution is made under the terms of the project's license._
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Updated wrangler.jsonc to remove the DurableMailbox class from deployment configurations to fix deployment issues.
<!-- End of auto-generated description by cubic. -->
# READ CAREFULLY THEN REMOVE
Remove bullet points that are not relevant.
PLEASE REFRAIN FROM USING AI TO WRITE YOUR CODE AND PR DESCRIPTION. IF YOU DO USE AI TO WRITE YOUR CODE PLEASE PROVIDE A DESCRIPTION AND REVIEW IT CAREFULLY. MAKE SURE YOU UNDERSTAND THE CODE YOU ARE SUBMITTING USING AI.
- Pull requests that do not follow these guidelines will be closed without review or comment.
- If you use AI to write your PR description your pr will be close without review or comment.
- If you are unsure about anything, feel free to ask for clarification.
## Description
Please provide a clear description of your changes.
---
## Type of Change
Please delete options that are not relevant.
- [ ] 🐛 Bug fix (non-breaking change which fixes an issue)
- [ ] ✨ New feature (non-breaking change which adds functionality)
- [ ] 💥 Breaking change (fix or feature with breaking changes)
- [ ] 📝 Documentation update
- [ ] 🎨 UI/UX improvement
- [ ] 🔒 Security enhancement
- [ ] ⚡ Performance improvement
## Areas Affected
Please check all that apply:
- [ ] Email Integration (Gmail, IMAP, etc.)
- [ ] User Interface/Experience
- [ ] Authentication/Authorization
- [ ] Data Storage/Management
- [ ] API Endpoints
- [ ] Documentation
- [ ] Testing Infrastructure
- [ ] Development Workflow
- [ ] Deployment/Infrastructure
## Testing Done
Describe the tests you've done:
- [ ] Unit tests added/updated
- [ ] Integration tests added/updated
- [ ] Manual testing performed
- [ ] Cross-browser testing (if UI changes)
- [ ] Mobile responsiveness verified (if UI changes)
## Security Considerations
For changes involving data or authentication:
- [ ] No sensitive data is exposed
- [ ] Authentication checks are in place
- [ ] Input validation is implemented
- [ ] Rate limiting is considered (if applicable)
## Checklist
- [ ] I have read the [CONTRIBUTING](https://github.com/Mail-0/Zero/blob/staging/.github/CONTRIBUTING.md) document
- [ ] My code follows the project's style guidelines
- [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in complex areas
- [ ] I have updated the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix/feature works
- [ ] All tests pass locally
- [ ] Any dependent changes are merged and published
## Additional Notes
Add any other context about the pull request here.
## Screenshots/Recordings
Add screenshots or recordings here if applicable.
---
_By submitting this pull request, I confirm that my contribution is made under the terms of the project's license._
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Fixed type errors and updated function signatures in server routes and effects to resolve hotfix issues. Removed an unused import in the mail UI navigation component.
- **Bug Fixes**
- Updated `syncThread` to accept an object with `threadId` for consistency.
- Fixed type parameters in `ZeroMCP` class.
- Removed unused constructor and import statements.
<!-- End of auto-generated description by cubic. -->
# Improved Attachment Handling and UI Refinements
## Description
This PR improves email attachment handling by implementing on-demand attachment fetching and enhancing error handling. It also includes several UI refinements to the email composer and navigation components.
Key changes:
- Added a dedicated hook and API endpoint for fetching message attachments
- Improved error handling with user-facing toast notifications for attachment operations
- Updated the email composer to hide subject input when replying to messages
- Enhanced styling for compose button, categories dropdown, and search bar
- Fixed attachment loading issues by fetching data on demand instead of storing large attachment data
## Type of Change
- [x] 🐛 Bug fix (non-breaking change which fixes an issue)
- [x] ✨ New feature (non-breaking change which adds functionality)
- [x] 🎨 UI/UX improvement
- [x] ⚡ Performance improvement
## Areas Affected
- [x] Email Integration (Gmail, IMAP, etc.)
- [x] User Interface/Experience
- [x] Data Storage/Management
- [x] API Endpoints
## Testing Done
- [x] Manual testing performed
## Security Considerations
- [x] No sensitive data is exposed
- [x] Input validation is implemented
## Checklist
- [x] I have performed a self-review of my code
- [x] My changes generate no new warnings
## Additional Notes
The attachment handling improvements should resolve issues where large attachments were causing performance problems or failing to load properly. The UI refinements provide a more consistent experience across the application.
Hey team,
[**Lingo.dev**](https://lingo.dev) here with fresh translations!
### In this update
- Added missing translations
- Performed brand voice, context and glossary checks
- Enhanced translations using Lingo.dev Localization Engine
### Next Steps
- [ ] Review the changes
- [ ] Merge when ready
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Updated translations for 20 languages in the mail app, adding missing entries and improving pluralization handling for attachment, file, note, and reply counts. This makes the translation files more consistent and easier to maintain.
<!-- End of auto-generated description by cubic. -->
# READ CAREFULLY THEN REMOVE
Remove bullet points that are not relevant.
PLEASE REFRAIN FROM USING AI TO WRITE YOUR CODE AND PR DESCRIPTION. IF YOU DO USE AI TO WRITE YOUR CODE PLEASE PROVIDE A DESCRIPTION AND REVIEW IT CAREFULLY. MAKE SURE YOU UNDERSTAND THE CODE YOU ARE SUBMITTING USING AI.
- Pull requests that do not follow these guidelines will be closed without review or comment.
- If you use AI to write your PR description your pr will be close without review or comment.
- If you are unsure about anything, feel free to ask for clarification.
## Description
Please provide a clear description of your changes.
---
## Type of Change
Please delete options that are not relevant.
- [ ] 🐛 Bug fix (non-breaking change which fixes an issue)
- [ ] ✨ New feature (non-breaking change which adds functionality)
- [ ] 💥 Breaking change (fix or feature with breaking changes)
- [ ] 📝 Documentation update
- [ ] 🎨 UI/UX improvement
- [ ] 🔒 Security enhancement
- [ ] ⚡ Performance improvement
## Areas Affected
Please check all that apply:
- [ ] Email Integration (Gmail, IMAP, etc.)
- [ ] User Interface/Experience
- [ ] Authentication/Authorization
- [ ] Data Storage/Management
- [ ] API Endpoints
- [ ] Documentation
- [ ] Testing Infrastructure
- [ ] Development Workflow
- [ ] Deployment/Infrastructure
## Testing Done
Describe the tests you've done:
- [ ] Unit tests added/updated
- [ ] Integration tests added/updated
- [ ] Manual testing performed
- [ ] Cross-browser testing (if UI changes)
- [ ] Mobile responsiveness verified (if UI changes)
## Security Considerations
For changes involving data or authentication:
- [ ] No sensitive data is exposed
- [ ] Authentication checks are in place
- [ ] Input validation is implemented
- [ ] Rate limiting is considered (if applicable)
## Checklist
- [ ] I have read the [CONTRIBUTING](https://github.com/Mail-0/Zero/blob/staging/.github/CONTRIBUTING.md) document
- [ ] My code follows the project's style guidelines
- [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in complex areas
- [ ] I have updated the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix/feature works
- [ ] All tests pass locally
- [ ] Any dependent changes are merged and published
## Additional Notes
Add any other context about the pull request here.
## Screenshots/Recordings
Add screenshots or recordings here if applicable.
---
_By submitting this pull request, I confirm that my contribution is made under the terms of the project's license._
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Disabled the thread sync loop and reduced the max thread sync count from 40 to 20 in the staging environment to limit background processing.
<!-- End of auto-generated description by cubic. -->
# READ CAREFULLY THEN REMOVE
Remove bullet points that are not relevant.
PLEASE REFRAIN FROM USING AI TO WRITE YOUR CODE AND PR DESCRIPTION. IF YOU DO USE AI TO WRITE YOUR CODE PLEASE PROVIDE A DESCRIPTION AND REVIEW IT CAREFULLY. MAKE SURE YOU UNDERSTAND THE CODE YOU ARE SUBMITTING USING AI.
- Pull requests that do not follow these guidelines will be closed without review or comment.
- If you use AI to write your PR description your pr will be close without review or comment.
- If you are unsure about anything, feel free to ask for clarification.
## Description
Please provide a clear description of your changes.
---
## Type of Change
Please delete options that are not relevant.
- [ ] 🐛 Bug fix (non-breaking change which fixes an issue)
- [ ] ✨ New feature (non-breaking change which adds functionality)
- [ ] 💥 Breaking change (fix or feature with breaking changes)
- [ ] 📝 Documentation update
- [ ] 🎨 UI/UX improvement
- [ ] 🔒 Security enhancement
- [ ] ⚡ Performance improvement
## Areas Affected
Please check all that apply:
- [ ] Email Integration (Gmail, IMAP, etc.)
- [ ] User Interface/Experience
- [ ] Authentication/Authorization
- [ ] Data Storage/Management
- [ ] API Endpoints
- [ ] Documentation
- [ ] Testing Infrastructure
- [ ] Development Workflow
- [ ] Deployment/Infrastructure
## Testing Done
Describe the tests you've done:
- [ ] Unit tests added/updated
- [ ] Integration tests added/updated
- [ ] Manual testing performed
- [ ] Cross-browser testing (if UI changes)
- [ ] Mobile responsiveness verified (if UI changes)
## Security Considerations
For changes involving data or authentication:
- [ ] No sensitive data is exposed
- [ ] Authentication checks are in place
- [ ] Input validation is implemented
- [ ] Rate limiting is considered (if applicable)
## Checklist
- [ ] I have read the [CONTRIBUTING](https://github.com/Mail-0/Zero/blob/staging/.github/CONTRIBUTING.md) document
- [ ] My code follows the project's style guidelines
- [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in complex areas
- [ ] I have updated the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix/feature works
- [ ] All tests pass locally
- [ ] Any dependent changes are merged and published
## Additional Notes
Add any other context about the pull request here.
## Screenshots/Recordings
Add screenshots or recordings here if applicable.
---
_By submitting this pull request, I confirm that my contribution is made under the terms of the project's license._
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Cleaned up JSON formatting for pluralization rules and added the "Open in new tab" label to support deployment.
<!-- End of auto-generated description by cubic. -->
# READ CAREFULLY THEN REMOVE
Remove bullet points that are not relevant.
PLEASE REFRAIN FROM USING AI TO WRITE YOUR CODE AND PR DESCRIPTION. IF YOU DO USE AI TO WRITE YOUR CODE PLEASE PROVIDE A DESCRIPTION AND REVIEW IT CAREFULLY. MAKE SURE YOU UNDERSTAND THE CODE YOU ARE SUBMITTING USING AI.
- Pull requests that do not follow these guidelines will be closed without review or comment.
- If you use AI to write your PR description your pr will be close without review or comment.
- If you are unsure about anything, feel free to ask for clarification.
## Description
Please provide a clear description of your changes.
---
## Type of Change
Please delete options that are not relevant.
- [ ] 🐛 Bug fix (non-breaking change which fixes an issue)
- [ ] ✨ New feature (non-breaking change which adds functionality)
- [ ] 💥 Breaking change (fix or feature with breaking changes)
- [ ] 📝 Documentation update
- [ ] 🎨 UI/UX improvement
- [ ] 🔒 Security enhancement
- [ ] ⚡ Performance improvement
## Areas Affected
Please check all that apply:
- [ ] Email Integration (Gmail, IMAP, etc.)
- [ ] User Interface/Experience
- [ ] Authentication/Authorization
- [ ] Data Storage/Management
- [ ] API Endpoints
- [ ] Documentation
- [ ] Testing Infrastructure
- [ ] Development Workflow
- [ ] Deployment/Infrastructure
## Testing Done
Describe the tests you've done:
- [ ] Unit tests added/updated
- [ ] Integration tests added/updated
- [ ] Manual testing performed
- [ ] Cross-browser testing (if UI changes)
- [ ] Mobile responsiveness verified (if UI changes)
## Security Considerations
For changes involving data or authentication:
- [ ] No sensitive data is exposed
- [ ] Authentication checks are in place
- [ ] Input validation is implemented
- [ ] Rate limiting is considered (if applicable)
## Checklist
- [ ] I have read the [CONTRIBUTING](https://github.com/Mail-0/Zero/blob/staging/.github/CONTRIBUTING.md) document
- [ ] My code follows the project's style guidelines
- [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in complex areas
- [ ] I have updated the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix/feature works
- [ ] All tests pass locally
- [ ] Any dependent changes are merged and published
## Additional Notes
Add any other context about the pull request here.
## Screenshots/Recordings
Add screenshots or recordings here if applicable.
---
_By submitting this pull request, I confirm that my contribution is made under the terms of the project's license._
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Updated pluralization logic for attachment, file, note, and reply counts across all supported languages in the mail app translation files. This improves accuracy and consistency for count-based labels in different languages.
<!-- End of auto-generated description by cubic. -->
# Add email sequence templates for user onboarding and feature announcements
## Description
Added a new set of React Email templates for our email sequence system. These templates include:
- Welcome email for new signups
- Mail0 Pro introduction (day 1)
- Auto-labeling feature announcement (day 2)
- AI Writing Assistant introduction (day 3)
- Keyboard shortcuts guide (day 4)
- Categories feature announcement (day 5)
- Super Search feature announcement (day 6)
- Pro subscription welcome email
- Cancellation follow-up email
All emails maintain consistent styling with personalization options and clear calls-to-action, including calendar booking links with gift card incentives for user feedback.
## Type of Change
- [x] ✨ New feature (non-breaking change which adds functionality)
- [x] 🎨 UI/UX improvement
## Areas Affected
- [x] Email Integration (Gmail, IMAP, etc.)
- [x] User Interface/Experience
## Testing Done
- [x] Manual testing performed
## Checklist
- [x] I have performed a self-review of my code
- [x] I have commented my code, particularly in complex areas
- [x] My changes generate no new warnings
## Additional Notes
These email templates use React Email components for consistent rendering across email clients. Each template includes preview text and responsive styling with a clean, professional design that matches our brand voice.
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
* **New Features**
* Introduced a series of personalized email templates for various user engagement stages, including welcome, feature announcements, upgrade prompts, and cancellation notices.
* Each email highlights product features, benefits, and includes invitations to book calls with incentives.
* Emails are designed with consistent styling and support personalized greetings.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Description
Integrated Dub Analytics into the application to track user interactions and improve analytics capabilities. This PR adds the Dub Analytics component to the mail application layout and configures the analytics plugin in the authentication system.
---
## Type of Change
- [x] ✨ New feature (non-breaking change which adds functionality)
- [x] ⚡ Performance improvement
## Areas Affected
- [x] Authentication/Authorization
- [x] User Interface/Experience
- [x] Data Storage/Management
## Testing Done
- [x] Manual testing performed
## Security Considerations
- [x] No sensitive data is exposed
- [x] Authentication checks are in place
## Checklist
- [x] I have performed a self-review of my code
- [x] My changes generate no new warnings
- [x] I have updated the documentation
## Additional Notes
The Dub Analytics integration provides better insights into user behavior while maintaining privacy standards. The implementation includes:
1. Added Dub Analytics component to the mail application layout with domain configuration
2. Integrated Dub analytics plugin into the authentication system
3. Added required dependencies (@dub/analytics, @dub/better-auth, and dub) to the project
Hey team,
[**Lingo.dev**](https://lingo.dev) here with fresh translations!
### In this update
- Added missing translations
- Performed brand voice, context and glossary checks
- Enhanced translations using Lingo.dev Localization Engine
### Next Steps
- [ ] Review the changes
- [ ] Merge when ready
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Updated translations for all supported languages in the mail app to add missing phrases, improve consistency, and align with brand voice.
- **Dependencies**
- Updated i18n.lock to reflect new and changed translation keys.
<!-- End of auto-generated description by cubic. -->
# Gmail Search Query Builder and MCP Tool Registration Improvements
## Description
This PR adds a dedicated Gmail search query builder tool and improves the Model Context Protocol (MCP) agent implementation. The changes include:
1. Added a new `BuildGmailSearchQuery` tool that leverages AI to help users construct effective Gmail search queries
2. Migrated MCP agent tools to use the newer `registerTool` method with proper descriptions and input schemas
3. Added initial message handling for AI sidebar component
4. Reduced thread sync max count from 40 to 5 to improve performance during development
## Type of Change
- [x] ✨ New feature (non-breaking change which adds functionality)
- [x] ⚡ 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
## Additional Notes
The Gmail search query builder tool helps users construct more effective search queries by translating natural language requests into Gmail's search syntax. This should improve the user experience when trying to find specific emails.
The MCP tool registration improvements provide better documentation and type safety for the available tools.
# READ CAREFULLY THEN REMOVE
Remove bullet points that are not relevant.
PLEASE REFRAIN FROM USING AI TO WRITE YOUR CODE AND PR DESCRIPTION. IF YOU DO USE AI TO WRITE YOUR CODE PLEASE PROVIDE A DESCRIPTION AND REVIEW IT CAREFULLY. MAKE SURE YOU UNDERSTAND THE CODE YOU ARE SUBMITTING USING AI.
- Pull requests that do not follow these guidelines will be closed without review or comment.
- If you use AI to write your PR description your pr will be close without review or comment.
- If you are unsure about anything, feel free to ask for clarification.
## Description
Please provide a clear description of your changes.
---
## Type of Change
Please delete options that are not relevant.
- [ ] 🐛 Bug fix (non-breaking change which fixes an issue)
- [ ] ✨ New feature (non-breaking change which adds functionality)
- [ ] 💥 Breaking change (fix or feature with breaking changes)
- [ ] 📝 Documentation update
- [ ] 🎨 UI/UX improvement
- [ ] 🔒 Security enhancement
- [ ] ⚡ Performance improvement
## Areas Affected
Please check all that apply:
- [ ] Email Integration (Gmail, IMAP, etc.)
- [ ] User Interface/Experience
- [ ] Authentication/Authorization
- [ ] Data Storage/Management
- [ ] API Endpoints
- [ ] Documentation
- [ ] Testing Infrastructure
- [ ] Development Workflow
- [ ] Deployment/Infrastructure
## Testing Done
Describe the tests you've done:
- [ ] Unit tests added/updated
- [ ] Integration tests added/updated
- [ ] Manual testing performed
- [ ] Cross-browser testing (if UI changes)
- [ ] Mobile responsiveness verified (if UI changes)
## Security Considerations
For changes involving data or authentication:
- [ ] No sensitive data is exposed
- [ ] Authentication checks are in place
- [ ] Input validation is implemented
- [ ] Rate limiting is considered (if applicable)
## Checklist
- [ ] I have read the [CONTRIBUTING](https://github.com/Mail-0/Zero/blob/staging/.github/CONTRIBUTING.md) document
- [ ] My code follows the project's style guidelines
- [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in complex areas
- [ ] I have updated the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix/feature works
- [ ] All tests pass locally
- [ ] Any dependent changes are merged and published
## Additional Notes
Add any other context about the pull request here.
## Screenshots/Recordings
Add screenshots or recordings here if applicable.
---
_By submitting this pull request, I confirm that my contribution is made under the terms of the project's license._
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Added a Privacy link to the navigation menu and updated language files for improved privacy labeling and consistency across all supported languages.
<!-- End of auto-generated description by cubic. -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
* **New Features**
* Added a "Privacy" menu item to both desktop and mobile navigation in the mail app.
* **Style**
* Increased the maximum width of the desktop navigation header and adjusted padding for improved layout.
* Updated responsive breakpoints for navigation visibility to enhance display across devices.
* **Localization**
* Simplified the search placeholder text in the command palette across all supported languages.
* Reformatted pluralization entries for better readability in localization files.
* Standardized pluralization placeholders for notes and replies, replacing variable placeholders with a "#" symbol.
* Removed the "Open in New Tab" translation key from all language files.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
# Keyboard Layout Detection and Mapping for Shortcuts
## Description
Added keyboard layout detection and mapping to ensure keyboard shortcuts work correctly across different keyboard layouts. The implementation supports QWERTY, Dvorak, Colemak, AZERTY, and QWERTZ layouts, with automatic detection based on browser APIs and fallback methods. Also added a keyboard layout indicator component to show the current detected layout in the UI.
## Type of Change
- ✨ New feature (non-breaking change which adds functionality)
- 🎨 UI/UX improvement
- ⚡ Performance improvement
## Areas Affected
- [x] User Interface/Experience
## Testing Done
- [x] Manual testing performed
- [x] Cross-browser testing (if UI changes)
## Checklist
- [x] I have performed a self-review of my code
- [x] I have commented my code, particularly in complex areas
- [x] My changes generate no new warnings
## Additional Notes
The implementation uses the KeyboardLayoutMap API when available, with fallbacks to language detection and predefined mappings. The keyboard layout indicator only appears when a non-QWERTY layout is detected.
Also includes some code quality improvements:
- Enhanced error handling in Gmail API interactions
- Simplified optimistic action refresh logic
- Improved rate limit handling on the server side
## Screenshots/Recordings
N/A
---
_By submitting this pull request, I confirm that my contribution is made under the terms of the project's license._
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
* **New Features**
* Added dynamic keyboard layout detection and mapping, supporting QWERTY, Dvorak, Colemak, Azerty, and QWERTZ.
* Introduced a keyboard layout indicator to display the current layout in the mail app.
* Enhanced keyboard shortcuts to display and map keys according to the detected keyboard layout.
* Added a utility to convert key names to keyboard event codes for consistent shortcut handling.
* **Refactor**
* Updated keyboard shortcut handling throughout the mail app to use layout-aware shortcuts.
* Simplified optimistic action refresh logic and removed unused parameters.
* Refactored internal retry logic for server-side Gmail API calls.
* Replaced promise handling with Effect abstractions in server thread label modifications.
* **Style**
* Cleaned up whitespace and reordered import statements in several components.
* **Chores**
* Added additional logging for debugging and removed unnecessary log statements.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Description
Added specific styling to the BimiAvatar component in the mail display to ensure consistent sizing and proper vertical alignment. The avatar now has a fixed height and width of 8 units and a top margin of 3 units.
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
* **Style**
* Updated the avatar in mail display with improved spacing and consistent sizing for a more polished appearance.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Description
Refactored the AI chat component and email assistant to improve performance, reliability, and user experience. This PR introduces a new `inboxRag` tool for natural language email search, replaces the previous `listThreads` implementation, and enhances the prompt design for more efficient inbox management.
---
## Type of Change
- ✨ 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
## Additional Notes
Key improvements:
- Added `ThreadPreview` component to replace the previous thread rendering approach
- Refactored `ToolResponse` to use specialized subcomponents for different tool types
- Updated AI prompts with better instructions for multi-step and parallel operations
- Switched backend models to Claude 3.5 for improved reasoning capabilities
- Fixed key prop issues in attachment rendering to prevent React warnings
- Increased agent max steps from 5 to 10 for more complex operations
- Added better markdown styling support for lists and other elements
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
* **New Features**
* Introduced advanced AI-powered inbox search and organization with new tools and richer assistant guidance.
* Added support for Anthropic AI models for chat and search tasks.
* Enabled new streaming tool for natural language inbox search.
* **Improvements**
* Enhanced AI assistant prompt with detailed instructions, expanded use cases, and improved communication style.
* Modularized and streamlined AI chat component for clearer tool response rendering and better markdown styling.
* Increased chat step limit in the AI sidebar for longer conversations.
* Improved uniqueness of attachment keys to prevent display issues.
* **Bug Fixes**
* Corrected parameter naming for thread and draft listing to ensure accurate pagination.
* **Chores**
* Updated dependencies and environment variables for improved configuration and model support.
* Cleaned up unused code and imports for better maintainability.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Hey team,
[**Lingo.dev**](https://lingo.dev) here with fresh translations!
### In this update
- Added missing translations
- Performed brand voice, context and glossary checks
- Enhanced translations using Lingo.dev Localization Engine
### Next Steps
- [ ] Review the changes
- [ ] Merge when ready
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Updated translations for all supported languages in the mail app to improve clarity and consistency, including better pluralization and more accurate search placeholders.
<!-- End of auto-generated description by cubic. -->
# Email Content Prefetching and Processing Optimization
## Description
This PR improves email loading performance by implementing prefetching and caching of processed email HTML content. It splits the email processing logic into two parts:
1. Server-side preprocessing that handles sanitization and structure
2. Client-side processing that applies theme-specific styling and image loading preferences
The changes also add prefetching of the latest message in a thread to improve perceived loading speed when users open emails.
---
## Type of Change
- [x] ⚡ Performance improvement
- [x] 🎨 UI/UX improvement
## Areas Affected
- [x] Email Integration (Gmail, IMAP, etc.)
- [x] User Interface/Experience
- [x] Performance Optimization
## Testing Done
- [x] Manual testing performed
- [x] Cross-browser testing (if UI changes)
## Checklist
- [x] I have performed a self-review of my code
- [x] My changes generate no new warnings
- [x] My code follows the project's style guidelines
## Additional Notes
The email processing logic has been refactored to:
1. Separate heavy sanitization work (which can be done once) from theme/preference application
2. Cache processed content with a 30-minute stale time and 1-hour garbage collection time
3. Respect user preferences for external image loading and trusted senders
4. Apply theme-specific styling based on user settings or system preference
This should significantly improve the perceived performance when opening emails, especially for threads with complex HTML content.
---
_By submitting this pull request, I confirm that my contribution is made under the terms of the project's license._
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
* **New Features**
* Improved email thread view by displaying the latest non-draft message.
* Enhanced email content processing to apply user settings and theme preferences, including external image loading and dark/light mode support.
* **Bug Fixes**
* More accurate handling of external images and theme styling in emails based on user preferences.
* **Chores**
* Updated internal configuration for local development environment.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
# Prevent users from deleting their last connection
## Description
Added a validation check before deleting a connection to ensure users always maintain at least one connection. The system now throws an error if a user attempts to delete their last remaining connection.
---
## Type of Change
- [x] 🐛 Bug fix (non-breaking change which fixes an issue)
## Areas Affected
- [x] Data Storage/Management
- [x] API Endpoints
## Testing Done
- [x] Manual testing performed
## Security Considerations
- [x] No sensitive data is exposed
- [x] Input validation is implemented
## Checklist
- [x] I have performed a self-review of my code
- [x] My changes generate no new warnings
## Additional Notes
This change prevents users from getting into a state where they have no connections, which could lead to unexpected behavior in the application.
---
_By submitting this pull request, I confirm that my contribution is made under the terms of the project's license._
# Refactor Google Mail Manager quota user handling
## Description
Added a new `getQuotaUser()` method to the GoogleMailManager class that combines the user's email with the current environment (`NODE_ENV`). Updated all Google API calls to use this method instead of directly using the email as the quota user.
This change helps prevent quota limit issues by creating environment-specific quota user identifiers, which is particularly useful when running multiple environments (development, staging, production) with the same Google account.
---
## Type of Change
- [x] ⚡ Performance improvement
## Areas Affected
- [x] Email Integration (Gmail, IMAP, etc.)
## Testing Done
- [x] Manual testing performed
## Checklist
- [x] I have performed a self-review of my code
- [x] My changes generate no new warnings
## Additional Notes
This change helps prevent hitting Google API quota limits by differentiating quota usage across different environments.
---
_By submitting this pull request, I confirm that my contribution is made under the terms of the project's license._
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
* **Refactor**
* Improved handling of user identification for Gmail API requests to enhance consistency across different environments.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
# READ CAREFULLY THEN REMOVE
Remove bullet points that are not relevant.
PLEASE REFRAIN FROM USING AI TO WRITE YOUR CODE AND PR DESCRIPTION. IF YOU DO USE AI TO WRITE YOUR CODE PLEASE PROVIDE A DESCRIPTION AND REVIEW IT CAREFULLY. MAKE SURE YOU UNDERSTAND THE CODE YOU ARE SUBMITTING USING AI.
- Pull requests that do not follow these guidelines will be closed without review or comment.
- If you use AI to write your PR description your pr will be close without review or comment.
- If you are unsure about anything, feel free to ask for clarification.
## Description
Please provide a clear description of your changes.
---
## Type of Change
Please delete options that are not relevant.
- [ ] 🐛 Bug fix (non-breaking change which fixes an issue)
- [ ] ✨ New feature (non-breaking change which adds functionality)
- [ ] 💥 Breaking change (fix or feature with breaking changes)
- [ ] 📝 Documentation update
- [ ] 🎨 UI/UX improvement
- [ ] 🔒 Security enhancement
- [ ] ⚡ Performance improvement
## Areas Affected
Please check all that apply:
- [ ] Email Integration (Gmail, IMAP, etc.)
- [ ] User Interface/Experience
- [ ] Authentication/Authorization
- [ ] Data Storage/Management
- [ ] API Endpoints
- [ ] Documentation
- [ ] Testing Infrastructure
- [ ] Development Workflow
- [ ] Deployment/Infrastructure
## Testing Done
Describe the tests you've done:
- [ ] Unit tests added/updated
- [ ] Integration tests added/updated
- [ ] Manual testing performed
- [ ] Cross-browser testing (if UI changes)
- [ ] Mobile responsiveness verified (if UI changes)
## Security Considerations
For changes involving data or authentication:
- [ ] No sensitive data is exposed
- [ ] Authentication checks are in place
- [ ] Input validation is implemented
- [ ] Rate limiting is considered (if applicable)
## Checklist
- [ ] I have read the [CONTRIBUTING](https://github.com/Mail-0/Zero/blob/staging/.github/CONTRIBUTING.md) document
- [ ] My code follows the project's style guidelines
- [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in complex areas
- [ ] I have updated the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix/feature works
- [ ] All tests pass locally
- [ ] Any dependent changes are merged and published
## Additional Notes
Add any other context about the pull request here.
## Screenshots/Recordings
Add screenshots or recordings here if applicable.
---
_By submitting this pull request, I confirm that my contribution is made under the terms of the project's license._
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Fixed deployment issues by updating concurrency settings, improving Gmail API calls, and adjusting wrangler configuration for new classes.
- **Bug Fixes**
- Set thread processing concurrency to 1 to prevent overload.
- Improved Gmail API label and thread fetching logic.
- Added delay in thread syncing to reduce rate limit errors.
- **Dependencies**
- Updated wrangler.jsonc to register new SQLite classes for deployment.
<!-- End of auto-generated description by cubic. -->
# READ CAREFULLY THEN REMOVE
Remove bullet points that are not relevant.
PLEASE REFRAIN FROM USING AI TO WRITE YOUR CODE AND PR DESCRIPTION. IF YOU DO USE AI TO WRITE YOUR CODE PLEASE PROVIDE A DESCRIPTION AND REVIEW IT CAREFULLY. MAKE SURE YOU UNDERSTAND THE CODE YOU ARE SUBMITTING USING AI.
- Pull requests that do not follow these guidelines will be closed without review or comment.
- If you use AI to write your PR description your pr will be close without review or comment.
- If you are unsure about anything, feel free to ask for clarification.
## Description
Please provide a clear description of your changes.
---
## Type of Change
Please delete options that are not relevant.
- [ ] 🐛 Bug fix (non-breaking change which fixes an issue)
- [ ] ✨ New feature (non-breaking change which adds functionality)
- [ ] 💥 Breaking change (fix or feature with breaking changes)
- [ ] 📝 Documentation update
- [ ] 🎨 UI/UX improvement
- [ ] 🔒 Security enhancement
- [ ] ⚡ Performance improvement
## Areas Affected
Please check all that apply:
- [ ] Email Integration (Gmail, IMAP, etc.)
- [ ] User Interface/Experience
- [ ] Authentication/Authorization
- [ ] Data Storage/Management
- [ ] API Endpoints
- [ ] Documentation
- [ ] Testing Infrastructure
- [ ] Development Workflow
- [ ] Deployment/Infrastructure
## Testing Done
Describe the tests you've done:
- [ ] Unit tests added/updated
- [ ] Integration tests added/updated
- [ ] Manual testing performed
- [ ] Cross-browser testing (if UI changes)
- [ ] Mobile responsiveness verified (if UI changes)
## Security Considerations
For changes involving data or authentication:
- [ ] No sensitive data is exposed
- [ ] Authentication checks are in place
- [ ] Input validation is implemented
- [ ] Rate limiting is considered (if applicable)
## Checklist
- [ ] I have read the [CONTRIBUTING](https://github.com/Mail-0/Zero/blob/staging/.github/CONTRIBUTING.md) document
- [ ] My code follows the project's style guidelines
- [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in complex areas
- [ ] I have updated the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix/feature works
- [ ] All tests pass locally
- [ ] Any dependent changes are merged and published
## Additional Notes
Add any other context about the pull request here.
## Screenshots/Recordings
Add screenshots or recordings here if applicable.
---
_By submitting this pull request, I confirm that my contribution is made under the terms of the project's license._
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Removed the v4 migration steps for the ZeroAgent class from wrangler.jsonc to prevent unnecessary migrations.
<!-- End of auto-generated description by cubic. -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
* **Bug Fixes**
* Improved label filtering in the mail app to display only relevant system labels with normalized names.
* **Chores**
* Updated migration configuration by removing an obsolete migration step related to database classes.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
# READ CAREFULLY THEN REMOVE
Remove bullet points that are not relevant.
PLEASE REFRAIN FROM USING AI TO WRITE YOUR CODE AND PR DESCRIPTION. IF YOU DO USE AI TO WRITE YOUR CODE PLEASE PROVIDE A DESCRIPTION AND REVIEW IT CAREFULLY. MAKE SURE YOU UNDERSTAND THE CODE YOU ARE SUBMITTING USING AI.
- Pull requests that do not follow these guidelines will be closed without review or comment.
- If you use AI to write your PR description your pr will be close without review or comment.
- If you are unsure about anything, feel free to ask for clarification.
## Description
Please provide a clear description of your changes.
---
## Type of Change
Please delete options that are not relevant.
- [ ] 🐛 Bug fix (non-breaking change which fixes an issue)
- [ ] ✨ New feature (non-breaking change which adds functionality)
- [ ] 💥 Breaking change (fix or feature with breaking changes)
- [ ] 📝 Documentation update
- [ ] 🎨 UI/UX improvement
- [ ] 🔒 Security enhancement
- [ ] ⚡ Performance improvement
## Areas Affected
Please check all that apply:
- [ ] Email Integration (Gmail, IMAP, etc.)
- [ ] User Interface/Experience
- [ ] Authentication/Authorization
- [ ] Data Storage/Management
- [ ] API Endpoints
- [ ] Documentation
- [ ] Testing Infrastructure
- [ ] Development Workflow
- [ ] Deployment/Infrastructure
## Testing Done
Describe the tests you've done:
- [ ] Unit tests added/updated
- [ ] Integration tests added/updated
- [ ] Manual testing performed
- [ ] Cross-browser testing (if UI changes)
- [ ] Mobile responsiveness verified (if UI changes)
## Security Considerations
For changes involving data or authentication:
- [ ] No sensitive data is exposed
- [ ] Authentication checks are in place
- [ ] Input validation is implemented
- [ ] Rate limiting is considered (if applicable)
## Checklist
- [ ] I have read the [CONTRIBUTING](https://github.com/Mail-0/Zero/blob/staging/.github/CONTRIBUTING.md) document
- [ ] My code follows the project's style guidelines
- [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in complex areas
- [ ] I have updated the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix/feature works
- [ ] All tests pass locally
- [ ] Any dependent changes are merged and published
## Additional Notes
Add any other context about the pull request here.
## Screenshots/Recordings
Add screenshots or recordings here if applicable.
---
_By submitting this pull request, I confirm that my contribution is made under the terms of the project's license._
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Added the ZeroAgent class to the v4 migration in wrangler.jsonc to support new SQLite features in deployment.
<!-- End of auto-generated description by cubic. -->
# READ CAREFULLY THEN REMOVE
Remove bullet points that are not relevant.
PLEASE REFRAIN FROM USING AI TO WRITE YOUR CODE AND PR DESCRIPTION. IF YOU DO USE AI TO WRITE YOUR CODE PLEASE PROVIDE A DESCRIPTION AND REVIEW IT CAREFULLY. MAKE SURE YOU UNDERSTAND THE CODE YOU ARE SUBMITTING USING AI.
- Pull requests that do not follow these guidelines will be closed without review or comment.
- If you use AI to write your PR description your pr will be close without review or comment.
- If you are unsure about anything, feel free to ask for clarification.
## Description
Please provide a clear description of your changes.
---
## Type of Change
Please delete options that are not relevant.
- [ ] 🐛 Bug fix (non-breaking change which fixes an issue)
- [ ] ✨ New feature (non-breaking change which adds functionality)
- [ ] 💥 Breaking change (fix or feature with breaking changes)
- [ ] 📝 Documentation update
- [ ] 🎨 UI/UX improvement
- [ ] 🔒 Security enhancement
- [ ] ⚡ Performance improvement
## Areas Affected
Please check all that apply:
- [ ] Email Integration (Gmail, IMAP, etc.)
- [ ] User Interface/Experience
- [ ] Authentication/Authorization
- [ ] Data Storage/Management
- [ ] API Endpoints
- [ ] Documentation
- [ ] Testing Infrastructure
- [ ] Development Workflow
- [ ] Deployment/Infrastructure
## Testing Done
Describe the tests you've done:
- [ ] Unit tests added/updated
- [ ] Integration tests added/updated
- [ ] Manual testing performed
- [ ] Cross-browser testing (if UI changes)
- [ ] Mobile responsiveness verified (if UI changes)
## Security Considerations
For changes involving data or authentication:
- [ ] No sensitive data is exposed
- [ ] Authentication checks are in place
- [ ] Input validation is implemented
- [ ] Rate limiting is considered (if applicable)
## Checklist
- [ ] I have read the [CONTRIBUTING](https://github.com/Mail-0/Zero/blob/staging/.github/CONTRIBUTING.md) document
- [ ] My code follows the project's style guidelines
- [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in complex areas
- [ ] I have updated the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix/feature works
- [ ] All tests pass locally
- [ ] Any dependent changes are merged and published
## Additional Notes
Add any other context about the pull request here.
## Screenshots/Recordings
Add screenshots or recordings here if applicable.
---
_By submitting this pull request, I confirm that my contribution is made under the terms of the project's license._
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Added automatic retry logic for Gmail API rate limit errors to reduce sync failures and improve reliability.
- **Bug Fixes**
- Detects Gmail rate limit errors and retries failed requests up to 10 times with a 60-second delay between attempts.
<!-- End of auto-generated description by cubic. -->
# READ CAREFULLY THEN REMOVE
Remove bullet points that are not relevant.
PLEASE REFRAIN FROM USING AI TO WRITE YOUR CODE AND PR DESCRIPTION. IF YOU DO USE AI TO WRITE YOUR CODE PLEASE PROVIDE A DESCRIPTION AND REVIEW IT CAREFULLY. MAKE SURE YOU UNDERSTAND THE CODE YOU ARE SUBMITTING USING AI.
- Pull requests that do not follow these guidelines will be closed without review or comment.
- If you use AI to write your PR description your pr will be close without review or comment.
- If you are unsure about anything, feel free to ask for clarification.
## Description
Please provide a clear description of your changes.
---
## Type of Change
Please delete options that are not relevant.
- [ ] 🐛 Bug fix (non-breaking change which fixes an issue)
- [ ] ✨ New feature (non-breaking change which adds functionality)
- [ ] 💥 Breaking change (fix or feature with breaking changes)
- [ ] 📝 Documentation update
- [ ] 🎨 UI/UX improvement
- [ ] 🔒 Security enhancement
- [ ] ⚡ Performance improvement
## Areas Affected
Please check all that apply:
- [ ] Email Integration (Gmail, IMAP, etc.)
- [ ] User Interface/Experience
- [ ] Authentication/Authorization
- [ ] Data Storage/Management
- [ ] API Endpoints
- [ ] Documentation
- [ ] Testing Infrastructure
- [ ] Development Workflow
- [ ] Deployment/Infrastructure
## Testing Done
Describe the tests you've done:
- [ ] Unit tests added/updated
- [ ] Integration tests added/updated
- [ ] Manual testing performed
- [ ] Cross-browser testing (if UI changes)
- [ ] Mobile responsiveness verified (if UI changes)
## Security Considerations
For changes involving data or authentication:
- [ ] No sensitive data is exposed
- [ ] Authentication checks are in place
- [ ] Input validation is implemented
- [ ] Rate limiting is considered (if applicable)
## Checklist
- [ ] I have read the [CONTRIBUTING](https://github.com/Mail-0/Zero/blob/staging/.github/CONTRIBUTING.md) document
- [ ] My code follows the project's style guidelines
- [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in complex areas
- [ ] I have updated the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix/feature works
- [ ] All tests pass locally
- [ ] Any dependent changes are merged and published
## Additional Notes
Add any other context about the pull request here.
## Screenshots/Recordings
Add screenshots or recordings here if applicable.
---
_By submitting this pull request, I confirm that my contribution is made under the terms of the project's license._
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Added 2-second delays before and after syncing each thread in the chat route to prevent API rate limiting.
<!-- End of auto-generated description by cubic. -->
# READ CAREFULLY THEN REMOVE
Remove bullet points that are not relevant.
PLEASE REFRAIN FROM USING AI TO WRITE YOUR CODE AND PR DESCRIPTION. IF YOU DO USE AI TO WRITE YOUR CODE PLEASE PROVIDE A DESCRIPTION AND REVIEW IT CAREFULLY. MAKE SURE YOU UNDERSTAND THE CODE YOU ARE SUBMITTING USING AI.
- Pull requests that do not follow these guidelines will be closed without review or comment.
- If you use AI to write your PR description your pr will be close without review or comment.
- If you are unsure about anything, feel free to ask for clarification.
## Description
Please provide a clear description of your changes.
---
## Type of Change
Please delete options that are not relevant.
- [ ] 🐛 Bug fix (non-breaking change which fixes an issue)
- [ ] ✨ New feature (non-breaking change which adds functionality)
- [ ] 💥 Breaking change (fix or feature with breaking changes)
- [ ] 📝 Documentation update
- [ ] 🎨 UI/UX improvement
- [ ] 🔒 Security enhancement
- [ ] ⚡ Performance improvement
## Areas Affected
Please check all that apply:
- [ ] Email Integration (Gmail, IMAP, etc.)
- [ ] User Interface/Experience
- [ ] Authentication/Authorization
- [ ] Data Storage/Management
- [ ] API Endpoints
- [ ] Documentation
- [ ] Testing Infrastructure
- [ ] Development Workflow
- [ ] Deployment/Infrastructure
## Testing Done
Describe the tests you've done:
- [ ] Unit tests added/updated
- [ ] Integration tests added/updated
- [ ] Manual testing performed
- [ ] Cross-browser testing (if UI changes)
- [ ] Mobile responsiveness verified (if UI changes)
## Security Considerations
For changes involving data or authentication:
- [ ] No sensitive data is exposed
- [ ] Authentication checks are in place
- [ ] Input validation is implemented
- [ ] Rate limiting is considered (if applicable)
## Checklist
- [ ] I have read the [CONTRIBUTING](https://github.com/Mail-0/Zero/blob/staging/.github/CONTRIBUTING.md) document
- [ ] My code follows the project's style guidelines
- [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in complex areas
- [ ] I have updated the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix/feature works
- [ ] All tests pass locally
- [ ] Any dependent changes are merged and published
## Additional Notes
Add any other context about the pull request here.
## Screenshots/Recordings
Add screenshots or recordings here if applicable.
---
_By submitting this pull request, I confirm that my contribution is made under the terms of the project's license._
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Added a DISABLE_WORKFLOWS environment variable to allow disabling workflow execution. When enabled, workflow-related API requests return early with a success message.
- **Dependencies**
- Updated wrangler.jsonc to set DISABLE_WORKFLOWS for all environments.
<!-- End of auto-generated description by cubic. -->
# READ CAREFULLY THEN REMOVE
Remove bullet points that are not relevant.
PLEASE REFRAIN FROM USING AI TO WRITE YOUR CODE AND PR DESCRIPTION. IF YOU DO USE AI TO WRITE YOUR CODE PLEASE PROVIDE A DESCRIPTION AND REVIEW IT CAREFULLY. MAKE SURE YOU UNDERSTAND THE CODE YOU ARE SUBMITTING USING AI.
- Pull requests that do not follow these guidelines will be closed without review or comment.
- If you use AI to write your PR description your pr will be close without review or comment.
- If you are unsure about anything, feel free to ask for clarification.
## Description
Please provide a clear description of your changes.
---
## Type of Change
Please delete options that are not relevant.
- [ ] 🐛 Bug fix (non-breaking change which fixes an issue)
- [ ] ✨ New feature (non-breaking change which adds functionality)
- [ ] 💥 Breaking change (fix or feature with breaking changes)
- [ ] 📝 Documentation update
- [ ] 🎨 UI/UX improvement
- [ ] 🔒 Security enhancement
- [ ] ⚡ Performance improvement
## Areas Affected
Please check all that apply:
- [ ] Email Integration (Gmail, IMAP, etc.)
- [ ] User Interface/Experience
- [ ] Authentication/Authorization
- [ ] Data Storage/Management
- [ ] API Endpoints
- [ ] Documentation
- [ ] Testing Infrastructure
- [ ] Development Workflow
- [ ] Deployment/Infrastructure
## Testing Done
Describe the tests you've done:
- [ ] Unit tests added/updated
- [ ] Integration tests added/updated
- [ ] Manual testing performed
- [ ] Cross-browser testing (if UI changes)
- [ ] Mobile responsiveness verified (if UI changes)
## Security Considerations
For changes involving data or authentication:
- [ ] No sensitive data is exposed
- [ ] Authentication checks are in place
- [ ] Input validation is implemented
- [ ] Rate limiting is considered (if applicable)
## Checklist
- [ ] I have read the [CONTRIBUTING](https://github.com/Mail-0/Zero/blob/staging/.github/CONTRIBUTING.md) document
- [ ] My code follows the project's style guidelines
- [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in complex areas
- [ ] I have updated the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix/feature works
- [ ] All tests pass locally
- [ ] Any dependent changes are merged and published
## Additional Notes
Add any other context about the pull request here.
## Screenshots/Recordings
Add screenshots or recordings here if applicable.
---
_By submitting this pull request, I confirm that my contribution is made under the terms of the project's license._
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Fixed an issue where microphone permission state was not updated after requesting access in the voice provider.
<!-- End of auto-generated description by cubic. -->
## Description
Optimized Gmail label fetching by implementing parallel requests with error handling using Effect.js. This change improves performance when retrieving label information by making concurrent requests instead of sequential ones. Also removed an unused `Check` icon import from the command palette context.
---
## Type of Change
- [x] 🐛 Bug fix (non-breaking change which fixes an issue)
- [x] ⚡ Performance improvement
## Areas Affected
- [x] Email Integration (Gmail, IMAP, etc.)
## Testing Done
- [x] Manual testing performed
## Checklist
- [x] I have performed a self-review of my code
- [x] My changes generate no new warnings
## Additional Notes
The previous implementation was making sequential API calls to fetch label information, which could be slow when a user has many labels. This change uses Effect.js to make concurrent requests with proper error handling, significantly improving performance.
---
_By submitting this pull request, I confirm that my contribution is made under the terms of the project's license._
Hey team,
[**Lingo.dev**](https://lingo.dev) here with fresh translations!
### In this update
- Added missing translations
- Performed brand voice, context and glossary checks
- Enhanced translations using Lingo.dev Localization Engine
### Next Steps
- [ ] Review the changes
- [ ] Merge when ready
Ran oxc (https://oxc.rs/docs/guide/usage/linter.html#vscode-extension) and fixed all the issues that came up, set it up to run as a PR check and added steps to the README.md asking users to use it.
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
* **New Features**
* Introduced JavaScript linting using oxlint in development guidelines and CI workflow for improved code quality.
* Added oxlint configuration and dependencies to the project.
* **Bug Fixes**
* Improved error logging in various components and utilities for better debugging.
* Enhanced React list rendering by updating keys to use unique values instead of array indices, reducing rendering issues.
* Replaced browser alerts with toast notifications for a smoother user experience.
* **Refactor**
* Simplified component logic and state management by removing unused code, imports, props, and components across multiple files.
* Updated function and component signatures for clarity and maintainability.
* Improved efficiency of certain operations by switching from arrays to sets for membership checks.
* **Chores**
* Cleaned up and reorganized import statements throughout the codebase.
* Removed deprecated files, components, and middleware to streamline the codebase.
* **Documentation**
* Updated contribution guidelines to include linting requirements for code submissions.
* **Style**
* Minor formatting and readability improvements in JSX and code structure.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
# Implement BIMI Avatar Support for Email Logos
This PR adds support for Brand Indicators for Message Identification (BIMI) avatars in the mail interface. BIMI is an email specification that allows organizations to display their logos in supporting email clients by adding specific DNS records.
The implementation includes:
- New `BimiAvatar` component that fetches and displays BIMI logos from DNS records
- Server-side TRPC routes to fetch and validate BIMI records
- Integration of the component throughout the mail interface
- Fallback mechanisms when BIMI logos aren't available
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
* **New Features**
* Introduced BIMI (Brand Indicators for Message Identification) avatar support, displaying brand logos or fallback initials for email senders and recipients.
* Added a new avatar component that automatically fetches and displays BIMI logos when available.
* Enhanced avatar rendering in mail lists and mail display views with improved fallback and styling.
* Added backend support for querying BIMI DNS records and fetching SVG logos via a new API route.
* **Bug Fixes**
* Improved reliability and consistency of avatar display, ensuring appropriate fallbacks if brand logos are unavailable.
* **Chores**
* Updated backend to support BIMI logo lookups and retrieval for enhanced email branding.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
# Add "Open in New Tab" Feature and Fix Email Handling
## Description
This PR adds an "Open in New Tab" feature to the thread context menu, allowing users to open email threads in a new browser tab. It also fixes several issues with email handling:
1. Adds an "Open in New Tab" option to the thread context menu with an ExternalLink icon
2. Improves draft handling by saving drafts before sending emails
3. Fixes the identification of the latest email in threads by properly filtering out drafts
4. Updates the styling of the "Mark as Important" icon in the thread context menu
5. Removes unnecessary console.log statements and async/await usage where not needed
6. Fixes the web search tool to work with or without data streaming
## Type of Change
- [x] 🐛 Bug fix (non-breaking change which fixes an issue)
- [x] ✨ New feature (non-breaking change which adds functionality)
- [x] 🎨 UI/UX improvement
- [x] ⚡ Performance improvement
## Areas Affected
- [x] Email Integration (Gmail, IMAP, etc.)
- [x] User Interface/Experience
- [x] Data Storage/Management
## Testing Done
- [x] Manual testing performed
## Checklist
- [x] I have performed a self-review of my code
- [x] My changes generate no new warnings
## Additional Notes
The "Open in New Tab" feature improves workflow for users who need to reference multiple email threads simultaneously. The draft handling improvements ensure that emails are properly saved before sending, preventing data loss.
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
* **New Features**
* Added "Open in New Tab" action to the email thread context menu for easier access to threads in a new browser tab.
* **Improvements**
* Drafts are now saved automatically before sending emails, ensuring no unsaved changes are lost.
* More accurate detection of the latest email in a thread.
* Localization updated with a new string for the "Open in New Tab" action.
* Email and thread operations now consistently use an updated agent interface for improved backend handling.
* **Bug Fixes**
* Latest message and reply counts now exclude drafts, improving thread accuracy.
* **Style**
* Minor visual updates to icons and CSS class ordering.
* Code formatting and import reordering for consistency.
* **Chores**
* Internal state updates are now handled synchronously for improved performance.
* Removed unnecessary logging and simplified cache management.
* Removed deprecated notification function and related imports.
* Simplified query cache clearing on account switch.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
# Refactor Email Processing Pipeline to Use Effect Library
This PR refactors the email processing workflow from using Cloudflare Workers' Workflow API to using the Effect library for better error handling and functional programming patterns. The main changes include:
1. Replaced workflow-based implementation with Effect-based implementation
2. Added queue-based processing for thread notifications
3. Improved CORS handling with more robust origin validation
4. Fixed Google service account validation to properly handle empty JSON
5. Changed UI label from "Labels" to "Categories" in the mail component
6. Added selective query persistence in the query provider
7. Improved error handling throughout the notification pipeline
## Type of Change
- ✨ New feature (non-breaking change which adds functionality)
- ⚡ Performance improvement
## Areas Affected
- [x] Email Integration (Gmail, IMAP, etc.)
- [x] User Interface/Experience
- [x] Data Storage/Management
- [x] API Endpoints
## Testing Done
- [x] Manual testing performed
## Security Considerations
- [x] No sensitive data is exposed
- [x] Authentication checks are in place
- [x] Input validation is implemented
## Checklist
- [x] I have performed a self-review of my code
- [x] I have commented my code, particularly in complex areas
- [x] My changes generate no new warnings
## Additional Notes
The Effect library provides better error handling and composability compared to the previous workflow implementation. This change should improve reliability and maintainability of the email processing pipeline.
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
* **New Features**
* Enhanced email processing with new effect-based workflows for email data handling, summarization, and vectorization.
* Improved thread and message history retrieval capabilities with retry logic.
* **Bug Fixes**
* Fixed label text in the mail UI from "Labels" to "Categories".
* Improved error handling and validation for environment variables.
* **Refactor**
* Major restructuring of workflow logic to use effect-based functions for better reliability and maintainability.
* Simplified query cache invalidation and persistence logic.
* Updated server workflow imports and exports to use new pipeline functions.
* Streamlined server route logic for thread synchronization and authorization.
* Replaced local prompt name helper with centralized implementation.
* **Chores**
* Updated server dependencies.
* Cleaned up configuration files by removing unused workflow bindings.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
# READ CAREFULLY THEN REMOVE
Remove bullet points that are not relevant.
PLEASE REFRAIN FROM USING AI TO WRITE YOUR CODE AND PR DESCRIPTION. IF YOU DO USE AI TO WRITE YOUR CODE PLEASE PROVIDE A DESCRIPTION AND REVIEW IT CAREFULLY. MAKE SURE YOU UNDERSTAND THE CODE YOU ARE SUBMITTING USING AI.
- Pull requests that do not follow these guidelines will be closed without review or comment.
- If you use AI to write your PR description your pr will be close without review or comment.
- If you are unsure about anything, feel free to ask for clarification.
## Description
Please provide a clear description of your changes.
---
## Type of Change
Please delete options that are not relevant.
- [ ] 🐛 Bug fix (non-breaking change which fixes an issue)
- [ ] ✨ New feature (non-breaking change which adds functionality)
- [ ] 💥 Breaking change (fix or feature with breaking changes)
- [ ] 📝 Documentation update
- [ ] 🎨 UI/UX improvement
- [ ] 🔒 Security enhancement
- [ ] ⚡ Performance improvement
## Areas Affected
Please check all that apply:
- [ ] Email Integration (Gmail, IMAP, etc.)
- [ ] User Interface/Experience
- [ ] Authentication/Authorization
- [ ] Data Storage/Management
- [ ] API Endpoints
- [ ] Documentation
- [ ] Testing Infrastructure
- [ ] Development Workflow
- [ ] Deployment/Infrastructure
## Testing Done
Describe the tests you've done:
- [ ] Unit tests added/updated
- [ ] Integration tests added/updated
- [ ] Manual testing performed
- [ ] Cross-browser testing (if UI changes)
- [ ] Mobile responsiveness verified (if UI changes)
## Security Considerations
For changes involving data or authentication:
- [ ] No sensitive data is exposed
- [ ] Authentication checks are in place
- [ ] Input validation is implemented
- [ ] Rate limiting is considered (if applicable)
## Checklist
- [ ] I have read the [CONTRIBUTING](https://github.com/Mail-0/Zero/blob/staging/.github/CONTRIBUTING.md) document
- [ ] My code follows the project's style guidelines
- [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in complex areas
- [ ] I have updated the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix/feature works
- [ ] All tests pass locally
- [ ] Any dependent changes are merged and published
## Additional Notes
Add any other context about the pull request here.
## Screenshots/Recordings
Add screenshots or recordings here if applicable.
---
_By submitting this pull request, I confirm that my contribution is made under the terms of the project's license._
# Refactor Labels API Usage and Optimize Component Performance
## Description
This PR refactors how labels are accessed throughout the application by restructuring the `useLabels` hook to return `userLabels` and `systemLabels` separately. It also adds performance optimizations by memoizing component calculations and action handlers in the thread context menu. Additionally, it introduces a new category dropdown component for better label filtering and temporarily disables the categories settings page.
## Type of Change
- [x] 🐛 Bug fix (non-breaking change which fixes an issue)
- [x] ⚡ Performance improvement
## Areas Affected
- [x] User Interface/Experience
- [x] Data Storage/Management
## 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 main changes include:
1. Restructured `useLabels` hook to separate user and system labels
2. Updated all components to use the new label structure
3. Added memoization to thread context menu actions and calculations
4. Implemented a new CategoryDropdown component for label filtering
5. Commented out the categories settings page route
6. Fixed spacing and alignment issues in the mail layout
# READ CAREFULLY THEN REMOVE
Remove bullet points that are not relevant.
PLEASE REFRAIN FROM USING AI TO WRITE YOUR CODE AND PR DESCRIPTION. IF YOU DO USE AI TO WRITE YOUR CODE PLEASE PROVIDE A DESCRIPTION AND REVIEW IT CAREFULLY. MAKE SURE YOU UNDERSTAND THE CODE YOU ARE SUBMITTING USING AI.
- Pull requests that do not follow these guidelines will be closed without review or comment.
- If you use AI to write your PR description your pr will be close without review or comment.
- If you are unsure about anything, feel free to ask for clarification.
## Description
Please provide a clear description of your changes.
---
## Type of Change
Please delete options that are not relevant.
- [ ] 🐛 Bug fix (non-breaking change which fixes an issue)
- [ ] ✨ New feature (non-breaking change which adds functionality)
- [ ] 💥 Breaking change (fix or feature with breaking changes)
- [ ] 📝 Documentation update
- [ ] 🎨 UI/UX improvement
- [ ] 🔒 Security enhancement
- [ ] ⚡ Performance improvement
## Areas Affected
Please check all that apply:
- [ ] Email Integration (Gmail, IMAP, etc.)
- [ ] User Interface/Experience
- [ ] Authentication/Authorization
- [ ] Data Storage/Management
- [ ] API Endpoints
- [ ] Documentation
- [ ] Testing Infrastructure
- [ ] Development Workflow
- [ ] Deployment/Infrastructure
## Testing Done
Describe the tests you've done:
- [ ] Unit tests added/updated
- [ ] Integration tests added/updated
- [ ] Manual testing performed
- [ ] Cross-browser testing (if UI changes)
- [ ] Mobile responsiveness verified (if UI changes)
## Security Considerations
For changes involving data or authentication:
- [ ] No sensitive data is exposed
- [ ] Authentication checks are in place
- [ ] Input validation is implemented
- [ ] Rate limiting is considered (if applicable)
## Checklist
- [ ] I have read the [CONTRIBUTING](https://github.com/Mail-0/Zero/blob/staging/.github/CONTRIBUTING.md) document
- [ ] My code follows the project's style guidelines
- [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in complex areas
- [ ] I have updated the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix/feature works
- [ ] All tests pass locally
- [ ] Any dependent changes are merged and published
## Additional Notes
Add any other context about the pull request here.
## Screenshots/Recordings
Add screenshots or recordings here if applicable.
---
_By submitting this pull request, I confirm that my contribution is made under the terms of the project's license._
# READ CAREFULLY THEN REMOVE
Remove bullet points that are not relevant.
PLEASE REFRAIN FROM USING AI TO WRITE YOUR CODE AND PR DESCRIPTION. IF YOU DO USE AI TO WRITE YOUR CODE PLEASE PROVIDE A DESCRIPTION AND REVIEW IT CAREFULLY. MAKE SURE YOU UNDERSTAND THE CODE YOU ARE SUBMITTING USING AI.
- Pull requests that do not follow these guidelines will be closed without review or comment.
- If you use AI to write your PR description your pr will be close without review or comment.
- If you are unsure about anything, feel free to ask for clarification.
## Description
Please provide a clear description of your changes.
---
## Type of Change
Please delete options that are not relevant.
- [ ] 🐛 Bug fix (non-breaking change which fixes an issue)
- [ ] ✨ New feature (non-breaking change which adds functionality)
- [ ] 💥 Breaking change (fix or feature with breaking changes)
- [ ] 📝 Documentation update
- [ ] 🎨 UI/UX improvement
- [ ] 🔒 Security enhancement
- [ ] ⚡ Performance improvement
## Areas Affected
Please check all that apply:
- [ ] Email Integration (Gmail, IMAP, etc.)
- [ ] User Interface/Experience
- [ ] Authentication/Authorization
- [ ] Data Storage/Management
- [ ] API Endpoints
- [ ] Documentation
- [ ] Testing Infrastructure
- [ ] Development Workflow
- [ ] Deployment/Infrastructure
## Testing Done
Describe the tests you've done:
- [ ] Unit tests added/updated
- [ ] Integration tests added/updated
- [ ] Manual testing performed
- [ ] Cross-browser testing (if UI changes)
- [ ] Mobile responsiveness verified (if UI changes)
## Security Considerations
For changes involving data or authentication:
- [ ] No sensitive data is exposed
- [ ] Authentication checks are in place
- [ ] Input validation is implemented
- [ ] Rate limiting is considered (if applicable)
## Checklist
- [ ] I have read the [CONTRIBUTING](https://github.com/Mail-0/Zero/blob/staging/.github/CONTRIBUTING.md) document
- [ ] My code follows the project's style guidelines
- [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in complex areas
- [ ] I have updated the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix/feature works
- [ ] All tests pass locally
- [ ] Any dependent changes are merged and published
## Additional Notes
Add any other context about the pull request here.
## Screenshots/Recordings
Add screenshots or recordings here if applicable.
---
_By submitting this pull request, I confirm that my contribution is made under the terms of the project's license._
# READ CAREFULLY THEN REMOVE
Remove bullet points that are not relevant.
PLEASE REFRAIN FROM USING AI TO WRITE YOUR CODE AND PR DESCRIPTION. IF YOU DO USE AI TO WRITE YOUR CODE PLEASE PROVIDE A DESCRIPTION AND REVIEW IT CAREFULLY. MAKE SURE YOU UNDERSTAND THE CODE YOU ARE SUBMITTING USING AI.
- Pull requests that do not follow these guidelines will be closed without review or comment.
- If you use AI to write your PR description your pr will be close without review or comment.
- If you are unsure about anything, feel free to ask for clarification.
## Description
Please provide a clear description of your changes.
---
## Type of Change
Please delete options that are not relevant.
- [ ] 🐛 Bug fix (non-breaking change which fixes an issue)
- [ ] ✨ New feature (non-breaking change which adds functionality)
- [ ] 💥 Breaking change (fix or feature with breaking changes)
- [ ] 📝 Documentation update
- [ ] 🎨 UI/UX improvement
- [ ] 🔒 Security enhancement
- [ ] ⚡ Performance improvement
## Areas Affected
Please check all that apply:
- [ ] Email Integration (Gmail, IMAP, etc.)
- [ ] User Interface/Experience
- [ ] Authentication/Authorization
- [ ] Data Storage/Management
- [ ] API Endpoints
- [ ] Documentation
- [ ] Testing Infrastructure
- [ ] Development Workflow
- [ ] Deployment/Infrastructure
## Testing Done
Describe the tests you've done:
- [ ] Unit tests added/updated
- [ ] Integration tests added/updated
- [ ] Manual testing performed
- [ ] Cross-browser testing (if UI changes)
- [ ] Mobile responsiveness verified (if UI changes)
## Security Considerations
For changes involving data or authentication:
- [ ] No sensitive data is exposed
- [ ] Authentication checks are in place
- [ ] Input validation is implemented
- [ ] Rate limiting is considered (if applicable)
## Checklist
- [ ] I have read the [CONTRIBUTING](https://github.com/Mail-0/Zero/blob/staging/.github/CONTRIBUTING.md) document
- [ ] My code follows the project's style guidelines
- [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in complex areas
- [ ] I have updated the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix/feature works
- [ ] All tests pass locally
- [ ] Any dependent changes are merged and published
## Additional Notes
Add any other context about the pull request here.
## Screenshots/Recordings
Add screenshots or recordings here if applicable.
---
_By submitting this pull request, I confirm that my contribution is made under the terms of the project's license._
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
* **Chores**
* Removed debugging log statements from notification handling to reduce console clutter.
* **New Features**
* Enabled synchronization of sent, spam, and archive mail folders during authentication, in addition to the inbox.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->