Skip to content

Comments

command search pallete + ui#1197

Closed
nizzyabi wants to merge 9 commits intostagingfrom
undo-toast
Closed

command search pallete + ui#1197
nizzyabi wants to merge 9 commits intostagingfrom
undo-toast

Conversation

@nizzyabi
Copy link
Collaborator

@nizzyabi nizzyabi commented Jun 4, 2025

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

Summary by CodeRabbit

  • New Features

    • Added a feedback link to the sidebar navigation, directing users to an external feedback page.
  • Bug Fixes

    • Improved hotkey support for sidebar toggling and mail navigation, ensuring compatibility with more keyboard shortcuts.
  • Improvements

    • Refined email search assistant to exclude promotional emails by default.
    • Updated visual styling for mail list avatars, unread indicators, and search/filter UI for a cleaner appearance.
    • Enhanced AI chat tool response display for better readability.
    • Adjusted command palette and sidebar labels for improved clarity and consistency.
  • Removed Features

    • Removed the "Zero Signature" option from email settings and email composition.
    • Eliminated Intercom live support and feedback integration from the sidebar.
    • Removed text selection popover and related AI-powered sender/query research features in mail display.
  • Chores

    • Removed unused dependencies and cleaned up related configuration and localization entries.

MrgSub and others added 9 commits May 28, 2025 14:15
## Description

Improved error handling in the ZeroAgent class by providing more specific error messages when authentication fails. The changes include:

1. Enhanced the error message in the execute method to specify whether the failure is due to missing driver or connectionId
2. Improved the error message in onConnect method to clarify when a token is missing
3. Removed redundant driver check in onChatMessage method as this validation is already handled elsewhere
4. Cleaned up imports by removing unused WSMessage type

## Type of Change

- [x] 🐛 Bug fix (non-breaking change which fixes an issue)
- [x] 🔒 Security enhancement

## Areas Affected

- [x] Authentication/Authorization
- [x] API Endpoints

## Testing Done

- [x] Manual testing performed

## Security Considerations

- [x] Authentication checks are in place

## Checklist

- [x] I have performed a self-review of my code
- [x] My changes generate no new warnings

_By submitting this pull request, I confirm that my contribution is made under the terms of the project's license._
done:
- adds new hook `useOptimisticAction`
	- in mail-lsit
	- in thread-display
- adds undo action to toast (design needs updating)

wip:
- undo sent email within 10-20 seconds
- update toast design/undo button
- add shortcut to undo 😎
- safari causing slight issues but it works
# 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._
# Improve Thread Context Menu and Optimistic Updates

This PR refactors the thread context menu and optimistic state handling in the mail application to fix several issues:

1. Simplifies the `ThreadContextMenu` component by removing the redundant `emailId` prop and only using `threadId`
2. Adds support for optimistic marking as unread in the thread context menu
3. Improves the optimistic state handling in the mail list by:
   - Using a consistent thread ID across components
   - Properly displaying optimistic read/unread state
   - Fixing star toggling functionality
4. Enhances the optimistic actions system to invalidate specific queries rather than refetching everything

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

_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](../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._
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jun 4, 2025

Walkthrough

This change set removes the "zeroSignature" feature and all related logic from both frontend and backend, eliminates the text selection popover and associated AI-powered dialogs from email display, and removes Intercom integration and related UI. Additional updates include prompt adjustments for Gmail search, UI tweaks, keyboard shortcut refinements, and dependency cleanups.

Changes

Files/Groups Change Summary
.../settings/general/page.tsx, .../create/create-email.tsx, .../mail/reply-composer.tsx, .../create/email-composer.tsx, .../locales/en.json, .../src/lib/schemas.ts Removed "zeroSignature" setting, UI, logic, localization, and schema fields.
.../mail/mail-display.tsx Removed TextSelectionPopover, MoreAboutPerson, MoreAboutQuery, and all related logic/UI. Simplified sender display.
.../context/command-palette-context.tsx Commented out command descriptions and shortcut displays.
.../create/ai-chat.tsx Removed global DEBUG, simplified tool result rendering, always shows debug tooltip.
.../mail/mail-list.tsx Refactored avatar and unread indicator styling and structure.
.../mail/mail.tsx Updated search button styling and icon, tweaked filter UI.
.../ui/ai-sidebar.tsx, .../hooks/use-mail-navigation.ts, .../lib/hotkeys/use-hotkey-utils.ts Added { useKey: true } to hotkey hooks; added 'Control+0' sidebar toggle.
.../lib/hotkeys/mail-list-hotkeys.tsx Renamed variable in markAsImportant callback (no logic change).
.../ui/command.tsx Changed Search icon import, updated styling for dialog and separator.
.../ui/nav-main.tsx, .../package.json Removed Intercom integration, Live Support/Feedback UI, and dependency.
.../ui/sidebar-labels.tsx Changed background color classes for labels sidebar.
.../config/navigation.ts Added external Feedback navigation item.
.../src/lib/prompts.ts Updated Gmail search prompt to exclude promotions by default; removed redundant markdown note.
.../src/routes/agent/tools.ts Removed system prompt lines about sources and markdown from webSearch tool.
.../src/trpc/routes/ai/index.ts Removed webSearch from aiRouter.
.../src/trpc/routes/ai/search.ts Added ctx parameter to generateSearchQuery mutation.
.../src/trpc/routes/user.ts, .../server/package.json, .../wrangler.jsonc Removed JWT dependency and related environment variable.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant MailUI
    participant Server

    User->>MailUI: Compose/Reply to Email
    MailUI-->>User: Email composer (no zeroSignature logic)
    User->>MailUI: Select text in email
    Note over MailUI: No popover or AI dialogs shown
    User->>MailUI: Click Feedback
    MailUI->>User: Opens external feedback page
Loading

Possibly related PRs

  • Mail-0/Zero#1185: Modifies UI and logic of the now-removed text selection popover and dialogs in mail-display.tsx.
  • Mail-0/Zero#1188: Reverses the prompt change for Gmail search, which this PR modifies to exclude promotions by default.
  • Mail-0/Zero#1181: Adds the "zeroSignature" feature that this PR removes entirely.

Suggested labels

design

Suggested reviewers

  • MrgSub

Poem

A rabbit hops through lines of code,
Sweeping out features that once glowed.
No more signatures, no more pop,
Intercom and popovers—hop, hop, hop!
With a twitch of the nose and a flick of the ear,
The mailbox is simpler, and the UI is clear.
🐇✨

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🔭 Outside diff range comments (3)
apps/mail/lib/hotkeys/mail-list-hotkeys.tsx (1)

103-109: ⚠️ Potential issue

Fix variable naming inconsistency.

The variable is renamed to idsToArchive for the empty check but idsToMark is still used in the optimisticToggleImportant call. This will cause a runtime error since idsToMark is no longer defined.

-    const idsToArchive = mail.bulkSelected;
-    if (idsToArchive.length === 0) {
+    const idsToMark = mail.bulkSelected;
+    if (idsToMark.length === 0) {
       toast.info(t('common.mail.noEmailsToSelect'));
       return;
     }

     optimisticToggleImportant(idsToMark, true);
apps/mail/components/mail/mail-display.tsx (2)

486-1471: 🛠️ Refactor suggestion

Consider breaking down this large component for better maintainability.

The MailDisplay component is over 1000 lines and handles multiple responsibilities (email display, printing, attachments, etc.). This makes it difficult to maintain, test, and debug.

Consider extracting the following into separate modules:

  • Utility functions (formatFileSize, getFileIcon, cleanEmailDisplay, etc.) into a utilities file
  • The printMail function (~376 lines) into a separate hook or utility
  • Attachment handling logic into a separate component
  • Email details popover into a separate component

This would improve code organization, reusability, and testability while following the Single Responsibility Principle.

🧰 Tools
🪛 Biome (1.9.4)

[error] 517-517: Unnecessary use of boolean literals in conditional expression.

Simplify your code by directly assigning the result without using a ternary operator.
If your goal is negation, you may use the logical NOT (!) or double NOT (!!) operator for clearer and concise code.
Check for more details about NOT operator.
Unsafe fix: Remove the conditional expression with

(lint/complexity/noUselessTernary)


[error] 954-954: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)


[error] 961-961: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)


596-972: 🛠️ Refactor suggestion

Extract and simplify the print functionality.

The printMail function is excessively long (~376 lines) and contains embedded HTML templates with hardcoded styles. This makes it difficult to maintain and test.

Consider:

  1. Extracting the HTML template to a separate function or template file
  2. Breaking down the function into smaller, focused functions (e.g., generatePrintHTML, createPrintFrame, handlePrintExecution)
  3. Moving print-related constants and styles to a configuration object
  4. Consider using a dedicated printing library for better cross-browser compatibility

This would significantly improve code maintainability and testability.

🧰 Tools
🪛 Biome (1.9.4)

[error] 954-954: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)


[error] 961-961: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)

🧹 Nitpick comments (10)
apps/mail/components/home/HomeContent.tsx (1)

158-158: Remove extraneous whitespace
The blank line added at line 158 doesn’t impact functionality and can be removed to keep the JSX tidy and maintain consistent formatting.

apps/server/src/trpc/routes/ai/search.ts (1)

12-12: Verify the need for unused ctx parameter.

The ctx parameter was added but is not used in the function body. Consider whether this is intended for future functionality or can be removed to maintain clean code.

apps/mail/components/context/command-palette-context.tsx (2)

668-668: UI simplification reduces feature discoverability.

Commenting out the descriptions for "Search Emails" and "Filter Emails" creates a cleaner interface but may reduce discoverability for new users. Consider whether this trade-off aligns with the intended user experience.

If this is a permanent change, consider removing the commented code entirely rather than leaving it commented:

-      // description: 'Search across your emails',
-      // description: 'Filter emails by criteria',

Also applies to: 678-678


850-858: Consider removing commented shortcut code.

The commented shortcut rendering reduces visual clutter but removes helpful keyboard navigation hints. If this is a permanent UI decision, consider removing the commented code entirely for maintainability.

Apply this diff to clean up the commented code:

-                    {/* {item.shortcut && (
-                      <CommandShortcut>
-                        {item.shortcut === 'arrowUp'
-                          ? '↑'
-                          : item.shortcut === 'arrowDown'
-                            ? '↓'
-                            : item.shortcut}
-                      </CommandShortcut>
-                    )} */}
apps/server/src/trpc/routes/ai/index.ts (1)

6-8: Revert to shorthand property notation for better code style.

The explicit key-value pairs are functionally equivalent but less idiomatic. Shorthand property notation is preferred in modern JavaScript/TypeScript when the property name matches the variable name.

-  generateSearchQuery: generateSearchQuery,
-  compose: compose,
-  generateEmailSubject: generateEmailSubject,
+  generateSearchQuery,
+  compose,
+  generateEmailSubject,
apps/mail/lib/hotkeys/mail-list-hotkeys.tsx (1)

4-4: Remove unused import.

The useQueryClient import is added but never used in the component.

-import { useQueryClient } from '@tanstack/react-query';
apps/mail/components/mail/mail-list.tsx (1)

366-370: LGTM: Unread indicator repositioned with improved visibility.

The new positioning at bottom-right with a larger indicator improves visual hierarchy. The dedicated positioning wrapper is a good architectural choice.

Consider testing the indicator visibility across different avatar sizes and screen densities to ensure consistent appearance.

apps/mail/components/mail/mail-display.tsx (3)

503-503: Remove unused session variable.

The session variable is declared but never used in the component, creating dead code.

-  const { data: session } = useSession();

99-151: Consider removing unused StreamingText component.

The StreamingText component is defined but doesn't appear to be used anywhere in the codebase. This may be leftover code from the removed AI features.

If this component is truly unused, remove it to reduce bundle size and maintain code cleanliness.


408-408: Remove console.log statements from production code.

Debug console logs should be removed before merging to production as they can impact performance and potentially expose sensitive data.

-    console.log('attachments', attachments);
-    console.log('downloaded', subject, attachments);

Also applies to: 451-451

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c0f972e and 14c5585.

⛔ Files ignored due to path filters (2)
  • i18n.lock is excluded by !**/*.lock
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (28)
  • apps/mail/app/(routes)/settings/general/page.tsx (1 hunks)
  • apps/mail/components/context/command-palette-context.tsx (4 hunks)
  • apps/mail/components/create/ai-chat.tsx (3 hunks)
  • apps/mail/components/create/create-email.tsx (2 hunks)
  • apps/mail/components/create/email-composer.tsx (1 hunks)
  • apps/mail/components/home/HomeContent.tsx (1 hunks)
  • apps/mail/components/mail/mail-display.tsx (4 hunks)
  • apps/mail/components/mail/mail-list.tsx (2 hunks)
  • apps/mail/components/mail/mail.tsx (4 hunks)
  • apps/mail/components/mail/reply-composer.tsx (3 hunks)
  • apps/mail/components/ui/ai-sidebar.tsx (1 hunks)
  • apps/mail/components/ui/command.tsx (4 hunks)
  • apps/mail/components/ui/nav-main.tsx (4 hunks)
  • apps/mail/components/ui/sidebar-labels.tsx (1 hunks)
  • apps/mail/config/navigation.ts (1 hunks)
  • apps/mail/hooks/use-mail-navigation.ts (1 hunks)
  • apps/mail/lib/hotkeys/mail-list-hotkeys.tsx (2 hunks)
  • apps/mail/lib/hotkeys/use-hotkey-utils.ts (2 hunks)
  • apps/mail/locales/en.json (1 hunks)
  • apps/mail/package.json (0 hunks)
  • apps/server/package.json (0 hunks)
  • apps/server/src/lib/prompts.ts (1 hunks)
  • apps/server/src/lib/schemas.ts (0 hunks)
  • apps/server/src/routes/agent/tools.ts (0 hunks)
  • apps/server/src/trpc/routes/ai/index.ts (1 hunks)
  • apps/server/src/trpc/routes/ai/search.ts (1 hunks)
  • apps/server/src/trpc/routes/user.ts (0 hunks)
  • apps/server/wrangler.jsonc (0 hunks)
💤 Files with no reviewable changes (6)
  • apps/mail/package.json
  • apps/server/wrangler.jsonc
  • apps/server/src/trpc/routes/user.ts
  • apps/server/package.json
  • apps/server/src/routes/agent/tools.ts
  • apps/server/src/lib/schemas.ts
🧰 Additional context used
🧬 Code Graph Analysis (5)
apps/server/src/trpc/routes/ai/index.ts (2)
apps/server/src/trpc/routes/ai/search.ts (1)
  • generateSearchQuery (10-23)
apps/server/src/trpc/routes/ai/compose.ts (2)
  • compose (108-139)
  • generateEmailSubject (141-160)
apps/mail/config/navigation.ts (1)
apps/mail/components/icons/icons.tsx (1)
  • MessageSquare (491-508)
apps/mail/components/ui/command.tsx (2)
apps/mail/components/icons/icons.tsx (1)
  • Search (1642-1657)
apps/mail/lib/utils.ts (1)
  • cn (51-51)
apps/mail/components/mail/mail.tsx (1)
apps/mail/components/icons/icons.tsx (1)
  • Search (1642-1657)
apps/mail/components/ui/nav-main.tsx (4)
apps/mail/hooks/use-connections.ts (2)
  • useConnections (4-8)
  • useActiveConnection (10-14)
apps/mail/hooks/use-stats.ts (1)
  • useStats (5-17)
apps/server/src/lib/driver/google.ts (1)
  • createLabel (608-626)
apps/server/src/lib/driver/microsoft.ts (1)
  • createLabel (844-869)
🔇 Additional comments (25)
apps/mail/components/ui/sidebar-labels.tsx (1)

40-40: LGTM: Background styling change.

The change to bg-transparent aligns with the UI refinements mentioned in the AI summary.

apps/mail/lib/hotkeys/use-hotkey-utils.ts (1)

215-215: LGTM: Consistent hotkey configuration.

Adding useKey: true aligns the hotkey configuration with other hotkey registrations across the codebase, ensuring uniform behavior.

Also applies to: 286-286

apps/mail/hooks/use-mail-navigation.ts (1)

229-234: LGTM: Consistent hotkey configuration for J/K navigation.

Adding useKey: true to the J and K hotkey registrations aligns them with the existing arrow key, Enter, and Escape hotkey configurations in the same file.

apps/mail/app/(routes)/settings/general/page.tsx (1)

32-32: LGTM: Import reordering is clean.

The reordering of the Switch import maintains functionality while cleaning up the import structure.

apps/mail/components/ui/ai-sidebar.tsx (1)

447-465: LGTM: Excellent cross-platform hotkey support.

Adding separate bindings for Meta+0 (Mac) and Control+0 (Windows/Linux) provides better cross-platform accessibility. The consistent use of { useKey: true } aligns with the application's hotkey standardization.

apps/mail/components/context/command-palette-context.tsx (1)

871-871: Consistent with other shortcut removals.

The removal of the shortcut display for "Filter Syntax Help" is consistent with the other shortcut removals in this file.

apps/mail/locales/en.json (1)

381-381: LGTM: Standard localization entry.

The "noResultsFound" localization key is properly formatted and provides appropriate user feedback for empty search states.

apps/mail/config/navigation.ts (1)

222-228: Well-implemented external feedback link.

The navigation item is correctly structured with proper external URL handling, appropriate target="_blank" for opening in new tab, and consistent styling with existing navigation items.

apps/server/src/lib/prompts.ts (1)

262-262: Excellent improvement to search relevance.

Excluding promotional emails by default will significantly improve search quality while still allowing users to explicitly include them when needed. This aligns well with typical user intent when searching their mailbox.

apps/mail/components/create/create-email.tsx (1)

112-112: Clean implementation after signature feature removal.

The direct message sending without signature appending aligns well with the broader removal of the zeroSignature feature. This simplifies the email creation flow and reduces dependencies on user settings.

apps/mail/components/create/email-composer.tsx (1)

979-979: Clean simplification of Send button logic.

Good removal of the settingsLoading dependency. The Send button now correctly depends solely on the isLoading state, which simplifies the logic and aligns with the removal of the zeroSignature feature.

apps/mail/components/ui/command.tsx (1)

9-9: Good UI consistency improvements.

Nice updates:

  • Switching to local Search icon for consistency
  • Removing unnecessary borders and refining styling
  • Using CSS classes instead of props for the Search icon is cleaner
  • Background color adjustments improve visual hierarchy

These changes enhance the command palette's visual polish.

Also applies to: 35-35, 49-50, 108-108

apps/mail/components/mail/reply-composer.tsx (1)

9-9: Clean refactoring aligned with zeroSignature removal.

Good changes:

  • Switching from useSettings to useSession since settings are no longer needed
  • Simplified constructReplyBody call by removing the zeroSignature logic
  • Changes are consistent with the broader removal of the zeroSignature feature

The reply composition is now cleaner and more straightforward.

Also applies to: 26-26, 136-136

apps/mail/components/mail/mail-list.tsx (2)

330-330: LGTM: Avatar container positioning simplified.

The removal of the "relative" class is appropriate since the unread indicator now has its own positioning context (line 366). This simplifies the layout while maintaining functionality.


332-332: LGTM: Avatar styling simplified for better consistency.

The fixed className approach removes conditional styling complexity while maintaining visual consistency. The border dark:border-none provides appropriate contrast in both themes.

apps/mail/components/create/ai-chat.tsx (3)

202-207: Approve styling improvement but verify tool status.

The gray border and Markdown rendering provide better visual consistency and formatting. However, this conflicts with the AI summary indicating web search functionality removal.

Please verify if the WebSearch tool should be completely removed or if this styling change is intentional for deprecated functionality.


346-346: LGTM: Simplified text rendering logic.

Removing the WebSearch-specific filtering logic simplifies the component and aligns with the broader deprecation of web search functionality. The unconditional rendering of text parts is cleaner and more maintainable.


234-245:

Details

❓ Verification inconclusive

Verify debug information visibility in production.

The debug tooltip with tool arguments is now always rendered, removing the previous conditional check. This exposes internal tool information to all users.

Please confirm whether debug information should be visible in production environments. Consider adding an environment-based condition if this is unintended.

If debug info should be hidden in production:

+const isDevelopment = process.env.NODE_ENV === 'development';
+
 return (
   <div className="group relative">
+    {isDevelopment && (
       <Tooltip>
         <TooltipTrigger asChild>
           <InfoIcon className="fill-subtleWhite text-subtleBlack dark:fill-subtleBlack h-4 w-4 dark:text-[#373737]" />
         </TooltipTrigger>
         <TooltipContent>
           <div className="text-xs">
             <p className="mb-1 font-medium">Tool Arguments:</p>
             <pre className="whitespace-pre-wrap break-words">{JSON.stringify(args, null, 2)}</pre>
           </div>
         </TooltipContent>
       </Tooltip>
+    )}
     {content}
   </div>
 );

Confirm Debug Tooltip Visibility

The debug tooltip in apps/mail/components/create/ai-chat.tsx (lines 234–245) is now always rendered, exposing internal args to all users.

• File: apps/mail/components/create/ai-chat.tsx
Lines 234–245:

<div className="group relative">
  <Tooltip>
    <TooltipTrigger asChild>
      <InfoIcon  />
    </TooltipTrigger>
    <TooltipContent>
      <div className="text-xs">
        <p className="mb-1 font-medium">Tool Arguments:</p>
        <pre className="whitespace-pre-wrap break-words">
          {JSON.stringify(args, null, 2)}
        </pre>
      </div>
    </TooltipContent>
  </Tooltip>
  {content}
</div>

Please verify whether this debug information should remain visible in production. If not, consider wrapping the tooltip in an environment check, for example:

+ const isDev = process.env.NODE_ENV === 'development';
  return (
    <div className="group relative">
+     {isDev && (
        <Tooltip>…</Tooltip>
+     )}
      {content}
    </div>
  );
apps/mail/components/mail/mail.tsx (4)

18-18: LGTM: Search icon import added appropriately.

The Search icon import is necessary for the UI enhancement and the icon component (from apps/mail/components/icons/icons.tsx) is well-structured with proper SVG implementation.


533-533: LGTM: Search button styling improvements enhance UX.

The comprehensive styling updates create a more polished interface:

  • Height and padding adjustments improve proportions
  • Dark mode border removal creates cleaner appearance
  • Search icon adds visual clarity
  • Text simplification ("Search & Filter") is more concise

Also applies to: 537-541


549-549: LGTM: Positioning and button styling refinements.

The absolute positioning adjustment and rounded-xl border-radius on the clear button improve visual alignment and provide more modern styling.

Also applies to: 559-559


568-569: LGTM: Keyboard shortcut styling improves accessibility.

The enhanced styling makes keyboard shortcuts more visible and accessible:

  • Increased height and padding improve touch targets
  • Proper dark mode contrast ensures readability
  • Larger icon size enhances visual hierarchy
apps/mail/components/ui/nav-main.tsx (3)

25-25: LGTM: Import cleanup improves code quality.

The simplified imports removing unused dependencies align with the Intercom cleanup effort and improve bundle efficiency.

Also applies to: 35-35


80-81: LGTM: Session-based data access aligns with codebase cleanup.

The transition from settings to session data is consistent with the broader cleanup effort and provides a more direct approach to accessing user information.

Also applies to: 86-86


194-194: LGTM: Toast.promise pattern improves user experience.

The toast.promise implementation provides better user feedback with loading, success, and error states during label creation. This is a positive UX enhancement.

<div className="bg-background no-scrollbar relative -m-2 flex-1 overflow-auto">
<Tree className="bg-background rounded-md">
<div className="bg-transparent no-scrollbar relative -m-2 flex-1 overflow-auto">
<Tree className="bg-transprent rounded-md">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix the typo in CSS class name.

The class name bg-transprent contains a typo and should be bg-transparent to match the styling change on line 40.

-        <Tree className="bg-transprent rounded-md">
+        <Tree className="bg-transparent rounded-md">
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<Tree className="bg-transprent rounded-md">
<Tree className="bg-transparent rounded-md">
🤖 Prompt for AI Agents
In apps/mail/components/ui/sidebar-labels.tsx at line 41, fix the typo in the
CSS class name by changing "bg-transprent" to "bg-transparent" to ensure the
correct styling is applied.

@nizzyabi nizzyabi closed this Jun 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants