Skip to content

feat: "Open in New Tab" for Explorer (menu entry and t key) - #105

Open
mansortner wants to merge 1 commit into
alexarthurs:mainfrom
mansortner:feat/open-in-new-tab
Open

mansortner wants to merge 1 commit into
alexarthurs:mainfrom
mansortner:feat/open-in-new-tab

Conversation

@mansortner

Copy link
Copy Markdown

What

  • Adds an "Open in New Tab" entry to the Explorer context menu, offered on files, folders and empty space.
  • Adds the t key as a shortcut.
  • It opens a plain shell tab in the sidebar's workspace and focuses it. The tab's cwd is the selected folder, the parent of a selected file, or the root when nothing is selected, and the tab is labelled with the folder name.
  • Implemented with tab.create over the IPC, then the existing viewer::focus_tab_for_client.
  • Includes a unit test that the entry is offered for files, folders and empty space; the README key table has a new t row.

Why

You can already reveal a folder externally or preview a file, but there is no one-step way to start a terminal in the folder you are looking at.

t is free in Explorer; Source Control keeps t for its tree/list toggle, and the README row says so. Plain right-click is herdr's own pane menu, so the plugin menu is reached with m or Ctrl+right-click, and both reach the new entry.

Checklist

  • cargo build --release succeeds (run from plugins/herdr-sidebar)
  • cargo test passes (the flaky git::tests::ignored_scan_lock_is_single_flight also fails intermittently on untouched main, about 2 of 25 runs, so it is unrelated to this change)
  • cargo clippy --release -- -D warnings is clean
  • Exercised in a live herdr pane on herdr 0.8.2: t on a directory row opens a tab named after the folder, with the right cwd, focused; the menu entry works too
  • README / AGENTS.md updated if keys, persistence, or the manifest changed (README key table)

🤖 Generated with Claude Code

Opens a shell tab in the sidebar's workspace, cwd = the selected folder
(a file's parent; the root for empty space), labeled with the folder
name, and focuses it.
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