Skip to content

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
iurysza:mainfrom
abosnjakovic:feat/whole-tab-capture-and-links
Open

feat: Capture every pane in the current window/tab and merge visible links into the file picker#3
abosnjakovic wants to merge 2 commits into
iurysza:mainfrom
abosnjakovic:feat/whole-tab-capture-and-links

Conversation

@abosnjakovic

Copy link
Copy Markdown

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 capturecapture_pane_text now reads the visible viewport of every pane in the source window (tmux) / tab (herdr), source pane first:

  • tmux: panes enumerated via list-panes, the source pane id canonicalised via display-message '#{pane_id}' so alternate id forms don't double-capture; the existing copy-mode viewport logic is preserved per pane (_capture_single)
  • herdr: panes enumerated via pane list filtered by the source pane's tab_id; the plugin's own popup pane is excluded via HERDR_PANE_ID
  • candidate order still follows on-screen appearance, source pane's hits first; relative paths resolve against the source pane's root
  • any enumeration failure falls back to the previous single-pane behaviour

Links merged into the file pickerpick appends visible URLs (deduped) after file candidates via a new merge_link_candidates helper, 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 dedicated links flow is unchanged.

Testing

  • python -m unittest discover tests — 122 tests green
  • New coverage: whole-window capture for both backends, source-pane-first ordering, link merge/dedupe, URL preview
  • Two existing capture tests updated from single return_value mocks to command-keyed fakes, since capture now issues one subprocess call per pane
  • Verified live in herdr: a tab with two Claude Code panes now yields the union of both panes' paths plus visible URLs

abosnjakovic and others added 2 commits August 15, 2026 13:18
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant