Repository navigation
refactor(tui): one helper for rejecting pending prompts; swallowed budget 37 -> 22 - #513
Merged
Merged
Conversation
…dget 37 -> 22 - Cancel, force-stop, closing a background session and shutdown each carried their own copy of "cancel every waiting question, deny every waiting permission prompt". They now call reject_pending. - Nine `let _ =` bindings sat on calls that return no error (a bool, a cursor position, a task handle). Dropping them stops the budget counting things that were never swallowed errors. No behaviour change. The 22 left are terminal restore on exit, sends to a receiver that may already be gone, and the busy-key pass-through. Co-Authored-By: Claude Fable 5.2 <[email protected]>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
No behaviour change; the TUI swallowed-error count drops from 37 to 22.
reject_pending. Two of the four used to deny permissions before cancelling questions; all four now cancel questions first. The replies go to independent one-shot channels, so the order is not observable.let _ =sat on calls that return no error:apply_generated_titleandgo_prev_question/go_next_question(bool),Buffer::set_line(cursor position),spawn_title_refine(task handle). Without the binding the budget stops counting them.scripts/swallowed_error_budget.json:tui37 -> 22.Left alone on purpose
The remaining 22 are terminal restore on exit (10), sends to a receiver that may already be gone (9), the exit summary on stderr (2) and the busy-key pass-through that ignores
handle_event's keep-running result (1). None of these were touched, so the event loop and terminal setup are unchanged and thedocs/tui-term-matrix.mdmanual checks were not run.Verification
cargo clippy -p whycodes-tui --all-targets -- -D warnings,cargo fmt --all --check, all budget scripts: green.affected_tests.py --execute: 406 passed, 0 failed.🤖 Generated with Claude Code