You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Do not repaint the interactive footer after Ctrl-D shutdown #32
Ctrl-D at an empty interactive prompt exits with code 0, but leaves the live composer box and ? for shortcuts hint on screen. Reproduced on main 9fb0d50 (0.3.3) and PR #29's original head ccf79b4; this is not introduced by #29.
Reproduction
Start the built CLI interactively in an 80×24 terminal and leave the draft empty.
Press Ctrl-D.
Wait for process exit and drain all remaining PTY output.
Actual: exit code 0, but the input box and shortcut hint remain as if they were still interactive. Expected: terminal cleanup completes without repainting the live prompt, leaving the cursor in a sensible position for the next shell prompt while preserving useful transcript output.
Verified with xterm.js 6.0.0 and a real macOS PTY. The bridge explicitly drained final output after process exit, so the observation is not based on dropping final cleanup bytes. Native Terminal.app shell handoff has not yet been checked.
Likely starting point
Inspect packages/cli/src/chat.ts: onKey() calls onControl() and then unconditionally refreshes; Ctrl-D can reach quit() → finish() during that control call. Check whether refresh runs after Screen.finish() has cleared/restored the terminal. Verify the lifecycle before choosing a fix.
Acceptance criteria
Empty-prompt Ctrl-D exits 0 without redrawing the live composer/hint after cleanup.
Normal terminal modes and cursor visibility are restored; settled transcript is retained.
Tests cover post-finish output ordering and double Ctrl-C exit, without changing Ctrl-D delete-forward in a nonempty draft or Ctrl-C interruption during an active run.
A visible PTY-backed terminal test drains final output and confirms a clean handoff to the next prompt.
Keep the change limited to shutdown/input lifecycle. Do not broaden it into active-tool process cancellation (#16/#17).
Resolved by #43, squash-merged as 3fcb52b. Thanks @nimbly1! The final PR also includes a small maintainer regression for nonempty-draft Ctrl-D editing.
Verified on an Apple Silicon Mac with the actual built CLI in visible xterm.js 6.0.0 connected to a real macOS PTY: base reproduces the stale composer, patched Ctrl-D and double Ctrl-C exit 0 without repainting; the transcript remains, terminal modes/cursor are restored, final PTY output is drained, and the next zsh prompt executes echo SHELL_HANDOFF_OK. Ctrl-D delete-forward and Ctrl-C interruption followed by a reusable prompt also pass. These were local SSE fixtures, not live model or native Terminal.app tests.
Activity
fix(cli): do not repaint the prompt after a keypress quits the session (
TaewoooPark commentedon Oct 17, 2026
Resolved by #43, squash-merged as 3fcb52b. Thanks @nimbly1! The final PR also includes a small maintainer regression for nonempty-draft Ctrl-D editing.
Verified on an Apple Silicon Mac with the actual built CLI in visible xterm.js 6.0.0 connected to a real macOS PTY: base reproduces the stale composer, patched Ctrl-D and double Ctrl-C exit 0 without repainting; the transcript remains, terminal modes/cursor are restored, final PTY output is drained, and the next zsh prompt executes
echo SHELL_HANDOFF_OK. Ctrl-D delete-forward and Ctrl-C interruption followed by a reusable prompt also pass. These were local SSE fixtures, not live model or native Terminal.app tests.The integrated 0.4.3 tree passes all 1,676 tests/97 files, typecheck, build, and tool-schema lint. PR validation details · Post-merge main CI.