From 5a64e8da4551990367dd26d77cf3b654dfa27a73 Mon Sep 17 00:00:00 2001 From: JJ Liebig Date: Sun, 6 Sep 2026 15:36:35 +0200 Subject: fix: consume failed selection copies without interrupting agents (#3681) --- src/client/shell/tests/copy.rs | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) (limited to 'src/client/shell/tests/copy.rs') diff --git a/src/client/shell/tests/copy.rs b/src/client/shell/tests/copy.rs index 7d71a981..7cc3241b 100644 --- a/src/client/shell/tests/copy.rs +++ b/src/client/shell/tests/copy.rs @@ -224,7 +224,7 @@ fn retained_mouse_selection_copies_only_on_exact_copy_shortcut() { ClientShellAction::Endpoint { request, .. } => request.id.clone(), _ => unreachable!(), }; - let (_, fallback) = state.handle_endpoint_result( + let (_, actions) = state.handle_endpoint_result( "boot-1", &request_id, Ok(crate::api::schema::ResponseResult::PaneSelection { @@ -232,25 +232,10 @@ fn retained_mouse_selection_copies_only_on_exact_copy_shortcut() { text: String::new(), }), ); - assert!(matches!( - &fallback[..], - [ClientShellAction::Request(ClientMessage::ClientShellPaneInput { - pane_id, - events, - })] if pane_id == "pane_1" - && matches!( - &events[..], - [ClientPaneInputEvent::Key { - code: crate::protocol::ClientKeyCode::Char('c'), - kind: crate::protocol::ClientKeyKind::Press, - .. - }, ClientPaneInputEvent::Key { - code: crate::protocol::ClientKeyCode::Char('c'), - kind: crate::protocol::ClientKeyKind::Release, - .. - }] - ) - )); + assert!( + actions.is_empty(), + "failed copy must not send terminal input" + ); } #[test] -- cgit v1.2.3