- Ya
- 3 Septemba 2026, 21:03 UTC
- Mwandishi
- Kamo
- Ahadi ya
- 182a296
GET /terminals?user=X, POST /terminals/<id>/kill, POST /terminals/<id>/title. THERE IS NO DATABASE BEHIND THIS, and that is the design rather than a shortcut. The tmux server on the machine IS the registry: a member's terminals are exactly the sessions that exist, so one that ends stops being listed with nothing to reconcile, and a reboot — which takes the tmux server with it — empties the list by itself. A table would have to be told all of that, and would be wrong every time it was not. Custom titles live in a tmux user option on the session, so a title has the same lifetime as the shell it names. Control characters are stripped before storage: a title is rendered in a list, and an escape sequence in one would repaint the screen around it — stripping is also what keeps the field separator out of the value, which is what makes the listing parseable by splitting on it. Titles are passed as a single argv element, never through a shell. "No tmux server" is an empty list, not an error. That is the state of the machine after a reboot, which is precisely when the member needs the list to say "nothing here" rather than to fail. 20 tests: the listing shape and its ordering, untitled sessions reporting null rather than "", sessions this agent did not create staying invisible, malformed and non-numeric rows being skipped rather than fatal, kill being idempotent, titles being stripped/truncated/unset, and a title containing shell metacharacters arriving as one argv element. Also guards pump's select against a descriptor closed under it — the same ordinary hang-up ending the recv path already handled. 131 tests.