feat: Capture every pane in the current window/tab and merge visible links into the file picker - #3
Open
abosnjakovic wants to merge 2 commits into
Open
Conversation
…ks into the file picker - tmux and herdr backends now capture the visible viewport of every pane in the source window/tab (source pane first). Relative paths resolve against the source pane's root. - The file picker appends visible URLs so one picker lists paths and links together: Enter opens a URL in the browser, Ctrl-Y copies it, and the preview shows the URL.
… pane enumeration
- cmd_pick: decide the full-repo fallback from visible file candidates only,
and prepend visible URLs to the fallback picker so a lone URL no longer hides
the repo listing
- cmd_pick URL branch: log pick_url, show "Link copied to clipboard" on Ctrl-Y
(matches the links picker), and return explicitly after open_url
- tmux: skip the source pane by both canonical and given id; log
capture_window_fallback when list-panes fails
- herdr: use .get("pane_id") so a malformed pane entry degrades to single-pane
capture instead of raising; log capture_tab_fallback
- docs: picker footer and README describe URL-row keys
- tests: tmux fallback/alias dedupe, herdr own-pane exclusion, cmd_pick URL
enter/ctrl-y, URL-only fallback
Co-Authored-By: Claude Fable 5 <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.
Motivation
When running two agent sessions side by side (e.g. Claude Code in both halves of a tmux window or herdr tab), the picker only reads the focused pane's viewport. A path mentioned in the neighbouring pane is invisible to it — you have to focus that pane first and reopen the picker. The file picker and link picker are also separate flows, so "open the thing my agent just mentioned" needs two keybindings depending on whether it's a path or a URL.
Changes
Whole-window capture —
capture_pane_textnow reads the visible viewport of every pane in the source window (tmux) / tab (herdr), source pane first:list-panes, the source pane id canonicalised viadisplay-message '#{pane_id}'so alternate id forms don't double-capture; the existing copy-mode viewport logic is preserved per pane (_capture_single)pane listfiltered by the source pane'stab_id; the plugin's own popup pane is excluded viaHERDR_PANE_IDLinks merged into the file picker —
pickappends visible URLs (deduped) after file candidates via a newmerge_link_candidateshelper, so one picker lists paths and links together. Selecting a URL: Enter opens it with the default opener, Ctrl-Y copies it, and the preview shows the URL. The dedicatedlinksflow is unchanged.Testing
python -m unittest discover tests— 122 tests greenreturn_valuemocks to command-keyed fakes, since capture now issues one subprocess call per pane