Skip to content

Keep terminal alive after blocking script completes#200

Merged
sbertix merged 1 commit intomainfrom
sbertix/script-exit
Apr 1, 2026
Merged

Keep terminal alive after blocking script completes#200
sbertix merged 1 commit intomainfrom
sbertix/script-exit

Conversation

@sbertix
Copy link
Copy Markdown
Collaborator

@sbertix sbertix commented Mar 31, 2026

Summary

  • Keep terminal tabs alive after blocking scripts (run/archive/delete) complete so the user can inspect output
  • Show failure alerts with a "View Terminal" button for all blocking script kinds
  • Simplify blocking script completion by removing intermediate state tracking (blockingScriptCommandFinished, blockingScriptLastCommandExitCode) in favor of a single completeBlockingScript helper that fires on COMMAND_FINISHED instead of waiting for SHOW_CHILD_EXITED
  • Report launch failures (file system errors, tab creation) with exit code 1 instead of nil so the reducer surfaces an alert

Test plan

  • Trigger a run/archive/delete script and verify the terminal tab stays open after completion
  • Trigger a failing script and verify the alert shows with a "View Terminal" button that navigates to the correct tab
  • Re-run a blocking script of the same kind while one is in progress — old tab should close, only the new one fires completion
  • Close a blocking script tab manually — should be treated as cancellation (no alert)
  • Ctrl+C a running script — should report the signal-based exit code in the alert
  • All unit tests pass (make test)

Remove `exec` from the runner script and the trailing `exit` from the
command input so the shell stays alive when a blocking script finishes.
Centralize blocking script failure alerts via a shared helper that
includes repo/worktree context and a "View Terminal" button to navigate to the failed tab.
@sbertix sbertix requested a review from khoi March 31, 2026 16:13
@sbertix sbertix merged commit 7ade80a into main Apr 1, 2026
1 check passed
@sbertix sbertix deleted the sbertix/script-exit branch April 1, 2026 14:37
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.

2 participants