Skip to content

fix(tui): align session tab shortcut labels - #41308

Merged
kitlangton merged 1 commit into
v2from
fix/tui-tab-shortcut-labels
Aug 9, 2026
Merged

fix(tui): align session tab shortcut labels#41308
kitlangton merged 1 commit into
v2from
fix/tui-tab-shortcut-labels

Conversation

@kitlangton

Copy link
Copy Markdown
Contributor

What

Treat session tab markers as keyboard shortcut labels rather than ordinal numbers:

  • tabs 1-9 render their matching digit
  • tab 10 renders 0 and is selectable with <leader>0 or ctrl+0
  • later tabs render a subdued ·
  • every marker uses the same two-cell gutter, so titles and vertical-tab details stay aligned

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.

9  Ninth tab
10 Tenth tab
11 Eleventh tab

After

The first ten markers correspond exactly to direct shortcuts. Unbound tabs use a neutral marker without implying a multi-digit key sequence.

9  Ninth tab
0  Tenth tab
·  Eleventh tab

How

  • session-tabs-model.ts defines the shared zero-based marker mapping.
  • session-tabs.tsx uses the mapping and a fixed gutter in both vertical and horizontal layouts.
  • app.tsx and the v1 keybind bridge expose session.tab.select.10 with <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 test in packages/tui: 608 passed, 5 skipped
  • bun run typecheck in packages/tui
  • bun run typecheck at the workspace root via the push hook: 33 packages passed
  • bunx prettier --check on changed files
  • OpenTUI capture of the 12-tab fixture in vertical orientation

Demo

The existing twelve-tab fixture shows 9, 0, then two aligned middle dots. The selected twelfth tab retains the normal active treatment.

Vertical session tabs showing shortcut labels through tab twelve

@kitlangton
kitlangton merged commit bc51baa into v2 Aug 9, 2026
10 of 14 checks passed
@kitlangton
kitlangton deleted the fix/tui-tab-shortcut-labels branch August 9, 2026 00:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant