feat(tabs): add "Show tab numbers" setting (horizontal + vertical tabs)#11597
feat(tabs): add "Show tab numbers" setting (horizontal + vertical tabs)#11597ultramcu wants to merge 3 commits into
Conversation
Add an optional setting that prefixes each tab title with its 1-based
position number, making the Cmd+1..9 tab-switch shortcuts discoverable
at a glance.
- New TabSettings bool 'show_tab_numbers' (default off),
toml_path appearance.tabs.show_tab_numbers
- TabComponent prepends '{n} {title}' when enabled
- Clickable toggle under Settings -> Appearance -> Tabs
- Notify-only handler for the new TabSettingsChangedEvent variant
The initial setting only affected the horizontal tab bar. Render the same 1-based number on each vertical tab's representative row (expanded, compact, and summary view modes) so it works regardless of tab layout.
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @ultramcu on file. In order for us to review and merge your code, each contributor must visit https://cla.warp.dev to read and agree to our CLA. Once you have done so, please comment |
|
This PR is not linked to an issue that is marked with Issue-state enforcement details:
To continue, link this PR to a same-repo issue such as Powered by Oz |
There was a problem hiding this comment.
This PR is not linked to an issue that is marked with ready-to-implement.
Issue-state enforcement details:
-
Associated same-repo issues checked: none
-
Required readiness label:
ready-to-implement
To continue, link this PR to a same-repo issue such as Closes #123 in the PR description, and make sure that issue has ready-to-implement.
Powered by Oz
|
@cla-bot check |
1 similar comment
|
@cla-bot check |
|
The cla-bot has been summoned, and re-checked this pull request! |
|
@oss-maintainers This PR implements #4028 ("Show Tab number on tabs"), which is currently labeled To support the spec flow in Could you take a look and, if it's a direction you're open to, move #4028 to |
Description
Adds an optional "Show tab numbers" setting (Settings → Appearance → Tabs; default off) that prefixes each tab with its 1‑based position number, making the
Cmd+1..9tab‑switch shortcuts discoverable at a glance. The number is presentation‑only — it is never written into stored tab titles, copied text, or search text.Works in both layouts:
TabComponent::render_tab_contentprefixes the title ("{n} {title}").tab_number: Option<usize>onPaneProps, set on each tab's representative (first) row only, rendered via a smallrender_tab_number_labelelement before the icon. Covers all three view modes (Expanded, Compact, Summary).The numbering is consistent with the shortcut: tab
tabs[0]shows 1 andCmd+1activates it (ActivateTabByNumber(n)→tabs[n-1]).Files
app/src/workspace/tab_settings.rs— newshow_tab_numbersbool (appearance.tabs.show_tab_numbers).app/src/tab.rs— horizontal tab rendering.app/src/settings_view/appearance_page.rs— Settings UI toggle (mirrors "Show tab indicators").app/src/workspace/view.rs—TabSettingsChangedEvent::ShowTabNumbershandler.app/src/workspace/view/vertical_tabs.rs— vertical tab rendering.specs/GH4028/— product + tech spec.Linked Issue
Closes #4028 ("Show Tab number on tabs").
ready-to-specorready-to-implement.Testing
Cmd+N. The number does not leak into copied tab titles or tab search.Automated:
cargo check -p warp— clean.cargo test -p warp tab_settings— passing.cargo fmt/cargo clippy -p warp --all-targets— clean.Screenshots / Videos
Agent Mode
CHANGELOG-IMPROVEMENT: Add a "Show tab numbers" setting (Appearance → Tabs) that labels each tab with its
Cmd+Nswitch position, for both horizontal and vertical tabs.