Skip to content

fix: check for running processes before Cmd+W closes terminal - #104

Merged
honerlaw merged 1 commit into
mainfrom
fix/cmd-w-busy-check
Mar 16, 2026
Merged

honerlaw merged 1 commit into
mainfrom
fix/cmd-w-busy-check

Conversation

@honerlaw

Copy link
Copy Markdown
Contributor

Summary

  • Cmd+W now checks isTerminalBusy() before closing a terminal tab, matching the existing X button behavior
  • If a process is running, a confirmation dialog is shown; otherwise the tab closes immediately
  • Adds requestClose to the TerminalTabsHandle imperative handle and removes the now-unused direct closeTerminal call from useCommands

Test plan

  • Open a terminal, run sleep 999, press Cmd+W — confirmation dialog should appear
  • Cancel the dialog — terminal stays open
  • Press Cmd+W again, confirm — terminal closes
  • Open a terminal with no running process, press Cmd+W — closes immediately (no dialog)
  • Verify the X button on tabs still works the same way

🤖 Generated with Claude Code

Cmd+W now uses the same busy-check logic as the X button on tabs,
showing a confirmation dialog when a process is running.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@honerlaw
honerlaw merged commit ddbaf02 into main Mar 16, 2026
3 checks passed
@honerlaw
honerlaw deleted the fix/cmd-w-busy-check branch March 16, 2026 17:49
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