fix(cli): disable Ink exitOnCtrlC so double-press handler runs #188

Merged
jason.woltje merged 1 commits from fix/tui-ctrl-c-exit into main 2026-03-16 13:55:19 +00:00
Owner

Problem

in Ink defaults to , which terminates the process at the framework level before ever fires. Our double-press Ctrl+C logic (clear input → show hint → exit on second press) was unreachable.

Fix

Pass to . The TuiApp handler now owns the full Ctrl+C lifecycle:

  • Input non-empty → clear it
  • Input empty, first press → show Press
## Problem in Ink defaults to , which terminates the process at the framework level before ever fires. Our double-press Ctrl+C logic (clear input → show hint → exit on second press) was unreachable. ## Fix Pass to . The TuiApp handler now owns the full Ctrl+C lifecycle: - Input non-empty → clear it - Input empty, first press → show Press
jason.woltje added 1 commit 2026-03-16 13:51:45 +00:00
fix(cli): disable Ink's built-in exitOnCtrlC so our handler runs
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
8f7e153f17
Ink's render() defaults to exitOnCtrlC:true, which terminates the
process before useInput ever fires. Pass exitOnCtrlC:false so the
double-press logic in TuiApp (clear → hint → exit) takes effect.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
jason.woltje merged commit c1d3dfd77e into main 2026-03-16 13:55:19 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaicstack/stack#188