1.8 KiB
1.8 KiB
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.
- P1 — bindings (
app/bindings.rs): addAction::LibraryVisualMode; moveToggleSpectrumfrom Globalvto Globalf(update description key); add Library bindingsv(NONE) andV(SHIFT) →LibraryVisualModewith a clear description. Verify: T1, T2, T3. - P2 — Library state + paint (
app/library.rs): addvisual: bool;is_visual,toggle_visual(on-enter toggles the current mark),exit_visual,selected_view, andpaint_between(from_view, to_view)that toggles the mark (respectingis_queable) of every view index in the half-open sweep, mapping through the filter. Verify: T10, and compiles for T4–T9. - P3 — title indicator (
app/library.rsrender): show— VISUALin the pane title while visual is active (precedence over the search/creatable hints). Verify: G6 by reading; render smoke test if one exists. - P4 — dispatch routing (
app/mod.rs): capturewas_visual; auto-exit visual for any action except the six movements,LibraryVisualMode, andClearSearch; route the six movements through alibrary_movehelper that paints the(old,new]sweep when visual is active;LibraryVisualMode→toggle_visual;ClearSearchexits visual when active (else clears filter);LibraryDive/LibraryAscend/CycleFocusexit visual then act. Verify: T4–T9, T11. - P5 — help/parity check: confirm the help modal renders the new/moved
bindings from
BINDINGS(no code change expected). Verify: G4, G6. - P6 — gate:
cargo test -p cbd-tui,cargo clippy -p cbd-tui -D warnings,cargo fmt --check. Re-read G1–G6 against the diff.