Skip to content

Fix the editor toolbar's "Open with AI" menu freezing the rest of the…#27

Merged
inkeep-oss-sync[bot] merged 1 commit into
mainfrom
copybara/sync
Jun 4, 2026
Merged

Fix the editor toolbar's "Open with AI" menu freezing the rest of the…#27
inkeep-oss-sync[bot] merged 1 commit into
mainfrom
copybara/sync

Conversation

@inkeep-oss-sync
Copy link
Copy Markdown
Contributor

Fix the editor toolbar's "Open with AI" menu freezing the rest of the app in the macOS desktop app. Once the menu became openable on the desktop host, its default modal behavior disabled pointer events on everything outside the menu while it was open. Because the menu lives in the macOS title-bar drag region — where the outside-click that normally dismisses a modal doesn't reliably reach the menu — the only way to close it was to pick an agent, and meanwhile the rest of the chrome (notably the bottom-left project switcher) couldn't be clicked. The menu is now non-modal: opening it no longer blocks the rest of the UI, and clicking anywhere outside dismisses it. Browsers (ok ui) are unaffected.

… UI (#1620)

* fix(open-knowledge): Open-with-AI menu non-modal so it can't trap the UI

The editor toolbar's Open-with-AI dropdown is a modal Radix menu. After #1604
made it openable on the macOS desktop host, opening it set
body { pointer-events: none } over the rest of the chrome. The trigger lives in
the title-bar -webkit-app-region: drag zone, where the outside-pointerdown a
modal relies on for dismissal does not reliably reach Radix, so the menu could
only be closed by selecting an agent, and the bottom-left project switcher (and
the rest of the UI) was frozen behind it until then.

Render the menu non-modal: opening it no longer disables outside pointer events,
and the existing data-electron-drag no-drag rule handles outside-click dismissal.
Keep #1604's onClick-to-open path (still needed to open inside the drag region).

Adds a jsdom test pinning the non-modal contract (opening must not set
body pointer-events to none).

* test(open-knowledge): mock useHandoffDispatch explicitly in non-modal dom test

Addresses PR review: mock the dispatch hook directly instead of relying on it
resolving useConfigContext through the config-context mock, matching sibling
dom tests and keeping the test meaningful if the hook's imports change.

GitOrigin-RevId: 8ea4cecf00dd38954431e431fed7a9580a7b3afe
Copy link
Copy Markdown
Contributor

@inkeep-internal-ci inkeep-internal-ci Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated approval from agents-private public-mirror-sync (run: https://github.com/inkeep/agents-private/actions/runs/26924238715). Source of truth is the monorepo; direct edits on inkeep/open-knowledge are overwritten on next sync.

@inkeep-oss-sync inkeep-oss-sync Bot merged commit 6d6fde0 into main Jun 4, 2026
2 checks passed
@inkeep-oss-sync inkeep-oss-sync Bot deleted the copybara/sync branch June 4, 2026 01:31
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

2 participants