Skip to content

Close a session when its process ends and leave its worktree - #94

Merged
m4rocks merged 1 commit into
mainfrom
close-session-on-exit
Nov 2, 2026
Merged

m4rocks merged 1 commit into
mainfrom
close-session-on-exit

Conversation

@m4rocks

@m4rocks m4rocks commented Nov 2, 2026

Copy link
Copy Markdown
Owner

Summary

When a session's process ends by itself, Claudiu closes it the way the X does. The terminal does not stay up behind a "Session ended" bar.

on_exit
  record the exit code
  end_live          // same close as the X, no worktree dialog
  toast if start failed, or the code is not 0

close_live still asks about removing a Claudiu worktree. A clean exit says nothing.

Evidence

Before the change, the new test failed with:

the session stayed open after its process ended

After, cargo test --locked:

test app::headless::a_process_that_ends_closes_the_session_and_leaves_its_worktree ... ok
test result: ok. 298 passed; 0 failed; 19 ignored

Risk

Three files, easy to revert. A worktree switch and an account hand-off replace the process. The old terminal is dropped before the new one starts, so that exit should not close the session. The ignored switch test was not re-run. A sign-in terminal also closes when its process ends.

Closes #86

@vercel

vercel Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
claudiu Ready Ready Preview Nov 2, 2026 11:56am UTC

@m4rocks
m4rocks merged commit bfa0d1b into main Nov 2, 2026
5 checks passed
@m4rocks
m4rocks deleted the close-session-on-exit branch November 2, 2026 13:46

This branch was successfully deployed

1 active deployment
Preview — 97db53aa Deployed Nov 2, 2026 by vercel[bot]
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.

Close a session when its process ends

1 participant