Repository navigation
refactor(tui): move key routing, model choices and start-up out of run/mod.rs - #521
Merged
Merged
Conversation
- run/sessions.rs: opening, switching and closing live sessions and the dashboard rows (15 functions). - run/turn.rs: starting a turn, applying its events and outcome, and cancelling it (21 functions). run/mod.rs drops from 6259 to 4448 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]>
…n/mod.rs - run/keys.rs: which layer owns a key while idle and while a turn runs. - run/models.rs: model, provider, credential and agent choices. - run/boot.rs: building the app and runtime, resuming a session, and the work deferred until after the first frame. run/mod.rs drops from 4448 to 2914 lines. A pure move: the only textual changes are `pub(super)` on each item and six signatures rustfmt re-wrapped because of it. Co-Authored-By: Claude Fable 5.2 <[email protected]>
…-models-boot # Conflicts: # crates/tui/src/run/mod.rs
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
Third step of splitting
crates/tui/src/run/mod.rs(after #519 and #520):run/keys.rs: which layer owns a key while idle and while a turn runs (13 items).run/models.rs: model, provider, credential and agent choices (25 functions).run/boot.rs: building the app and runtime, resuming a session, and the work deferred until after the first frame (16 functions).run/mod.rsdrops from 4448 to 2914 lines (6690 before #519). What is left is therunloop itself (about 930 lines), terminal setup and restore, and small helpers.It is a pure move
Compared line by line against
main(ignoring order): the only differences arepub(super)on each moved item, six signatures rustfmt re-wrapped because of that prefix, and themod/uselines. No logic, event-loop or terminal code changed, so thedocs/tui-term-matrix.mdmanual checks were not run.The branch was started on top of #520 before it merged; the merge commit resolves
run/mod.rsto this branch's version, after checking thatmainequals the branch's base.Verification
cargo clippy -p whycodes-tui --all-targets -- -D warnings,cargo fmt --all --check, budget scripts: green.cargo test -p whycodes-tui --lib run::: 374 passed, 0 failed.🤖 Generated with Claude Code