backlog
Check that HERDR_ENV=1 first. If it is not, tell the user this session is not in a herdr-managed pane and stop, because every step below talks to the herdr server.
Run the steps straight through; the user asked for the move, so it needs no confirmation.
-
Read your own pane and tab ids live with
herdr pane current, notingresult.pane.pane_idandresult.pane.tab_id. An id from an environment variable can be stale after an earlier pane move. -
Read the name to carry over with
herdr tab get <tab_id>, takingresult.tab.label. If the tab has nolabel, useterminal_title_strippedfrom step 1's output. -
Find the target with
herdr workspace list: the one workspace whoselabelcontains "Backlog", case-insensitive, ignoring any emoji prefix. Match on the label text, since workspace numbers shift as workspaces open and close. If zero or several match, tell the user the target is ambiguous and stop. -
Move the pane into a new tab there, passing the preserved name:
herdr pane move <pane_id> --new-tab --workspace <target_workspace_id> --label "<preserved_name>" --no-focus--no-focuskeeps the user's view where it is; use--focusonly when they asked to follow the pane. -
Confirm in one line: the workspace the pane moved to, and that the tab kept its name.