Split input/editor.rs
Status: Partially implemented — console editor input has been reduced, but crates/jackin-console/src/tui/input/editor.rs remains a large root dispatcher and still needs a final tab/modal split
Shipped facts
crates/jackin-console/src/tui/input/editor.rs is now 1,146 lines, much smaller than the original multi-thousand-line file. The larger split into screens, components, and services has landed, and general.rs, agents.rs, secrets.rs, modal.rs, and tests.rs exist as child modules under crates/jackin-console/src/tui/input/editor/:
crates/jackin-console/src/tui/input/editor.rs ← root dispatcher for editor keys and modal routing
crates/jackin-console/src/tui/input/editor/general.rs ← General tab handlers
crates/jackin-console/src/tui/input/editor/agents.rs ← Agents tab handlers (role input, allowed/default toggles)
crates/jackin-console/src/tui/input/editor/secrets.rs ← Secrets/op-reference handlers
crates/jackin-console/src/tui/input/editor/modal.rs ← modal commit handlingdispatch_editor_secrets_action and dispatch_editor_role_action in the root file already delegate straight through to secrets::* and agents::*. dispatch_editor_mount_action and dispatch_editor_mount_dst_choice do not — mount add/remove/isolation/GitHub-open handling and mount-destination-picker commit logic still live inline in the root file. That is the actual remaining gap: not a whole-console extraction, but a root dispatcher still carrying mount-tab behavior alongside true cross-tab dispatch.
Use Rust 2024 self-named module layout. Do not create mod.rs.
Remaining work
- Add
crates/jackin-console/src/tui/input/editor/mounts.rsand movedispatch_editor_mount_actionanddispatch_editor_mount_dst_choice(plus their private helpers) there, following thegeneral.rs/agents.rs/secrets.rspattern already used for the other tabs. - Preserve existing key behavior exactly; the root dispatcher should call into
mounts::*the same way it already calls intosecrets::*andagents::*. - Keep tests in
editor/tests.rs; do not split tests into child modules. - Verify with targeted Rust tests for the console editor input paths.
Auditability gain
To audit "did the Secrets tab handle op:// references correctly?", a reviewer should read a secrets-focused input file instead of the root dispatcher plus unrelated General/Mounts/Agents key paths.