# Task plan — TUI visual mode Ordered, verifiable tasks for the library paint-select visual mode (architecture/visual-mode.md, quality/visual-mode.md). All in `cbd-tui`. - [x] **P1 — bindings** (`app/bindings.rs`): add `Action::LibraryVisualMode`; move `ToggleSpectrum` from Global `v` to Global `f` (update description key); add Library bindings `v` (NONE) and `V` (SHIFT) → `LibraryVisualMode` with a clear description. *Verify:* T1, T2, T3. - [x] **P2 — Library state + paint** (`app/library.rs`): add `visual: bool`; `is_visual`, `toggle_visual` (on-enter toggles the current mark), `exit_visual`, `selected_view`, and `paint_between(from_view, to_view)` that toggles the mark (respecting `is_queable`) of every view index in the half-open sweep, mapping through the filter. *Verify:* T10, and compiles for T4–T9. - [x] **P3 — title indicator** (`app/library.rs` `render`): show `— VISUAL` in the pane title while visual is active (precedence over the search/creatable hints). *Verify:* G6 by reading; render smoke test if one exists. - [x] **P4 — dispatch routing** (`app/mod.rs`): capture `was_visual`; auto-exit visual for any action except the six movements, `LibraryVisualMode`, and `ClearSearch`; route the six movements through a `library_move` helper that paints the `(old,new]` sweep when visual is active; `LibraryVisualMode` → `toggle_visual`; `ClearSearch` exits visual when active (else clears filter); `LibraryDive`/`LibraryAscend`/`CycleFocus` exit visual then act. *Verify:* T4–T9, T11. - [x] **P5 — help/parity check**: confirm the help modal renders the new/moved bindings from `BINDINGS` (no code change expected). *Verify:* G4, G6. - [x] **P6 — gate**: `cargo test -p cbd-tui`, `cargo clippy -p cbd-tui -D warnings`, `cargo fmt --check`. Re-read G1–G6 against the diff.