feat(pane-menu): smart top row anticipates Copy selection from tmux buffer#146
Merged
NagyVikt merged 1 commit intoMay 15, 2026
Merged
Conversation
…uffer When tmux already holds selection text in its paste buffer, surface a one-tap "Copy selection · <preview>…" row at the top of the shift+right-click pane context menu so the operator's most-probable next action is on the cursor by default. Cursor lands on it via the existing arrow-nav focus seeker; one Enter copies the selection to the system clipboard. Hidden when the buffer is empty. bash (scripts/codex-fleet/bin/pane-context-menu.sh): - Probe BUFFER_SIZE / BUFFER_SAMPLE via `tmux show-buffer` before render. - Conditionally prepend "Copy selection · <preview>…" row (hotkey 'S'). - Wire dispatch through pane-menu-clip-dual.sh for dual-clipboard parity. rust (rust/fleet-tui-poc/src/main.rs): - Add ctx_buffer_preview: Option<String> on App; probe in open_context_menu. - Extend context_menu_items signature with buffer_preview parameter. - Switch CtxItem.label to String so the runtime preview can be embedded; drop Copy from CtxItem (Clone is enough — only the renderer iterates). - Add 'S' branch to context_menu_tmux_args: tmux save-buffer | wl-copy. Verification: - bash -n scripts/codex-fleet/bin/pane-context-menu.sh -> exit 0 - shellcheck -> exit 0 (1 finding, identical to base: pre-existing SC1091) - cargo check -p fleet-tui-poc -> exit 0 - cargo build --release -p fleet-tui-poc -> exit 0 - cargo test -p fleet-tui-poc -> 3 passed; 0 failed Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Automated by gx branch finish (PR flow).