fix(tui): align session tab shortcut labels - #41308
Merged
Merged
Conversation
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
Treat session tab markers as keyboard shortcut labels rather than ordinal numbers:
0and is selectable with<leader>0orctrl+0·Before / After
Before
Tabs rendered their raw one-based position. Tabs 10 and later widened the gutter, shifted their title/detail alignment, and displayed numbers that did not correspond to direct tab shortcuts.
After
The first ten markers correspond exactly to direct shortcuts. Unbound tabs use a neutral marker without implying a multi-digit key sequence.
How
session-tabs-model.tsdefines the shared zero-based marker mapping.session-tabs.tsxuses the mapping and a fixed gutter in both vertical and horizontal layouts.app.tsxand the v1 keybind bridge exposesession.tab.select.10with<leader>0,ctrl+0.Scope
This does not add direct shortcuts beyond the tenth tab or change the separate pinned-session quick slots, which remain limited to nine.
Testing
bun run testinpackages/tui: 608 passed, 5 skippedbun run typecheckinpackages/tuibun run typecheckat the workspace root via the push hook: 33 packages passedbunx prettier --checkon changed filesDemo
The existing twelve-tab fixture shows
9,0, then two aligned middle dots. The selected twelfth tab retains the normal active treatment.