Repository navigation
refactor(tui): move prompt and questionnaire handling out of run/mod.rs - #519
Merged
Merged
Conversation
Sixteen functions for permission prompts and questionnaires (overlay events, key handling, replies to the waiting tool, queue draining) move to run/prompts.rs, like slash and persist before them. run/mod.rs drops from 6690 to 6259 lines. A pure move: the only textual changes are `pub(super)` on each function and three signatures rustfmt re-wrapped because of it. Co-Authored-By: Claude Fable 5.2 <[email protected]>
This was referenced Nov 28, 2026
mrnasil
added a commit
that referenced
this pull request
Nov 28, 2026
run/terminal.rs now holds the terminal the loop draws on: opening the console, raw mode and the alternate screen, reading events, drawing, the panic restore and putting everything back (62 items). run/mod.rs drops from 2914 to 2077 lines; it was 6690 before #519. What is left is the run loop and small helpers. A pure move: the only textual changes are `pub(super)` on the moved items and on the 18 methods of LoopIo and LoopTerm, plus two signatures rustfmt re-wrapped. CONSOLE_WRITE_BUFFER stays in mod.rs, where the memory budget pins it. 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
Sixteen functions for permission prompts and questionnaires move from
crates/tui/src/run/mod.rsto a newrun/prompts.rs, the same wayslashandpersistwere split out: overlay events, questionnaire key handling, replies to the waiting tool, and queue draining.run/mod.rsdrops from 6690 to 6259 lines.It is a pure move
Compared line by line against
main(ignoring order): the only differences arepub(super)on each moved function, three signatures rustfmt re-wrapped because of that prefix, and themod prompts; use prompts::*;lines. No logic, event-loop or terminal code changed, so 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(run::tests): 374 passed, 0 failed.🤖 Generated with Claude Code