Repository navigation
fix(sidebar): the rail hands the cursor back to the person's pane - #25
Merged
hishboy merged 1 commit intoSep 3, 2026
Merged
Conversation
A bare `chief` opened the company with the cursor in the sidebar rail instead of in the pane the operator types into, so their first keystrokes went to furniture. Both rail-mint sites split without `-d` on purpose: every write that follows names a WINDOW, and tmux resolves a window target to its active pane, so the new rail has to be active while it is tagged and resized. Each frame now ENDS with `select-pane -l` at that window — the last pane, which a split makes the pane that was active before it, even when the split targeted some other pane. Pinned by argv tests at both sites (which fail if the selection is dropped or moved ahead of the tag) and by two real-tmux tests that ask the server which pane is active after the frame runs. Both real tests were run as controls with the selection removed and reproduce the operator's report exactly. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
hishboy
approved these changes
Sep 3, 2026
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.
The report
A bare
chiefopens the company with the cursor in the sidebar rail instead of in the person's pane, so the operator's first keystrokes go to furniture.The cause
Both rail-mint sites run
split-windowwith no-d, which leaves the new rail as the window's active pane and nothing ever gives the cursor back:attach.rs::rail_mint_argv— the frame a fresh attach publishes.actuate/interpret.rs— the actuator's repair batch for a window missing its rail.The missing
-dis deliberate and stays: every write after the split names a WINDOW, and tmux resolves a window target to its active pane, so the rail must be active while it is tagged and resized. A-dsplit would need a second tmux invocation to name the pane, and a rail observable untagged is the gap that once put two rails in one window.The fix
Each mint frame now ends with
select-pane -lat that window — the window's last pane, which a split makes the pane that was active before it. Measured on tmux 3.7c: this holds even when the split targeted some other pane, so the cursor returns to the operator and never to the split target.Tests
the_rail_frame_hands_the_cursor_back_after_every_other_write(attach.rs) — the selection is last, and every window-targeted write precedes it.a_repaired_rail_gives_the_cursor_back_after_it_is_tagged(interpret) — same rule on the repair batch.a_real_rail_mint_leaves_the_person_pane_activeandreal_rail_repair_leaves_the_person_pane_active_and_not_the_rail— real tmux: run the frame, then ask the server which pane is active.Both real tests were run as controls with the selection removed; both fail there and report the rail as active, which is the operator's report reproduced exactly.
Local:
cargo fmt --checkclean,cargo clippy --workspace --all-targets -- -D warningsclean,attach::module green (68 passed),interpret::testsgreen,bun run test:pre-push-guards99/99, exit 0.🤖 Generated with Claude Code