From 51943d1bbcc904c6a99678180281537e2dfd0188 Mon Sep 17 00:00:00 2001 From: Edward Langley Date: Wed, 23 Sep 2026 19:28:08 -0700 Subject: [PATCH] improvise-7mro: an empty grid has no cell to wait for Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01VdfEGXA7aJ6ftMsCc9PJze --- crates/improvise-protocol/src/resolve.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/crates/improvise-protocol/src/resolve.rs b/crates/improvise-protocol/src/resolve.rs index b6719eca..ea1b7c10 100644 --- a/crates/improvise-protocol/src/resolve.rs +++ b/crates/improvise-protocol/src/resolve.rs @@ -4092,4 +4092,23 @@ mod tests { `KeyOutcome::Request` has nowhere to put one" ); } + + /// improvise-7mro: an empty grid has no cell to wait for, so nothing a cell op + /// says there is a wait. See `context/test-evidence/clients.md`. + #[test] + fn a_cursor_on_an_empty_grid_waits_for_nothing() { + let mut state = in_mode(AppMode::Normal); + state.window = (2, 2); + for key in ['i', 'x'] { + let said = match resolve(&state, ev(KeyCode::Char(key))) { + KeyOutcome::Local(cmds) => cmds, + _ => Vec::new(), + }; + assert!( + !said.contains(&Command::SetStatus(NOT_PROJECTED.to_string())) + && !said.contains(&Command::SetOpenedEditor(Some(OpenedEditor::awaiting()))), + "{key}: waits on a cell no grid has: {said:?}" + ); + } + } }