Skip to content

feat(tui): end a terminal from its panel with Alt+X - #54

Closed
ReaperMaga wants to merge 1 commit into
mainfrom
feat/end-session-from-panel
Closed

ReaperMaga wants to merge 1 commit into
mainfrom
feat/end-session-from-panel

Conversation

@ReaperMaga

Copy link
Copy Markdown
Collaborator

Closes #53.

The footer of a running terminal never said how to end the session. Now it reads:

Ctrl+V paste · Alt+Q leave it running · Alt+X exit · Click opens a link · …
  • Alt+X (or a click on its hint) asks End the session "agent on studio"? This stops whatever runs in it. with y yes · n no. While it asks, keys don't reach the shell.
  • On yes, berth sends HUP to the session through sessions.signal, as closing a terminal window would. bash passes the hangup on to its jobs. If the session is still running 5 seconds later, berth sends KILL.
  • While the session ends, the footer reads Ending the session…. Once it has ended, the panel closes by itself, and a session started from the panel is forgotten, as Enter would forget it.
  • The change is in the shared berth-tui panel (draw_view / view_event / HostView), so berth-remote, the page of berth serve --web and the berth terminal UI all get it. Both transports gained Request::Signal.
  • Only running terminals get the key: a task's process output has no shell to end.
  • The panel keys table in docs/.../use/overview.mdx lists Alt+X.

Checks

  • New test host::tests::a_terminal_is_ended_from_its_panel_after_a_yes covers the clickable hint, the question, no, yes → HUP, the KILL fallback and the panel closing.
  • cargo clippy (workspace, --features web, wasm32), cargo fmt --check and vale pass.
  • cargo test --locked passes except provision::tests::the_look_at_the_first_boot_carries_no_password_and_a_checked_cursor, which fails the same way on main on this machine because it reads the machine's own first-boot state.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@helightdev

Copy link
Copy Markdown
Owner

Thanks for this, and for the clear write-up. Since you opened it, the old terminal UI was removed and the screens moved into berth-page, so this no longer applies to main. I've carried your design over in #78: Alt+X asks first, sends a hangup and then a kill after 5 seconds, and the panel closes once the session has ended. It closes #53 when it is merged.

@helightdev helightdev closed this Nov 16, 2026
@helightdev
helightdev deleted the feat/end-session-from-panel branch November 16, 2026 00:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Terminal panel: add an "exit" button to end the session

2 participants