From 80ab7481254581cb3b7316fc05cc6019c6305930 Mon Sep 17 00:00:00 2001 From: galuis116 <116897328+galuis116@users.noreply.github.com> Date: Tue, 21 Apr 2026 18:06:59 -0700 Subject: [PATCH] agent_ui: Fix inconsistent Rules keybinding in Toggle Agent Menu (#54420) Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Closes #54419 Release Notes: - Fixed Agent menu shortcut context handling so Alt-Shift-L consistently resolves to Rules (and displays correctly) when the Toggle Agent Menu is open, while preserving existing global/context-specific shortcuts such as Language Servers and onboarding bindings outside Agent menu context. --------- Co-authored-by: Danilo Leal Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com> --- crates/agent_ui/src/agent_panel.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/agent_ui/src/agent_panel.rs b/crates/agent_ui/src/agent_panel.rs index 7f96b1c28ab375fe13ae4e9b4ba83a8f1c26f150..19d85807380e298b7304186ce1d7b6fa03b25661 100644 --- a/crates/agent_ui/src/agent_panel.rs +++ b/crates/agent_ui/src/agent_panel.rs @@ -1498,6 +1498,7 @@ impl AgentPanel { window: &mut Window, cx: &mut Context, ) { + window.focus(&self.focus_handle, cx); self.agent_panel_menu_handle.toggle(window, cx); }