feat(x): right-click context menus across the app - #875
Open
hrsvrn wants to merge 1 commit into
Open
Conversation
Add context menus to the surfaces that were missing them, reusing the shared Radix ContextMenu component and existing action handlers: - Email inbox rows: open/close, read/unread, importance, archive, delete - Browser tab strip: close / close others / close to the right (generic TabBar, funneled through the existing onCloseTab callback) - Sidebar recent chats: pin, rename, delete (mirrors the kebab dropdown) - Meetings notes table: open, copy path, reveal, inline rename, delete (wired to App's knowledgeActions via a new optional actions prop) - Live notes table: open, activate/deactivate, stop run Add a native text-editing context menu in the main process (Electron shows none by default): cut/copy/paste/select-all, spellcheck suggestions + add-to-dictionary, and copy-link. Attached to the main window, quick-ask window, and embedded browser tabs; the in-DOM Radix menus preventDefault() the event, so the two never conflict. Fix BrowserPane's blocking-overlay detection clipping menus over the embedded browser: overlays mount at opacity 0 (enter animation) and the visibility check runs on the mount frame, so opacity must not factor in.
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.
What
Adds right-click context menus to the surfaces that were missing them, plus the native text-editing menu Electron doesn't provide by default.
Renderer (shared Radix
ContextMenu, existing action handlers)TabBarand funneled through the existingonCloseTabcallback, so no parent changes were needed.knowledgeActionsthrough a new optionalactionsprop, so rename keeps wiki-link rewriting and delete goes to trash.Main process
context-menu.ts: native right-click menu for text editing and selections — cut/copy/paste/select-all, spellcheck suggestions + Add to Dictionary, Copy Link Address. Attached to the main window, the quick-ask window, and embedded browser tabs. The in-DOM Radix menus callpreventDefault()oncontextmenu, which suppresses this event entirely, so the two systems never conflict.Fix
BrowserPane's blocking-overlay detection treatedopacity: 0as "no overlay", but Radix overlays mount at opacity 0 (enter animation) and the check runs exactly once on the mount frame — so menus/dropdowns/dialogs opened over the embedded browser were clipped by the nativeWebContentsViewinstead of hiding it. Dropped the opacity condition; closing overlays are already excluded viadata-state="open".Testing
npm run deps,npm run lint,npm run typecheck(plus a manualtscoverapps/main) all pass.