Skip to content

add keyboard shortcuts for new tabs#2414

Merged
yujonglee merged 7 commits intomainfrom
feat/add-keyboard-shortcuts-tabs
Dec 19, 2025
Merged

add keyboard shortcuts for new tabs#2414
yujonglee merged 7 commits intomainfrom
feat/add-keyboard-shortcuts-tabs

Conversation

@ComputelessComputer
Copy link
Collaborator

@ComputelessComputer ComputelessComputer commented Dec 19, 2025

Description

  • Added keyboard shortcuts for opening new tabs
  • Implemented new hotkey functionality for improved user navigation

This is part 3 of 3 in a stack made with GitButler:

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 19, 2025

📝 Walkthrough

Walkthrough

Added keyboard shortcuts for creating new items of various types (calendar, contacts, folders, data) using mod+shift+c, mod+shift+n, mod+shift+d, and mod+shift+f. The useTabsShortcuts hook now consumes the openNew action from the tab store to trigger these new item creation operations.

Changes

Cohort / File(s) Summary
Keyboard shortcuts for new item creation
apps/desktop/src/components/main/body/index.tsx
Added four hotkey handlers (mod+shift+c for calendar, mod+shift+n for contacts, mod+shift+d for data, mod+shift+f for folders) that invoke openNew with corresponding payloads. Extended useTabsShortcuts to destructure and expose openNew from the tab store via useTabs and useShallow. Updated selector and dependency arrays to include the new action.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Single file change with repetitive hotkey setup patterns
  • Straightforward hook extension to consume existing store action
  • Clear correspondence between keyboard shortcuts and their payloads

Possibly related PRs

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'add keyboard shortcuts for new tabs' directly matches the changeset, which introduces keyboard shortcuts for creating new items (calendar, contacts, folders, data).
Description check ✅ Passed The description mentions adding keyboard shortcuts for opening new tabs and implementing new hotkey functionality, which aligns with the changeset that adds keyboard shortcuts for creating new items.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/add-keyboard-shortcuts-tabs

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 650fb65 and 200ee51.

📒 Files selected for processing (1)
  • apps/desktop/src/components/main/body/index.tsx (3 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
**/*

📄 CodeRabbit inference engine (AGENTS.md)

Format using dprint fmt from the root. Do not use cargo fmt.

Files:

  • apps/desktop/src/components/main/body/index.tsx
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx}: Avoid creating a bunch of types/interfaces if they are not shared. Especially for function props. Just inline them.
Never do manual state management for form/mutation. Use useForm from tanstack-form and useQuery/useMutation from tanstack-query for 99% cases.

Files:

  • apps/desktop/src/components/main/body/index.tsx
**/*.{ts,tsx,rs,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

By default, avoid writing comments at all. If you write one, it should be about 'Why', not 'What'.

Files:

  • apps/desktop/src/components/main/body/index.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx,js,jsx}: If there are many classNames with conditional logic, use cn (import from @hypr/utils). Always pass an array and split by logical grouping.
Use motion/react instead of framer-motion.

Files:

  • apps/desktop/src/components/main/body/index.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). (7)
  • GitHub Check: Redirect rules - hyprnote
  • GitHub Check: Header rules - hyprnote
  • GitHub Check: Pages changed - hyprnote
  • GitHub Check: fmt
  • GitHub Check: desktop_ci (linux, depot-ubuntu-24.04-8)
  • GitHub Check: desktop_ci (linux, depot-ubuntu-22.04-8)
  • GitHub Check: desktop_ci (macos, depot-macos-14)
🔇 Additional comments (2)
apps/desktop/src/components/main/body/index.tsx (2)

625-625: LGTM!

The addition of openNew to the destructured state follows the existing pattern and is required for the new keyboard shortcuts.

Also applies to: 635-635


737-779: All keyboard shortcut payloads are correctly typed and compatible with the openNew function signature. The Tab type definition supports all four payload structures, with optional state fields properly defaulted in getDefaultState.

Likely an incorrect or invalid review comment.


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

Comment @coderabbitai help to get the list of available commands and usage tips.

Base automatically changed from feat/tab-navigation-methods to main December 19, 2025 04:44
@netlify
Copy link

netlify bot commented Dec 19, 2025

Deploy Preview for hyprnote ready!

Name Link
🔨 Latest commit 200ee51
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote/deploys/6944d84c42a1850008c28fcc
😎 Deploy Preview https://deploy-preview-2414--hyprnote.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Dec 19, 2025

Deploy Preview for hyprnote-storybook ready!

Name Link
🔨 Latest commit 200ee51
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote-storybook/deploys/6944d84cb89f4700080a8261
😎 Deploy Preview https://deploy-preview-2414--hyprnote-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@yujonglee yujonglee merged commit ee431f2 into main Dec 19, 2025
16 checks passed
@yujonglee yujonglee deleted the feat/add-keyboard-shortcuts-tabs branch December 19, 2025 05:47
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.

2 participants

Comments