Skip to content

feat(zeph-tui): unify Ctrl+C semantics for interrupt and quit#6653

Merged
bug-ops merged 1 commit into
mainfrom
feat/issue-6646/require-double-ctrl-c-to-exit
Jul 22, 2026
Merged

feat(zeph-tui): unify Ctrl+C semantics for interrupt and quit#6653
bug-ops merged 1 commit into
mainfrom
feat/issue-6646/require-double-ctrl-c-to-exit

Conversation

@bug-ops

@bug-ops bug-ops commented Jul 22, 2026

Copy link
Copy Markdown
Owner

Summary

  • Ctrl+C now cancels the current agent turn immediately when the agent is busy (moved from Esc, which was easy to hit by reflex and silently aborted running turns).
  • Ctrl+C when idle no longer quits on a single press: it arms a ~500ms double-press window and shows Press Ctrl+C again to exit in the status bar; a second press within the window quits, a later press re-arms instead.
  • Esc in Normal mode no longer cancels the agent turn. Esc in Insert mode (toggle to Normal) and q//quit (immediate quit) are unaffected.
  • Timing uses the existing anim_tick() clock (no Instant::now()/SystemTime::now() on the key-decode path), keeping the behavior deterministically testable.

Closes #6646

Test plan

  • cargo +nightly fmt --check
  • cargo clippy --profile ci --workspace --all-targets --features "desktop,ide,server,chat,pdf,scheduler,testing" -- -D warnings
  • cargo nextest run --config-file .github/nextest.toml --workspace --features "desktop,ide,server,chat,pdf,scheduler" --lib --bins — 15071 passed
  • cargo doc --no-deps --workspace --features "desktop,ide,server,chat,pdf,scheduler" (rustdoc gate) — clean
  • New/reworked unit tests in crates/zeph-tui/src/app/tests.rs, crates/zeph-tui/src/widgets/status.rs, crates/zeph-tui/src/widgets/input.rs covering: single vs double Ctrl+C while idle, exact double-press window boundary, Ctrl+C cancels a busy turn immediately, cancel clears the pending quit window (no stale-window carryover), Esc no longer cancels a busy turn, status-bar hint appears/expires
  • Updated specs/011-tui/spec.md, .local/testing/playbooks/tui.md, .local/testing/coverage-status.md, CHANGELOG.md

Ctrl+C now cancels the current agent turn immediately when the agent
is busy, moved from Esc which was too easy to trigger by reflex and
silently aborted running turns. When the agent is idle, a single
Ctrl+C no longer quits outright: it arms a ~500ms double-press window
and shows a status-bar hint; a second Ctrl+C within the window quits,
a later press re-arms instead. q and /quit are unaffected.
@github-actions github-actions Bot added documentation Improvements or additions to documentation rust Rust code changes enhancement New feature or request size/L Large PR (201-500 lines) labels Jul 22, 2026
@bug-ops
bug-ops enabled auto-merge (squash) July 22, 2026 16:00
@bug-ops
bug-ops merged commit 4c2cf88 into main Jul 22, 2026
43 checks passed
@bug-ops
bug-ops deleted the feat/issue-6646/require-double-ctrl-c-to-exit branch July 22, 2026 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request rust Rust code changes size/L Large PR (201-500 lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

require double Ctrl+C to exit TUI and move agent-cancel from Esc to Ctrl+C

1 participant