From fe693f613a23452e68589a4337863f217cc57930 Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Mon, 11 May 2026 23:31:36 +0300 Subject: [PATCH] feat: add optional pane border labels --- CONFIGURATION.md | 4 +++ SOCKET_API.md | 20 +++++++++++++++ src/api/mod.rs | 1 + src/api/schema.rs | 12 +++++++++ src/app/api.rs | 42 ++++++++++++++++++++++++++++++ src/app/config_io.rs | 13 ++++++++++ src/app/creation.rs | 1 + src/app/input/mod.rs | 5 +++- src/app/input/modal.rs | 53 +++++++++++++++++++++++++++++++++++--- src/app/input/mouse.rs | 16 ++++++++++-- src/app/input/navigate.rs | 16 ++++++++++++ src/app/input/settings.rs | 43 +++++++++++++++++++++++++++++++ src/app/mod.rs | 54 ++++++++++++++++++++++++++++++++++++++- src/app/state.rs | 46 +++++++++++++++++++++++++++++---- src/cli.rs | 34 +++++++++++++++++++++--- src/config/keybinds.rs | 26 +++++++++++++------ src/config/model.rs | 19 ++++++++++++++ src/main.rs | 4 +++ src/pane/state.rs | 39 ++++++++++++++++++++++++++++ src/persist/restore.rs | 9 ++++++- src/persist/snapshot.rs | 13 +++++++++- src/ui.rs | 4 ++- src/ui/dialogs.rs | 1 + src/ui/keybind_help.rs | 1 + src/ui/panes.rs | 44 ++++++++++++++++++++++++++++++- src/ui/settings.rs | 11 ++++++++ src/ui/sidebar.rs | 1 + src/workspace.rs | 6 +++++ 28 files changed, 509 insertions(+), 29 deletions(-) diff --git a/CONFIGURATION.md b/CONFIGURATION.md index bdea9919..d92e0b83 100644 --- a/CONFIGURATION.md +++ b/CONFIGURATION.md @@ -98,6 +98,7 @@ new_tab = "c" split_vertical = "v" split_horizontal = "-" close_pane = "x" +rename_pane = "" # optional, unset by default fullscreen = "f" resize_mode = "r" toggle_sidebar = "b" @@ -135,6 +136,7 @@ focus_pane_right = "alt+l" | `split_vertical` | `v` | split pane vertically (side by side) | | `split_horizontal` | `-` | split pane horizontally (stacked) | | `close_pane` | `x` | close focused pane | +| `rename_pane` | unset | rename the focused pane | | `fullscreen` | `f` | toggle focused pane fullscreen | | `resize_mode` | `r` | enter or leave resize mode | | `toggle_sidebar` | `b` | collapse or expand the sidebar | @@ -251,6 +253,7 @@ for `panel_bg`, you can also use `reset`, `default`, `none`, or `transparent` to [ui] sidebar_width = 26 confirm_close = true +show_agent_labels_on_pane_borders = false agent_panel_scope = "all" accent = "cyan" ``` @@ -261,6 +264,7 @@ accent = "cyan" |--------|---------|-------------| | `sidebar_width` | `26` | base sidebar width before auto-scaling | | `confirm_close` | `true` | ask before closing a workspace | +| `show_agent_labels_on_pane_borders` | `false` | show detected/reported agent labels in split pane borders when no manual pane name is set | | `agent_panel_scope` | `all` | sidebar agent list scope: `current` or `all` | | `accent` | `cyan` | highlight and border color | diff --git a/SOCKET_API.md b/SOCKET_API.md index 86b319a6..51046860 100644 --- a/SOCKET_API.md +++ b/SOCKET_API.md @@ -145,12 +145,15 @@ for backward compatibility, requests also accept the older positional forms like "tab_id": "w64e95948145ed1:1", "focused": true, "cwd": "/home/can/Projects/herdr", + "label": "reviewer", "agent": "pi", "agent_status": "working", "revision": 0 } ``` +`label` is an optional manual pane name set through `pane.rename`. + `agent` is an optional display label string. - when herdr detects a built-in agent, this is that built-in name like `pi` or `claude` @@ -202,6 +205,7 @@ for backward compatibility, requests also accept the older positional forms like | `tab.close` | close a tab | `ok` | | `pane.list` | list panes, optionally filtered by workspace | `pane_list` | | `pane.get` | inspect one pane | `pane_info` | +| `pane.rename` | set or clear a manual pane label | `pane_info` | | `pane.read` | read pane output | `pane_read` | | `pane.split` | split a pane and create a sibling pane | `pane_info` | | `pane.send_text` | send literal text without Enter | `ok` | @@ -481,6 +485,21 @@ params: returns `pane_info`. +### `pane.rename` + +params: + +```json +{ + "pane_id": "1-1", + "label": "reviewer" +} +``` + +send `label: null` or omit `label` to clear the manual pane label. + +returns `pane_info`. + ### `pane.read` params: @@ -946,6 +965,7 @@ pane commands: ```text herdr pane list [--workspace ] herdr pane get +herdr pane rename