Add Show Next/Previous Tab to the Window menu (#418) - #432
Open
webdevtodayjason wants to merge 1 commit into
Open
Add Show Next/Previous Tab to the Window menu (#418)#432webdevtodayjason wants to merge 1 commit into
webdevtodayjason wants to merge 1 commit into
Conversation
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. The binding action surfaces as GHOSTTY_ACTION_GOTO_TAB and lands on the same selectTab path the tab bar and Select Tab shortcut use, so it composes with tab hibernation. Classify both actions in AppFeature.Action.affectsWorktreeMenuSnapshot, the post-reduce gate that deliberately has no default arm: neither action writes a snapshot input, so both belong with the other terminal-routing actions. Adds AppFeatureTabNavigationTests covering both directions and the no-selection no-op.
webdevtodayjason
force-pushed
the
feat/tab-nav-menu
branch
from
July 24, 2026 19:38
acfc464 to
7eebf03
Compare
|
Thanks, this now meets the contribution policy. I've cleared the |
Contributor
Author
|
Refreshed: rebased onto current main (was 115 commits behind) and fixed the CI failure — the June |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Closes #418. Tab switching already works via Ghostty's
next_tab/previous_tabbindings, 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
performBindingActionpath with thenext_tab/previous_tabbinding strings — the same path Ghostty keybindings use — so any custom user bindings are honored, and there's no new tab-selection logic (the existinghandleGotoTabRequestdoes the work).Wiring mirrors the existing
splitTerminalaction end-to-end:AppFeatureactions (showNextTab/showPreviousTab)FocusedActions published fromWorktreeDetailView, gated on an active worktreeWindowCommandswith the Ghostty shortcut shownTest
AppFeatureTabNavigationTestscovers both directions forwarding the correct binding and the no-selection no-op.