Problem
crates/cell-sheet-tui/src/mode/normal.rs reads app.cursor 30+ times to construct positional Action variants like:
Action::ClearCell(app.cursor)
Action::ChangeCell(app.cursor)
This couples mode handlers to App's internal shape and prevents reusing logic across modes. When find / search need to work in Visual or Command mode, every consumer has to either re-fetch app.cursor or re-emit the same positional action.
AGENTS.md's spirit is "mode handlers shouldn't know about app internals" — currently they do.
Proposed fix
Convert positional variants to cursor-relative:
Action::ClearCellAtCursor // App resolves cursor at dispatch time
Action::ChangeCellAtCursor
process_action reads self.cursor at the dispatch site instead of trusting the mode to pass it. Mode handlers stop touching app.cursor for these cases.
This is a deferred / architectural cleanup — only worth doing once a second mode (Visual or Command) actually needs to share these actions.
Priority
MEDIUM (deferred) — track for when cross-mode action sharing comes up; do not do speculatively.
Problem
crates/cell-sheet-tui/src/mode/normal.rsreadsapp.cursor30+ times to construct positionalActionvariants like:This couples mode handlers to
App's internal shape and prevents reusing logic across modes. Whenfind/searchneed to work in Visual or Command mode, every consumer has to either re-fetchapp.cursoror re-emit the same positional action.AGENTS.md's spirit is "mode handlers shouldn't know about app internals" — currently they do.
Proposed fix
Convert positional variants to cursor-relative:
process_actionreadsself.cursorat the dispatch site instead of trusting the mode to pass it. Mode handlers stop touchingapp.cursorfor these cases.This is a deferred / architectural cleanup — only worth doing once a second mode (Visual or Command) actually needs to share these actions.
Priority
MEDIUM (deferred) — track for when cross-mode action sharing comes up; do not do speculatively.