Skip to content

Add Show Next/Previous Tab to the Window menu (#418)#432

Open
webdevtodayjason wants to merge 1 commit into
supabitapp:mainfrom
webdevtodayjason:feat/tab-nav-menu
Open

Add Show Next/Previous Tab to the Window menu (#418)#432
webdevtodayjason wants to merge 1 commit into
supabitapp:mainfrom
webdevtodayjason:feat/tab-nav-menu

Conversation

@webdevtodayjason

Copy link
Copy Markdown
Contributor

What

Closes #418. Tab switching already works via Ghostty's next_tab / previous_tab bindings, but there were no menu items for it — so it wasn't discoverable, and (as the issue notes) you couldn't rebind it from System Settings ▸ Keyboard ▸ Shortcuts, which keys off menu titles.

Change

Adds Show Next Tab / Show Previous Tab to the Window menu (the macOS-conventional home for tab navigation).

Both route through the existing performBindingAction path with the next_tab / previous_tab binding strings — the same path Ghostty keybindings use — so any custom user bindings are honored, and there's no new tab-selection logic (the existing handleGotoTabRequest does the work).

Wiring mirrors the existing splitTerminal action end-to-end:

  • two AppFeature actions (showNextTab / showPreviousTab)
  • FocusedActions published from WorktreeDetailView, gated on an active worktree
  • menu items in WindowCommands with the Ghostty shortcut shown

Test

AppFeatureTabNavigationTests covers both directions forwarding the correct binding and the no-selection no-op.

Note: verified with swiftlint + the new tests' logic locally; I couldn't run the full build on my machine (zig 0.15.2 won't link the macOS 26.5 SDK), so I'm relying on CI for the compile + test gate. A quick check that the items land in the Window menu would be appreciated.

Tab switching already worked via Ghostty's next_tab/previous_tab bindings but
wasn't exposed as menu items, so it wasn't discoverable and couldn't be rebound
from System Settings.

Add 'Show Next Tab' / 'Show Previous Tab' to the Window menu, routed through the
existing performBindingAction path (next_tab / previous_tab) so custom bindings
are honored. Mirrors the splitTerminal wiring: reducer actions + FocusedActions
published from WorktreeDetailView, gated on an active worktree.

Adds AppFeatureTabNavigationTests covering both directions and the no-selection
no-op.
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.

Feature request: Put "Show Next Tab" and "Show Previous Tab" in the application menu

1 participant