Commit Graph

99 Commits

Author SHA1 Message Date
Adam
6c76d3d44d Implement thread deletion functionality (#1799)
# Implement Thread Deletion Functionality

## Description

This PR implements thread deletion functionality, allowing users to permanently delete threads from the bin. The implementation includes:

1. Replacing the optimistic delete with a real deletion using TRPC mutation
2. Enabling the previously disabled delete button in the thread context menu
3. Adding server-side support for thread deletion from the database
4. Adding folder name normalization to handle 'bin' vs 'trash' naming differences

## Type of Change

- [x]  New feature (non-breaking change which adds functionality)
- [x] 🐛 Bug fix (non-breaking change which fixes an issue)

## 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 implementation now properly deletes threads from the database when the user selects the delete option from the context menu. The UI provides toast notifications to indicate the deletion status.

_By submitting this pull request, I confirm that my contribution is made under the terms of the project's license._
2025-07-22 14:18:31 -07:00
amrit
4c3753e3f8 feat: ability to snooze emails (#1477)
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
Co-authored-by: Adam <13007539+MrgSub@users.noreply.github.com>
2025-07-20 18:25:32 -07:00
Adam
2e44025bd2 Uncomment and enable automatic draft generation in thread workflow (#1771)
# 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
Enabled automatic draft generation in the thread workflow by uncommenting and activating related logic.

- **New Features**
  - Threads now automatically generate a draft reply when a response is needed, based on email intent analysis.

<!-- End of auto-generated description by cubic. -->



<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

* **New Features**
  * Automatic draft generation for certain email threads has been re-enabled, allowing drafts to be created based on message intent.

* **Bug Fixes**
  * Restored previously disabled functionality for generating and logging automatic drafts.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-07-20 14:25:27 -07:00
Ayush Sharma
6637cb9730 fix: prevent browser search from triggering on Ctrl+K (#1757) 2025-07-18 16:58:19 -07:00
Adam
6020305afd hotfix stuff (#1703)
## 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._
2025-07-10 15:05:01 -07:00
Adam
277f476575 cleanup on isle zero (#1699)
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 -->
2025-07-10 10:59:40 -07:00
Adam
7f0893b669 all round fixes (#1697)
# 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 -->
2025-07-09 15:58:45 -07:00
Adam
7fec116c24 categories (#1689)
# 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
2025-07-08 16:16:53 -07:00
Adam
2fbaf7b312 SPA (#1538)
# 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

* **New Features**
  * Introduced a new localization system replacing translation hooks with direct message function calls.
  * Added localization project configuration and Inlang plugins for improved message formatting.

* **Bug Fixes**
  * Enhanced pluralization handling across all supported languages for accurate message display.

* **Refactor**
  * Unified translation and locale management across components by removing hook-based translations.
  * Removed obsolete navigation and email signature settings pages.
  * Simplified query and server provider logic, removing connection-specific and internationalization context code.
  * Disabled server-side rendering in the mail app.
  * Removed Cloudflare Worker request handler and related environment augmentations.

* **Chores**
  * Updated dependencies and scripts, adding Inlang CLI and removing unused packages.
  * Cleaned up configuration files including Vite, Wrangler, and i18n settings.
  * Added `.gitignore` for localization cache.
  * Updated static asset handling and environment configurations for Cloudflare deployments.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-06-30 11:37:18 -07:00
Ahmet Kilinc
33d52ceebf optimistic thread state for thread context menu (#1300)
# Implement Optimistic UI for Label Management in Email Threads

This PR adds optimistic UI updates for label management in email threads context menu.

## Type of Change

-  New feature (non-breaking change which adds functionality)

## Areas Affected

- [x] User Interface/Experience
- [x] Data Storage/Management

## Testing Done

- [x] Manual testing performed

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - Added support for bulk label toggling on multiple mail threads.
  - Labels now update instantly in the UI with optimistic updates, reflecting changes before server confirmation.

- **Improvements**
  - Checkbox states for labels now accurately reflect pending changes for a smoother user experience.
  - Enhanced feedback with toast messages indicating label changes, including support for multiple threads.

- **Style**
  - Minor formatting improvements in context menu components.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-06-27 18:30:25 +01:00
Adam
34bb334cec Fixing type errors (#1488)
# 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 -->
2025-06-25 13:56:20 -07:00
Ahmet Kilinc
8150ca70b7 faster access to search (#1448) 2025-06-23 11:52:52 -07:00
needle
275c3fd514 refactor(nav): enhance account switcher (#1367)
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - Introduced a global loading indicator with animated overlay and customizable messages for improved user feedback during operations.
- **Improvements**
  - Enhanced account switching with explicit loading states, improved cache management, and clearer success or error notifications.
  - Added new localized messages for account switching status.
- **Chores**
  - Updated package manager version for improved tooling support.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-06-21 13:03:24 -07:00
abhix4
0bc63a6528 Add opacity to icons and fix separator colors in mail context menu (#1296) 2025-06-16 19:04:35 -07:00
Ahmet Kilinc
3234c032d6 fixes height (#1234)
## Description

Added overflow-y-auto and max-height constraints to the thread context menu to ensure proper scrolling behavior when the menu contains many items. This prevents the menu from extending beyond the viewport, particularly when displaying a large number of labels.

## Type of Change

- [x] 🐛 Bug fix (non-breaking change which fixes an issue)
- [x] 🎨 UI/UX improvement

## Areas Affected

- [x] User Interface/Experience

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - Added vertical scrolling to the context menu and labels submenu for improved navigation.
  - Set a maximum height for the labels submenu to ensure content remains accessible and visually manageable.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-06-07 10:45:26 -07:00
nizzy
93c56d16d0 ui-fix (#1230)
# 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](../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

- **New Features**
	- Added new keyboard shortcut labels for actions such as opening the Voice Assistant, clearing filters, marking as important/unimportant, and various bulk actions.
- **Style**
	- Improved visual separators and consistency in the command palette.
	- Updated input field and navigation sidebar styling for better alignment and hover effects.
	- Enhanced text alignment and positioning within navigation items for a more polished appearance.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-06-07 10:40:42 -07:00
Adam
7bdc0be2eb Optimistic Fixes (#1231)
# 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](../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._
2025-06-07 10:40:09 -07:00
nizzy
92808992f5 UI Fixes (#1199)
# 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](../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

- **New Features**
  - Introduced a new "OldPhone" icon for use in the sidebar menu.

- **Style**
  - Updated the "Live Support" sidebar button to use the new "OldPhone" icon with revised styling.
  - Refined the search/filter button and keyboard shortcut hint in the mail layout for improved appearance and clarity.
  - Adjusted the search icon styling in command dialogs and search inputs for better alignment and color consistency.
  - Made sidebar labels and tree backgrounds transparent for a cleaner look.
  - Tweaked icon positioning and button styles for enhanced visual polish.

- **Bug Fixes**
  - Removed descriptions and shortcut displays from certain command palette items to streamline the interface.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-06-04 14:55:57 -07:00
Ahmet Kilinc
90ae1c2a17 fixes search not being added to filters (#1179)
### TL;DR

Improved search functionality in the command palette by adding automatic filter creation for search queries.

### What changed?

- Removed the `processSearchQuery` function that was handling natural language date parsing
- Added automatic creation of search filters when users enter search queries
- Added special handling for AI-generated search queries, creating distinct filters for them
- Added detection for filter syntax to prevent creating redundant search filters
- Updated dependency arrays in useCallback hooks to include the new addFilter function

### How to test?

1. Open the command palette and enter a search query (e.g., "emails from John")
2. Verify that a search filter is automatically created with the label "Search: 'emails from John'"
3. Try an AI-generated search query and confirm it creates a filter with "AI Search:" prefix
4. Test queries that already use filter syntax (e.g., "from:john@example.com") and verify they don't create redundant filters
5. Ensure that multiple search filters can be added and that they properly combine in the search query

### Why make this change?

This change improves the user experience by automatically creating search filters from queries, making it easier for users to see and manage their active search criteria. It also differentiates between regular searches and AI-enhanced searches, giving users better visibility into how their search terms are being processed and applied.

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

- **New Features**
  - Improved search functionality by automatically adding a search filter when queries do not use filter prefixes.
  - Enhanced AI-generated search queries now display with an "AI Search:" label.

- **Refactor**
  - Simplified search processing by removing custom date parsing and streamlining filter handling.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-06-02 13:55:46 -07:00
Ahmet Kilinc
13bae8fdcb better command palette and new shortcuts (#1165)
### TL;DR

Refactored the command palette to improve the search and filter experience in the mail app.

### What changed?

- Restructured the `CommandPaletteProvider` to wrap the entire mail app layout
- Enhanced the command palette context to expose active filters and a clear filters function
- Replaced the search bar with an improved command palette button that displays active filters
- Added a "Clear" button directly in the search UI to quickly remove all filters
- Added a new keyboard shortcut (Cmd+Shift+F) to clear all filters
- Removed the '/' shortcut for search in favor of using Cmd+K for the command palette

### How to test?

1. Open the mail app and press Cmd+K to open the command palette
2. Apply some filters through the command palette
3. Verify that active filters appear in the search bar
4. Test clearing filters using:
   - The "Clear" button next to the filters
   - The Cmd+Shift+F keyboard shortcut
5. Verify that the command palette opens correctly with Cmd+K

### Why make this change?

This change improves the user experience by:
- Making active filters more visible in the UI
- Providing multiple ways to clear filters
- Streamlining the search and filter workflow
- Creating a more consistent command interface throughout the application

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
	- Added a global keyboard shortcut (Cmd+Shift+F) to clear all active filters in the mail app.
- **Refactor**
	- Streamlined the command palette and its provider for improved context management and simplified state handling.
	- Updated the mail layout to use a button for opening the command palette, displaying active filters and providing quick access to clearing filters.
	- Wrapped the entire mail layout with the command palette context provider for consistent state access.
- **Style**
	- Improved button and filter UI styling for better clarity and usability.
- **Bug Fixes**
	- Removed the single-key '/' search shortcut to prevent accidental activation.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-06-01 03:49:23 +01:00
Rahul Mishra
2eac4f30c5 chore: update dependencies and fix i8n issues (#1167)
- Update deps
- Fix i8n issues where it tries to translate hardcoded strings

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

- **Bug Fixes**
  - Improved translation handling for navigation titles in the command palette, ensuring titles are translated only once and displayed correctly.

- **Chores**
  - Removed unnecessary 'use client' directives from several UI components.
  - Updated and cleaned up dependencies across the workspace, including removal of unused packages and bumping versions.
  - Simplified and reorganized script commands for development and database operations.
  - Adjusted configuration files for improved client/server build warmup and removed obsolete Turbo tasks.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-05-31 17:20:14 +05:30
Ahmet Kilinc
e710e3f783 fix for i18n (#1164)
### TL;DR

Added translation support for command palette item titles.

### What changed?

Wrapped the `item.title` in the command palette with the translation function `t()` to enable internationalization of command palette items.

### How to test?

1. Set your application to a non-default language
2. Open the command palette
3. Verify that item titles are correctly translated to the selected language

### Why make this change?

To improve the user experience for non-English speakers by ensuring command palette items are displayed in the user's preferred language, making the application more accessible to a global audience.

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

- **New Features**
  - Added localization support for command titles in the main command palette, enabling display in multiple languages.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-05-30 21:17:54 +01:00
Adam
27547ca7bd Remove CommandPaletteProvider wrapper and enhance search functionality (#1154)
# Remove CommandPaletteProvider and Enhance Command Palette Functionality

## Description

This PR significantly enhances the command palette functionality while simplifying its implementation. The main changes include:

- Removed the `CommandPaletteProvider` wrapper from the mail app layout
- Integrated the command palette directly into the mail component
- Added comprehensive search and filter capabilities to the command palette
- Implemented natural language search processing
- Added date filtering with calendar selection
- Added support for saved searches and filter combinations
- Improved the UI with better organization of commands and search results
- Added keyboard shortcuts for quick navigation within the command palette
- Added help documentation for search syntax

## Type of Change

-  New feature (non-breaking change which adds functionality)
- 🐛 Bug fix (non-breaking change which fixes an issue)
- 🧹 Code refactoring (no functional changes)

## Areas Affected

- [x] User Interface
- [x] Search Functionality
- [x] Command Palette

## Testing Done

- [x] Manual testing of search and filter functionality
- [x] Verified keyboard shortcuts work correctly
- [x] Tested natural language search processing

## Checklist

- [x] I have performed a self-review of my code
- [x] My changes generate no new warnings
- [x] The code follows the project's style guidelines

## Additional Notes

The command palette now provides a more powerful and intuitive way to search and filter emails, with support for Gmail-compatible search syntax and natural language processing. Users can now easily filter by sender, recipient, subject, date ranges, and more.

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - Introduced a comprehensive command palette for email with multiple views, advanced filtering, saved searches, natural language and AI-assisted search, keyboard shortcuts, and persistent state.
  - Added localization strings for new command palette features and search/filter instructions.

- **Enhancements**
  - The command palette now replaces the previous search bar in the mail panel header.
  - AI-powered search queries now exclude promotional emails by default unless specified.

- **Bug Fixes**
  - Improved hotkey handling across the app for consistent keyboard shortcut behavior.

- **Backend Improvements**
  - Refined AI thread summary and search tools for more relevant and concise responses.
  - Simplified and optimized AI search query generation and email tool management.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-05-30 14:26:24 +05:30
github-actions[bot]
629d400423 Deploy to production (Automated) (#1137)
Co-authored-by: Adam <x_1337@outlook.com>
Co-authored-by: Ahmet Kilinc <akx9@icloud.com>
Co-authored-by: nizzy <140507264+nizzyabi@users.noreply.github.com>
2025-05-29 12:23:47 -07:00
Adam
c20868cf1a Replace hardcoded dark mode colors with theme variables (#1129)
This PR standardizes dark mode colors across the application by replacing hardcoded color values with semantic color variables. It also enhances the AI Chat component with improved tool response rendering and adds a new voice chat capability.

Key changes:
- Replaced hardcoded dark background colors (`#1A1A1A`) with the semantic `bg-panelDark` class
- Replaced hardcoded text colors with semantic classes like `text-muted-foreground`
- Enhanced the AI Chat component with better tool response visualization
- Added tooltips to display tool arguments in AI responses
- Improved email composer editor focus handling
- Added a new Tools enum to better type and organize AI tool capabilities

- [x] 🎨 UI/UX improvement
- [x]  Performance improvement

- [x] User Interface/Experience

- [x] Manual testing performed
- [x] Cross-browser testing (if UI changes)
- [x] Mobile responsiveness verified (if UI changes)

- [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

This PR is part of our ongoing effort to standardize the UI color system and improve the dark mode experience. The changes to the AI Chat component make tool responses more informative and easier to understand.

_By submitting this pull request, I confirm that my contribution is made under the terms of the project's license._
2025-05-28 12:00:54 -07:00
Ahmet Kilinc
17c79ad4f2 fix thread-context 2025-05-27 18:13:22 -07:00
Ahmet Kilinc
93f56145d2 optimistic updates and undo actions
fix page issue

optimistic in thread context menu
2025-05-27 18:13:22 -07:00
nizzy
cc26c52ffa Small changes (#1098)
# 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](../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._
2025-05-26 18:36:15 -07:00
Adarsh Tiwari
116340f948 merge staging 2025-05-23 19:46:51 +05:30
BlankParticle
2969ad2ca8 fix: some perf improvements 2025-05-23 14:15:04 +05:30
Ahmet Kilinc
42a897d0bb adds context menu back 2025-05-22 01:16:34 +01:00
BlankParticle
fa45abaf44 feat: remixify and whatever else needed to be done 2025-05-20 13:56:47 +05:30
Aj Wazzan
fb16043912 Refactor thread deletion and pricing upgrade processes to utilize toast notifications for improved user feedback. Remove unused imports and streamline error handling in ThreadContextMenu and PricingCard components. 2025-05-19 12:11:18 -07:00
Adarsh Tiwari
682dc19bf7 Merge branch 'staging' into fixing-toast-label 2025-05-18 22:01:02 +05:30
BlankParticle
c00b8e95cb feat: add important toogle api and UI 2025-05-18 11:15:05 +05:30
Adarsh Tiwari
13b2b35dd5 refactor(mail): improve error handling and feedback for label and favorite actions 2025-05-16 14:01:30 +05:30
Ahmet Kilinc
b1dad2e254 feat: implement keyboard shortcuts for mail categories and improve selection modes 2025-05-14 13:16:50 +01:00
Ahmet Kilinc
af53d720ce refactored command palette to include onclick functionality 2025-05-13 21:33:12 +01:00
Ahmet Kilinc
6161f72619 added kbd to command pallete 2025-05-13 14:33:06 +01:00
BlankParticle
9c0cc3aa8c chore: invalidate query count on marking read/uread 2025-05-12 11:02:17 +05:30
Aj Wazzan
113a3bc329 fix: update SRH_TOKEN in docker-compose.yaml and refactor dialog components for improved consistency 2025-05-06 14:59:05 -07:00
BlankParticle
f059f95f1f chore: cleanup and refactor, remove unused files and routes 2025-05-06 00:23:56 +05:30
Aj Wazzan
d3011e0f9c feat: integrate Autumn for enhanced chat message handling and billing features 2025-05-04 22:49:58 -07:00
Aj Wazzan
9011004aca refactor: improve label deletion handling and UI updates in LabelSidebarContextMenu 2025-05-04 16:15:30 -07:00
Ahmet Kilinc
05434be503 adds context menu for labels in sidebar 2025-05-04 03:23:17 +01:00
BlankParticle
5082eda6db feat: server-action/SWR to trpc/tanstack-query 2025-05-03 18:32:20 +05:30
Adam
c869d44b19 Merge branch 'staging' into remove-mute 2025-04-30 16:40:22 -07:00
Nizzy
45e0162ddf command 2025-04-30 16:28:00 -07:00
Ahmet Kilinc
8c12bc1189 removed mute thread 2025-05-01 00:25:15 +01:00
Ahmet Kilinc
b7942853f6 addds labels to thread display and context menu 2025-04-30 21:59:46 +01:00