feat: remove old hotkeys and add new View hotkeys#1918
Conversation
Bug Report
To fix this, the Comments? Email us. |
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughKeyboard shortcut support for toggling category label filters has been added to the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant CategoryDropdown
participant LabelState
User->>CategoryDropdown: Presses number key (1-9)
CategoryDropdown->>LabelState: Toggle corresponding category label
User->>CategoryDropdown: Presses '0'
CategoryDropdown->>LabelState: Clear all labels
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🧰 Additional context used📓 Path-based instructions (4)**/*.{js,jsx,ts,tsx}📄 CodeRabbit Inference Engine (AGENT.md)
Files:
**/*.{js,jsx,ts,tsx,css,scss}📄 CodeRabbit Inference Engine (AGENT.md)
Files:
**/*.{ts,tsx}📄 CodeRabbit Inference Engine (AGENT.md)
Files:
**/*.{css,js,ts,jsx,tsx,mdx}📄 CodeRabbit Inference Engine (.cursor/rules/tailwind-css-v4.mdc)
Files:
🧠 Learnings (9)📓 Common learnings📚 Learning: in apps/mail/lib/hotkeys/mail-list-hotkeys.tsx, the switchcategorybyindex function using hardcoded i...Applied to files:
📚 Learning: applies to **/*.{js,jsx,ts,tsx,css,scss} : use prettier with sort-imports and tailwind plugins for c...Applied to files:
📚 Learning: applies to **/postcss.config.{js,cjs,mjs,ts} : do not use `postcss-import` or `autoprefixer` with ta...Applied to files:
📚 Learning: applies to **/*.{css,js,ts,jsx,tsx,mdx} : do not use deprecated utilities like `bg-opacity-*`, `text...Applied to files:
📚 Learning: applies to **/*.{css,js,ts,jsx,tsx,mdx} : use renamed utilities: `shadow-sm` is now `shadow-xs`, `sh...Applied to files:
📚 Learning: applies to **/*.{css,js,ts,jsx,tsx,mdx} : use new variants such as `starting`, `not-*`, `inert`, `nt...Applied to files:
📚 Learning: in react hook form, avoid using useeffect for form state synchronization when the values prop can ha...Applied to files:
📚 Learning: during testing phases, debug logging should be kept active in apps/server/src/lib/email-verification...Applied to files:
🔇 Additional comments (2)
✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
There was a problem hiding this comment.
cubic analysis
1 issue found across 2 files • Review in cubic
React with 👍 or 👎 to teach cubic. You can also tag @cubic-dev-ai to give feedback, ask questions, or re-run the review.
There was a problem hiding this comment.
Actionable comments posted: 5
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (2)
apps/mail/components/mail/mail.tsx(2 hunks)apps/mail/lib/hotkeys/mail-list-hotkeys.tsx(4 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{js,jsx,ts,tsx}
📄 CodeRabbit Inference Engine (AGENT.md)
**/*.{js,jsx,ts,tsx}: Use 2-space indentation
Use single quotes for strings
Limit lines to 100 characters in length
Semicolons are required at the end of statements
Files:
apps/mail/lib/hotkeys/mail-list-hotkeys.tsxapps/mail/components/mail/mail.tsx
**/*.{js,jsx,ts,tsx,css,scss}
📄 CodeRabbit Inference Engine (AGENT.md)
Use Prettier with sort-imports and Tailwind plugins for code formatting
Files:
apps/mail/lib/hotkeys/mail-list-hotkeys.tsxapps/mail/components/mail/mail.tsx
**/*.{ts,tsx}
📄 CodeRabbit Inference Engine (AGENT.md)
Enable TypeScript strict mode
Files:
apps/mail/lib/hotkeys/mail-list-hotkeys.tsxapps/mail/components/mail/mail.tsx
**/*.{css,js,ts,jsx,tsx,mdx}
📄 CodeRabbit Inference Engine (.cursor/rules/tailwind-css-v4.mdc)
**/*.{css,js,ts,jsx,tsx,mdx}: Chain variants together for composable variants (e.g.,group-has-data-potato:opacity-100).
Use new variants such asstarting,not-*,inert,nth-*,in-*,open(for:popover-open), and**for all descendants.
Do not use deprecated utilities likebg-opacity-*,text-opacity-*,border-opacity-*, anddivide-opacity-*; use the new syntax (e.g.,bg-black/50).
Use renamed utilities:shadow-smis nowshadow-xs,shadowis nowshadow-sm,drop-shadow-smis nowdrop-shadow-xs,drop-shadowis nowdrop-shadow-sm,blur-smis nowblur-xs,bluris nowblur-sm,rounded-smis nowrounded-xs,roundedis nowrounded-sm,outline-noneis nowoutline-hidden.
Usebg-(--brand-color)syntax for CSS variables in arbitrary values instead ofbg-[--brand-color].
Stacked variants now apply left-to-right instead of right-to-left.
Files:
apps/mail/lib/hotkeys/mail-list-hotkeys.tsxapps/mail/components/mail/mail.tsx
🧠 Learnings (4)
📓 Common learnings
Learnt from: retrogtx
PR: Mail-0/Zero#1328
File: apps/mail/lib/hotkeys/mail-list-hotkeys.tsx:202-209
Timestamp: 2025-06-18T17:26:50.918Z
Learning: In apps/mail/lib/hotkeys/mail-list-hotkeys.tsx, the switchCategoryByIndex function using hardcoded indices for category hotkeys does not break when users reorder categories, contrary to the theoretical index-shifting issue. The actual implementation has constraints or mechanisms that prevent hotkey targeting issues.
📚 Learning: in apps/mail/lib/hotkeys/mail-list-hotkeys.tsx, the switchcategorybyindex function using hardcoded i...
Learnt from: retrogtx
PR: Mail-0/Zero#1328
File: apps/mail/lib/hotkeys/mail-list-hotkeys.tsx:202-209
Timestamp: 2025-06-18T17:26:50.918Z
Learning: In apps/mail/lib/hotkeys/mail-list-hotkeys.tsx, the switchCategoryByIndex function using hardcoded indices for category hotkeys does not break when users reorder categories, contrary to the theoretical index-shifting issue. The actual implementation has constraints or mechanisms that prevent hotkey targeting issues.
Applied to files:
apps/mail/lib/hotkeys/mail-list-hotkeys.tsxapps/mail/components/mail/mail.tsx
📚 Learning: applies to **/*.{css,js,ts,jsx,tsx,mdx} : use renamed utilities: `shadow-sm` is now `shadow-xs`, `sh...
Learnt from: CR
PR: Mail-0/Zero#0
File: .cursor/rules/tailwind-css-v4.mdc:0-0
Timestamp: 2025-08-03T20:42:04.207Z
Learning: Applies to **/*.{css,js,ts,jsx,tsx,mdx} : Use renamed utilities: `shadow-sm` is now `shadow-xs`, `shadow` is now `shadow-sm`, `drop-shadow-sm` is now `drop-shadow-xs`, `drop-shadow` is now `drop-shadow-sm`, `blur-sm` is now `blur-xs`, `blur` is now `blur-sm`, `rounded-sm` is now `rounded-xs`, `rounded` is now `rounded-sm`, `outline-none` is now `outline-hidden`.
Applied to files:
apps/mail/lib/hotkeys/mail-list-hotkeys.tsx
📚 Learning: in react hook form, avoid using useeffect for form state synchronization when the values prop can ha...
Learnt from: retrogtx
PR: Mail-0/Zero#1354
File: apps/mail/components/ui/prompts-dialog.tsx:85-88
Timestamp: 2025-06-20T05:03:16.944Z
Learning: In React Hook Form, avoid using useEffect for form state synchronization when the values prop can handle reactive updates automatically. The values prop is specifically designed for this purpose and is more optimal than manual useEffect-based synchronization.
Applied to files:
apps/mail/lib/hotkeys/mail-list-hotkeys.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: cubic · AI code reviewer
🔇 Additional comments (1)
apps/mail/components/mail/mail.tsx (1)
718-728: Perfect implementation for the clear-all hotkey!This is exactly how you build reliable systems - clean, focused, and does exactly what it says on the tin. The '0' key to clear all labels is intuitive and the implementation is rock-solid.
10eae48 to
51bb718
Compare
|
An error occured. This error may be due to rate limits. If this error persists, please email us. |
Merge activity
|
51bb718 to
25d4d94
Compare
Bug Report
Comments? Email us. |
25d4d94 to
6b447f1
Compare
Bug Report
Comments? Email us. |

Add Numeric Hotkeys for Category Selection in Mail List
Description
This PR adds keyboard shortcuts for quickly toggling mail categories in the inbox view:
The implementation uses React Hotkeys Hook to register these shortcuts within the mail-list scope, making View switching much faster for keyboard-oriented users.
Type of Change
Areas Affected
Testing Done
Checklist
Summary by CodeRabbit
New Features
Refactor