Skip to content

feat(ui): add show_tab_numbers config option - #3

Open
nierz wants to merge 7 commits into
tvaintrob:masterfrom
nierz:feat/show-tab-numbers
Open

nierz wants to merge 7 commits into
tvaintrob:masterfrom
nierz:feat/show-tab-numbers

Conversation

@nierz

@nierz nierz commented Aug 10, 2026

Copy link
Copy Markdown

Adds an opt-in [ui] show_tab_numbers setting that prefixes each tab label with its 1-based switch index, so the tab bar lines up with the switch_tab = "prefix+1..9" bindings (tmux's #I:#W habit).

[ui]
show_tab_numbers = true

Named tabs render as 1:mytab. Applies live via herdr server reload-config.

Notes

  • Defaults to false — with the flag off, tab_chrome_label returns the exact same string as before, so existing rendering is unchanged.
  • Auto-named tabs are skipped. ws.tab_display_name() already falls back to the bare index, so naively prefixing would render an auto-named tab as 3:3. The prefix is gated on !tab.is_auto_named(), leaving those as plain 3.
  • The flag threads through the width path, not just render. The index widens the label, so tab_width / layout_tab_hit_areas / centered_tab_scroll / max_tab_scroll / compute_tab_bar_view all take it. Passing it only to render_tab_bar would leave tab hit areas too narrow and truncate the labels.
  • Wired at both AppState init and config reload, mirroring show_clock.

Tests

Two added: tab_numbers_prefix_named_tabs_only and tab_number_prefix_counts_toward_tab_width.

cargo test --release --bin herdr -- --test-threads=12640 passed.

Depends on #2

master currently fails to compile under cfg(test) (NextBlockedAgent missing from a test-only match), so no tests can run until #2 lands. The counts above were measured with that fix applied locally. CI here will stay red until #2 merges.

There is also one pre-existing flake under parallel runs, pane_graphics_stream::inactive_owner_cancels_idle_stream_and_dispatches_close — it passes consistently in isolation and is unrelated to this change.

🤖 Generated with Claude Code

tvaintrob and others added 7 commits July 16, 2026 13:30
Add ui.tab_bar_position, ui.show_clock, and ui.prefix_hint to the
versioned config reference so it stays in sync with the config model.
…ts (tvaintrob#1)

Adds a new configurable keybinding `next_blocked_agent` that focuses the
next agent in blocked state, wrapping around when reaching the end.
This allows quickly jumping to agents that need human input without
cycling through idle/working agents.

Configuration (in config.toml):
  [keys]
  next_blocked_agent = "prefix+shift+n"

Co-authored-by: tamir altshuler <tamir@tamirs-MacBook-Pro.local>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds an opt-in `[ui] show_tab_numbers` setting that prefixes each tab
label with its 1-based switch index, so the tab bar lines up with the
`switch_tab = "prefix+1..9"` bindings. Defaults to false, leaving the
current rendering byte-identical.

Auto-named tabs already render as their bare index, so the prefix only
applies to user-named tabs — an auto-named tab stays "3" rather than
becoming "3:3".

The index participates in tab width, so `show_numbers` threads through
tab_width/layout_tab_hit_areas/compute_tab_bar_view rather than only the
render path; otherwise numbered labels would be truncated.

Applies live via `herdr server reload-config`.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.

3 participants