Skip to content

refactor(tui): move prompt and questionnaire handling out of run/mod.rs - #519

Merged
mrnasil merged 2 commits into
mainfrom
refactor/tui-run-prompts
Nov 28, 2026
Merged

mrnasil merged 2 commits into
mainfrom
refactor/tui-run-prompts

Conversation

@mrnasil

@mrnasil mrnasil commented Nov 28, 2026

Copy link
Copy Markdown
Member

What

Sixteen functions for permission prompts and questionnaires move from crates/tui/src/run/mod.rs to a new run/prompts.rs, the same way slash and persist were split out: overlay events, questionnaire key handling, replies to the waiting tool, and queue draining. run/mod.rs drops from 6690 to 6259 lines.

It is a pure move

Compared line by line against main (ignoring order): the only differences are pub(super) on each moved function, three signatures rustfmt re-wrapped because of that prefix, and the mod prompts; use prompts::*; lines. No logic, event-loop or terminal code changed, so the docs/tui-term-matrix.md manual 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

mrnasil and others added 2 commits November 28, 2026 18:16
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]>
@mrnasil
mrnasil merged commit 038ba53 into main Nov 28, 2026
7 checks passed
@mrnasil
mrnasil deleted the refactor/tui-run-prompts branch November 28, 2026 15:34
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]>
@mrnasil mrnasil mentioned this pull request Nov 28, 2026
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