Fix the editor toolbar's "Open with AI" menu freezing the rest of the…#27
Merged
Conversation
… 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
Contributor
There was a problem hiding this comment.
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.
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.