# Split input/editor.rs (https://jackin.tailrocks.com/roadmap/split-input-editor/)



**Status**: Partially implemented — console editor input has been reduced, but <RepoFile path="crates/jackin-console/src/tui/input/editor.rs">crates/jackin-console/src/tui/input/editor.rs</RepoFile> remains a large root dispatcher and still needs a final tab/modal split

## Shipped facts [#shipped-facts]

<RepoFile path="crates/jackin-console/src/tui/input/editor.rs">crates/jackin-console/src/tui/input/editor.rs</RepoFile> 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 handling
```

`dispatch_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 [#remaining-work]

1. Add `crates/jackin-console/src/tui/input/editor/mounts.rs` and move `dispatch_editor_mount_action` and `dispatch_editor_mount_dst_choice` (plus their private helpers) there, following the `general.rs`/`agents.rs`/`secrets.rs` pattern already used for the other tabs.
2. Preserve existing key behavior exactly; the root dispatcher should call into `mounts::*` the same way it already calls into `secrets::*` and `agents::*`.
3. Keep tests in `editor/tests.rs`; do not split tests into child modules.
4. Verify with targeted Rust tests for the console editor input paths.

## Auditability gain [#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.
