Request
Add a kill button to the attach page (src/muxboard/templates/muxboard/attach.html) that kills the tmux session you are attached to and then closes the tab.
Today the only way to kill a session is to go back to the dashboard, find the row, and use the kill control there. When you are attached to a session and have decided you are done with it, that is a needless round trip through a page you were about to leave anyway.
Behaviour
- A control on the attach page, visibly distinct from the
← Muxboard back link, that kills the session the page is attached to.
- On success, the tab closes.
- On failure, the operator sees why. Do not close the tab on failure.
What already exists
POST /api/<key>/<user>/kill (src/muxboard/board.py:226) already does the killing. It is guarded by _guard_mutation, audits via self.audit("muxboard.kill", ...), and refreshes the host's inventory. The attach page already knows its key, user, and session name - see the template's existing context.
Read that route carefully before designing the control. Its request contract is not just name.
Constraints
- The existing dashboard kill path must keep working unchanged.
- Whatever the attach page sends must satisfy the endpoint's existing contract. Do not weaken the endpoint to make the button simpler.
- muxboard hands out authenticated remote-shell access over the web; the README's threat model is the standard this change is held to. A destructive control is not the place to trade safety for clicks.
- No new dependencies. The page is server-rendered Jinja plus xterm.js.
Acceptance
- Attached to a session, the operator can kill it from the attach page and end up with no tab and no session.
- A failed kill leaves the tab open and shows the error.
- Existing tests pass; new behaviour is covered by tests.
Request
Add a kill button to the attach page (
src/muxboard/templates/muxboard/attach.html) that kills the tmux session you are attached to and then closes the tab.Today the only way to kill a session is to go back to the dashboard, find the row, and use the kill control there. When you are attached to a session and have decided you are done with it, that is a needless round trip through a page you were about to leave anyway.
Behaviour
← Muxboardback link, that kills the session the page is attached to.What already exists
POST /api/<key>/<user>/kill(src/muxboard/board.py:226) already does the killing. It is guarded by_guard_mutation, audits viaself.audit("muxboard.kill", ...), and refreshes the host's inventory. The attach page already knows itskey,user, and sessionname- see the template's existing context.Read that route carefully before designing the control. Its request contract is not just
name.Constraints
Acceptance