Skip to content

refactor(tui): move session and turn handling out of run/mod.rs - #520

Merged
mrnasil merged 1 commit into
mainfrom
refactor/tui-run-sessions-turns
Nov 28, 2026
Merged

mrnasil merged 1 commit into
mainfrom
refactor/tui-run-sessions-turns

Conversation

@mrnasil

@mrnasil mrnasil commented Nov 28, 2026

Copy link
Copy Markdown
Member

What

Second step of splitting crates/tui/src/run/mod.rs (after #519):

  • 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. MAX_LIVE_SESSIONS and CANCEL_FORCE_AFTER stay in mod.rs; the memory budget pins the first one to that file.

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 / use 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

- 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]>
@mrnasil
mrnasil merged commit b4f7a7c into main Nov 28, 2026
7 checks passed
@mrnasil
mrnasil deleted the refactor/tui-run-sessions-turns branch November 28, 2026 17:45
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