Skip to content

fix(tui): reset quit confirmation on esc#352

Open
OnlyYu1996 wants to merge 1 commit into
CortexLM:mainfrom
OnlyYu1996:fix-esc-resets-ctrl-c-quit
Open

fix(tui): reset quit confirmation on esc#352
OnlyYu1996 wants to merge 1 commit into
CortexLM:mainfrom
OnlyYu1996:fix-esc-resets-ctrl-c-quit

Conversation

@OnlyYu1996
Copy link
Copy Markdown

Summary

  • clear the pending Ctrl+C quit confirmation whenever Esc is handled
  • make Ctrl+C and Esc quit confirmations cancel each other instead of sharing stale timers
  • add regression tests for both Ctrl+C -> Esc -> Ctrl+C and Esc -> Ctrl+C -> Esc sequences

Bounty issue: PlatformNetwork/bounty-challenge#53113

Validation

ustfmt +stable --edition 2024 --check src/cortex-tui/src/app/methods.rs src/cortex-tui/src/runner/event_loop/input.rs

  • cargo +stable test --package cortex-tui app::methods::tests -- --nocapture
  • cargo +stable check --package cortex-tui --lib
  • git diff --check

Note: cargo +stable fmt --package cortex-tui --check is currently blocked by an unrelated existing formatting diff in src/cortex-tui/src/question.rs; the touched files pass rustfmt directly.

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

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