Repository navigation
Conversation
Several shells in one tab all read "zsh" in their headers, and only spaces and tabs could be renamed. The name is kept as the title of the pane's block, so it is saved and shared with the tab's layout document like tab names, and older documents load without one. panes() gives it as name, and the shipped pane headers prefer it. Refs herdrdev#322
|
Thanks for working on pane naming, @abhijit-s. I tried I have a small local patch that matches each row to its actual pane ID and uses an explicit pane name before the existing tab/live-title fallback. It includes test-first render/interaction regressions and a short guide update, with no Core or shared API changes. I checked it in the isolated Linux sandbox using local status/title fixtures. Would a small PR against your |
|
Thanks @M1racleShih, good catch. Yes please, open it as a PR against |
|
Opened abhijit-s/herdr-app#1 against |
fix: use each agent's pane name in the sidebar
# Conflicts: # defaults/mods/agents/main.js # scripts/agents.test.ts
|
TL;DR: the Agents sidebar now uses each agent's own pane name (then the tab name, then its live title), thanks to @M1racleShih's companion fix (abhijit-s#1), now merged into this branch. Also merged |
|
TL;DR: merged
|
# Conflicts: # defaults/AGENTS.md
For #322.
Spaces and tabs can be renamed, panes can't. A tab with three shells in it shows three headers that all read "zsh", and a layout that wants named panes has to keep the name somewhere of its own (#322: a terminal label written through a copy of the prompt mod) and draw it in its own header.
pane.rename {pane?, name}works liketab.rename(it takespane, as the other pane commands do): the pane defaults to the focused one, a person running it without a name gets the shipped prompt (pre-filled with the current name), and an empty name goes back to the program's own. The name is kept as the title of the pane's block in its tab's tree, so it is saved and shared with the tab's layout document the same way tab names are, panes on another machine keep theirs, swapping or moving a pane takes its name along, and documents saved before this load with no names. Mod panes can be named too.panes()gives each pane'sname(null when unset). The shippedpaneandterminals-paneheaders show it before the agent's name or the terminal's title.defaults/AGENTS.md,herdr.d.tsand the generated command reference list the command and the field.#322 asks for
terminal.rename. I went with the pane rather than the core terminal so the name lives where tab and space names live, in the layout document, with no core change. The trade-off is thathc lsdoesn't show it, andagents()doesn't carry it yet; happy to switch or add either if you prefer.No default key:
f2andshift-f2rename the tab and the space, and I didn't find an obvious third. Something likealt-f2, or a "Rename" entry in the pane's right-click menu, could follow if you want one.Tested on macOS 27.2 arm64:
just checkpasses (24 bun tests, 280 cargo tests, 2 ignored), including new tests for naming and clearing a pane, the document round trip to another machine, and an older document without names;just docs-checkpasses. In a running build,pane.renamenamed a pane, its header andpanes()picked the name up, an empty name cleared it, and an unknown pane id is refused (no pane "nope"). Not tried: a pane on a remote machine beyond the document test. Not tested on Linux or Windows; the change is platform-independent.