You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
maple-agent: Clicking on a popup menu that is already open should dismiss it #997
When clicking on a button that displays a popup menu, the first click should open the menu and second click should dismiss the menu. This goes for all popup menus in the app. This isn't happening with the All Projects button.
Click on All Projects
Menu appears
Click on All Projects again
Menu should dismiss
Instead menu dismisses and then immediately appears again
The second click on the All Projects header closes the menu and opens it again.
switcher-menu uses on_mouse_down_out, which GPUI runs in the capture phase. That sets switcher_menu_open to false. The header's on_click then calls toggle_switcher_menu, sees the menu closed, and opens it. stop_propagation on the click runs after the outside handler.
The same pairing is on the task and project overflow buttons, the header project chip, the composer model / mode / integrations chips, and the settings dropdowns.
A capture-phase handler on the trigger can stop the press before the menu's outside handler and toggle there. The folder-plus control on the All Projects row needs to stay outside the toggle target.
Activity
maple-engineering commentedon Sep 22, 2026
The second click on the All Projects header closes the menu and opens it again.
switcher-menuuseson_mouse_down_out, which GPUI runs in the capture phase. That setsswitcher_menu_opento false. The header'son_clickthen callstoggle_switcher_menu, sees the menu closed, and opens it.stop_propagationon the click runs after the outside handler.The same pairing is on the task and project overflow buttons, the header project chip, the composer model / mode / integrations chips, and the settings dropdowns.
A capture-phase handler on the trigger can stop the press before the menu's outside handler and toggle there. The folder-plus control on the All Projects row needs to stay outside the toggle target.
maple-engineering commentedon Sep 22, 2026
Draft PR for this: #999
maple-agent: one popup primitive for every menu (fixes MaplePrivacyLa…