Skip to content

feat(tui): show session resume info on /exit#105

Merged
yishuiliunian merged 2 commits intomainfrom
worktree-fuzzy-jingling-flurry
Apr 15, 2026
Merged

feat(tui): show session resume info on /exit#105
yishuiliunian merged 2 commits intomainfrom
worktree-fuzzy-jingling-flurry

Conversation

@yishuiliunian
Copy link
Copy Markdown
Contributor

Summary

  • Print session ID and loopal --resume <id> command to stderr after TUI exits
  • For worktree sessions with uncommitted changes, also display the worktree path and cd command
  • Reads final session ID from SessionController (not startup snapshot) to handle mid-session /resume switches correctly

Changes

  • src/bootstrap/multiprocess.rs — return Result<String> carrying session ID; clone SessionController before TUI move to read final state
  • src/bootstrap/mod.rs — add print_resume_info(); preserve worktree cleanup on error path; cleanup_session_worktree() returns bool
  • crates/loopal-session/src/controller.rs — add root_session_id() getter

Test plan

  • CI passes
  • loopal/exit → stderr shows resume command
  • loopal --worktree → make changes → /exit → stderr shows worktree path + resume command
  • loopal --worktree → no changes → /exit → worktree cleaned, no worktree info in output

Print session ID and resume command to stderr after TUI exits,
so users can easily resume later. For worktree sessions with
uncommitted changes, also display the worktree path and cd command.

Reads the final session ID from SessionController (not the startup
snapshot) to handle mid-session /resume switches correctly.
@yishuiliunian yishuiliunian merged commit 7849c55 into main Apr 15, 2026
4 checks passed
@yishuiliunian yishuiliunian deleted the worktree-fuzzy-jingling-flurry branch April 15, 2026 13:09
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.

1 participant