From 85ebd33bf5e0b68ef4619d928169651a5da771cf Mon Sep 17 00:00:00 2001 From: Abhishek Pandya <40919306+abhishekp106@users.noreply.github.com> Date: Thu, 30 Apr 2026 15:14:19 -0500 Subject: [PATCH] Fix issue on dev with agent history menu not working. (#9656) ## Description Fixes https://warpdev.slack.com/archives/C08KTPNQN65/p1777573039998779. The issue was that there were two views subscribing the up arrow event and both would handle it. Both the normal history menu and the cloud mode-only history menu would emit events in rapid succession. We now make sure that only one of the views ever fires off events, since only one history menu should be active at a time. ## Testing Before, hitting the up arrow in the agent conversation view would cause the buggy behavior Roland described: the first query would get inserted into the buffer and the history menu would appear to never open. Now, it WAI. ## Agent Mode - [x] Warp Agent Mode - This PR was created via Warp's AI Agent Mode --- app/src/terminal/input.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/terminal/input.rs b/app/src/terminal/input.rs index 4e821aa4..f0401c30 100644 --- a/app/src/terminal/input.rs +++ b/app/src/terminal/input.rs @@ -2631,6 +2631,9 @@ impl Input { }); if FeatureFlag::InlineHistoryMenu.is_enabled() { ctx.subscribe_to_view(&inline_history_menu_view, |me, _, event, ctx| { + if me.is_cloud_mode_input_v2_composing(ctx) { + return; + } me.handle_inline_history_menu_event(event, ctx); }); } @@ -2655,6 +2658,9 @@ impl Input { }); if FeatureFlag::InlineHistoryMenu.is_enabled() { ctx.subscribe_to_view(&view, |me, _, event, ctx| { + if !me.is_cloud_mode_input_v2_composing(ctx) { + return; + } me.handle_inline_history_menu_event(event, ctx); }); }