Skip to content

add tab navigation methods#2413

Merged
yujonglee merged 6 commits intomainfrom
feat/tab-navigation-methods
Dec 19, 2025
Merged

add tab navigation methods#2413
yujonglee merged 6 commits intomainfrom
feat/tab-navigation-methods

Conversation

@ComputelessComputer
Copy link
Collaborator

@ComputelessComputer ComputelessComputer commented Dec 19, 2025

Overview

  • Added navigation methods for tab selection
  • Implemented keyboard navigation for tabs

Details

  • Introduced methods to programmatically select and navigate between tabs
  • Enabled keyboard interactions for improved tab accessibility

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 19, 2025

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

Added keyboard shortcuts (mod+alt+left and mod+alt+right) to navigate between tabs. Implemented selectNext and selectPrev actions in the tab store to cycle through tabs with wrap-around behavior, updating tab active states and persisting the new current tab.

Changes

Cohort / File(s) Summary
Tab store actions
apps/desktop/src/store/zustand/tabs/basic.ts
Added selectNext and selectPrev methods to BasicActions interface. Both cycle through tabs with wrap-around, compute current index, update active flags, and persist state.
Keyboard shortcuts wiring
apps/desktop/src/components/main/body/index.tsx
Enhanced useTabsShortcuts to extract selectNext and selectPrev from store. Wired mod+alt+left and mod+alt+right hotkeys to invoke these actions with appropriate event handling configuration.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

  • Straightforward addition of navigation logic with consistent patterns across both files
  • Minor consideration: verify wrap-around logic correctness in selectNext and selectPrev (boundary conditions when tabs list is empty or single tab)
  • Confirm hotkey configuration (preventDefault, enableOnFormTags, enableOnContentEditable) is appropriate for tab navigation context
✨ 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/tab-navigation-methods

📜 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 2bd64ad and e834093.

📒 Files selected for processing (2)
  • apps/desktop/src/components/main/body/index.tsx (2 hunks)
  • apps/desktop/src/store/zustand/tabs/basic.ts (2 hunks)

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.

@ComputelessComputer ComputelessComputer force-pushed the feat/tab-restore-functionality branch from 7dd3c0a to b9bca61 Compare December 19, 2025 03:08
@ComputelessComputer ComputelessComputer force-pushed the feat/tab-navigation-methods branch from a48e07a to 1c11584 Compare December 19, 2025 03:08
@ComputelessComputer ComputelessComputer force-pushed the feat/tab-restore-functionality branch from b9bca61 to fe44195 Compare December 19, 2025 03:09
@ComputelessComputer ComputelessComputer force-pushed the feat/tab-navigation-methods branch from 1c11584 to 6a134fd Compare December 19, 2025 03:09
@ComputelessComputer ComputelessComputer force-pushed the feat/tab-restore-functionality branch from fe44195 to fab426c Compare December 19, 2025 03:19
@ComputelessComputer ComputelessComputer force-pushed the feat/tab-navigation-methods branch from 6a134fd to c97d61e Compare December 19, 2025 03:20
@ComputelessComputer ComputelessComputer force-pushed the feat/tab-restore-functionality branch from fab426c to 3bcc180 Compare December 19, 2025 03:23
@ComputelessComputer ComputelessComputer force-pushed the feat/tab-navigation-methods branch from c97d61e to dbae5a0 Compare December 19, 2025 03:23
Base automatically changed from feat/tab-restore-functionality to main December 19, 2025 04:41
@netlify
Copy link

netlify bot commented Dec 19, 2025

Deploy Preview for hyprnote ready!

Name Link
🔨 Latest commit e834093
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote/deploys/6944d8122539f800084cece3
😎 Deploy Preview https://deploy-preview-2413--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 e834093
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote-storybook/deploys/6944d81242a1850008c28fb1
😎 Deploy Preview https://deploy-preview-2413--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 650fb65 into main Dec 19, 2025
12 of 15 checks passed
@yujonglee yujonglee deleted the feat/tab-navigation-methods branch December 19, 2025 04:44
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