From cea5f650dea0ede8ffb47d3f9affac91bfa8f010 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B7=E7=94=B5=E8=8A=BD=E8=A1=A3?= Date: Sat, 9 May 2026 22:23:37 -0400 Subject: [PATCH] Route sidebar toggle through set_active_sidebar_width `toggle_sidebar_width` set the new width via core directly, bypassing the picker-dismiss + hover-expand reset that lives in `set_active_sidebar_width`. So the user could open the workspace popover, hit toggle, see the sidebar collapse, and the popover would reappear on re-expand because the flag never cleared. Forward toggle through the same entry point. One sidebar-resize code path for the keyboard, the toggle button, and the drag handle. --- crates/ely_app/src/shell/sidebar.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/crates/ely_app/src/shell/sidebar.rs b/crates/ely_app/src/shell/sidebar.rs index 3b7dc62..9a4c075 100644 --- a/crates/ely_app/src/shell/sidebar.rs +++ b/crates/ely_app/src/shell/sidebar.rs @@ -112,9 +112,12 @@ impl ElyShell { COLLAPSED_SIDEBAR_WIDTH_PX }; - if core.set_space_sidebar_width(&snapshot.active_space_id, next_width).is_ok() { - cx.notify(); - } + // Route through `set_active_sidebar_width` instead of poking + // `core.set_space_sidebar_width` directly so the same + // popover-dismiss + hover-expand reset logic applies whether + // the user toggles via the keyboard / button or the resize + // drag. + self.set_active_sidebar_width(next_width, cx); } pub(crate) fn set_active_sidebar_width(&mut self, width_px: u16, cx: &mut Context) {