diff --git a/crates/improvise-command/src/ui/project.rs b/crates/improvise-command/src/ui/project.rs index ea1cf06b..b6c9982b 100644 --- a/crates/improvise-command/src/ui/project.rs +++ b/crates/improvise-command/src/ui/project.rs @@ -5236,7 +5236,9 @@ mod cell_identity { /// so `Derived` is never right here (improvise-hoxy). fn names_its_column(col: Option<&RecordCol>, id: Option<&CellId>) -> bool { match (col, id) { - (Some(RecordCol::Category(_)), Some(CellId::Coordinate)) => true, + (Some(RecordCol::Category(c)), Some(CellId::Coordinate { category, .. })) => { + category == c + } (Some(RecordCol::Measure(m)), Some(CellId::Record(cell))) => { cell.measure.as_deref() == Some(m.as_str()) } diff --git a/crates/improvise-wasm-client/tests/browser_round_trip.rs b/crates/improvise-wasm-client/tests/browser_round_trip.rs index 8aaebde0..958fcf72 100644 --- a/crates/improvise-wasm-client/tests/browser_round_trip.rs +++ b/crates/improvise-wasm-client/tests/browser_round_trip.rs @@ -471,6 +471,7 @@ fn the_tile_bar_route_into_records_mode_does_not_strand_the_user() { cols >= 3, "the fixture must reach past the coordinate column" ); + let mut coordinates = 0; for col in 0..cols { while client.state().view.cursor().selected.1 < col { press(&mut host, id, &mut client, "l"); @@ -483,6 +484,17 @@ fn the_tile_bar_route_into_records_mode_does_not_strand_the_user() { // a keypress this client might decline. client.state_mut().view.status_msg = "\u{0}unsaid".to_string(); press(&mut host, id, &mut client, "i"); + // A coordinate's Enter composes a rename since improvise-fdk1, so its + // editor is a door rather than a black hole. + if kind.starts_with("Some(Coordinate") { + coordinates += 1; + assert!( + client.state().view.mode.is_editing(), + "column {col} ({kind}): a coordinate's editor must open" + ); + press(&mut host, id, &mut client, "Escape"); + continue; + } assert_ne!( client.state().view.status_msg, "\u{0}unsaid", @@ -495,6 +507,10 @@ fn the_tile_bar_route_into_records_mode_does_not_strand_the_user() { client cannot commit — an Enter that is a black hole" ); } + assert!( + coordinates > 0 && coordinates < cols, + "the walk must cover both a coordinate and a declined column" + ); } // ── Ctrl-S, all the way to storage (improvise-jz6w) ─────────────────────