Skip to content

maple-agent: dismiss an open popup on a second press of its button - #999

Closed
maple-engineering[bot] wants to merge 1 commit into
masterfrom
maple-agent-popup-dismiss
Closed

maple-engineering[bot] wants to merge 1 commit into
masterfrom
maple-agent-popup-dismiss

Conversation

@maple-engineering

@maple-engineering maple-engineering Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #997

A second press on the button that opened a popup now leaves the popup closed. The menu's outside-press handler runs before the click, so that click was opening the menu again.

popup_press takes the press in the capture phase and stops it. It is wired to:

  • the All Projects header
  • the task and project overflow buttons
  • the header project chip
  • the composer model, permission-mode, and integrations chips
  • the settings dropdowns

Right-click menus are unchanged. The folder-plus control on the All Projects row stays a separate button, so pressing it does not toggle the project menu.

Tests click each of those triggers twice, and also press outside an open composer menu.

Test plan

  • Open All Projects, press it again, and confirm the menu stays closed
  • Press the task and project overflow buttons a second time and confirm those menus stay closed
  • Do the same for the header project chip and the composer model, mode, and integrations chips
  • Do the same for a settings dropdown
  • Press outside an open menu and confirm it still closes
  • Press the folder-plus button on the All Projects row and confirm it still starts a new project

The menu's outside-press handler runs before the click, so the click
was opening the menu again. The trigger now takes that press in the
capture phase.
@AnthonyRonning

Copy link
Copy Markdown
Contributor

My review of this surfaced a lot of manual hand crafted popup logic and thus I'll be going through a heavier refactor pass on this before then fixing the bug. I will close if/when I have something.

@maple-engineering

Copy link
Copy Markdown
Contributor Author

Superseded by #1002, which is merged. Closing this alternative.

@maple-engineering
maple-engineering Bot deleted the maple-agent-popup-dismiss branch September 23, 2026 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

maple-agent: Clicking on a popup menu that is already open should dismiss it

1 participant