Rename a session after it is spawned #125

Closed
opened 2026-08-30 11:23:21 +01:00 by naps62-yolo · 0 comments
Collaborator

Sessions are named at spawn time (metadata.name, else the command line) and the name is then fixed for the life of the session. A session outlives the reason it was given its handle — rename should be possible after the fact, from any client.

Daemon

  • PATCH /api/sessions/:id with {"name": "..."} sets metadata.name.
  • A blank or whitespace-only name clears the custom name, so the card falls back to the command — same rule the spawn form already uses (if (name) metadata.name = name).
  • The name is trimmed and length-capped server-side.
  • The change is persisted to the session sidecar so it survives a daemon restart, and broadcast as SessionUpdated so every attached client updates live.
  • Unknown session is 404.

Web

Right-click a sidebar session card to open a custom context menu (not the browser's). Entries: rename, spawn similar, kill. Rename swaps the card's name for an inline text field; Enter commits, Escape cancels.

TUI

A dedicated key on the sidebar (r by default) opens a rename prompt pre-filled with the current name, bound through the normal Action/keymap path so it is rebindable and shows up in the help overlay.

Sessions are named at spawn time (`metadata.name`, else the command line) and the name is then fixed for the life of the session. A session outlives the reason it was given its handle — rename should be possible after the fact, from any client. ## Daemon - `PATCH /api/sessions/:id` with `{"name": "..."}` sets `metadata.name`. - A blank or whitespace-only name clears the custom name, so the card falls back to the command — same rule the spawn form already uses (`if (name) metadata.name = name`). - The name is trimmed and length-capped server-side. - The change is persisted to the session sidecar so it survives a daemon restart, and broadcast as `SessionUpdated` so every attached client updates live. - Unknown session is 404. ## Web Right-click a sidebar session card to open a custom context menu (not the browser's). Entries: rename, spawn similar, kill. Rename swaps the card's name for an inline text field; Enter commits, Escape cancels. ## TUI A dedicated key on the sidebar (`r` by default) opens a rename prompt pre-filled with the current name, bound through the normal `Action`/keymap path so it is rebindable and shows up in the help overlay.
naps62-yolo self-assigned this 2026-08-30 11:23:24 +01:00
This repo is archived. You cannot comment on issues.
1 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: naps62/maestro#125