sidebar: add tmux_window_index - #215
Merged
Merged
Conversation
Contributor
Author
|
Pushed a second commit adding a |
Shows the tmux window number (e.g. 3 for 3:wm-feature-auth) in sidebar
rows, so the displayed number matches native tmux navigation (prefix+N,
status bar) instead of the sidebar-order {idx}.
The index is read from the daemon's existing list-panes poll as a
trailing format field and stamped onto agents in build_snapshot,
mirroring window_id. It refreshes every tick, so renumbered or moved
windows stay accurate. Backends without window indexes render it
empty.
'window' orders rows by session and tmux window index, keeping the
list stable while agents work and matching the tmux window list.
Pairs with {window_index}. Default remains 'recency'.
raine
force-pushed
the
feat/sidebar-window-index-token
branch
from
August 4, 2026 18:59
2054434 to
f1e376d
Compare
Owner
|
Thanks! |
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.
Implements #214: a
{window_index}template token that shows the agent's tmux window number in sidebar rows, matching native tmux navigation (prefix+N, status bar numbers) instead of sidebar ordering.How
#{window_index}is appended as a trailing field to the sidebar daemon's existinglist-panespoll format, and parsed leniently (missing/non-numeric → unset), so mixed daemon/client versions tolerate each other's linesbuild_snapshotstampsagent.window_indexfrom the poll each tick, mirroringwindow_id— window renumbering and moves stay accurateAgentPane.window_index: Option<u32>with#[serde(default)]for state-file/RPC backward compatibility; backends without window indexes leave itNoneand the token renders empty{idx}/{jump_key}; docs table updatedTesting
cargo test: 1394 passed, 0 failed (includes new tests: token parse roundtrip, resolve set/unset, snapshot stamping + stale-index clearing)cargo fmtclean;cargo clippy --all-targetsintroduces no new warnings in touched files