Skip to content

feat(x): right-click context menus across the app - #875

Open
hrsvrn wants to merge 1 commit into
mainfrom
right-click-context-menus
Open

feat(x): right-click context menus across the app#875
hrsvrn wants to merge 1 commit into
mainfrom
right-click-context-menus

Conversation

@hrsvrn

@hrsvrn hrsvrn commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

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)

  • Email inbox rows — Open/Close thread, Mark read/unread, Mark important/not important (section-aware), Archive, Delete. Mirrors the hover buttons.
  • Browser tab strip — Close Tab, Close Other Tabs, Close Tabs to the Right (and Close All where single-tab close is allowed). Implemented in the generic TabBar and funneled through the existing onCloseTab callback, so no parent changes were needed.
  • Sidebar recent chats — Pin/Unpin, Rename, Delete; mirrors the kebab dropdown, matching the pinned-apps rows that already had a context menu.
  • Meetings notes table — Open, Copy Path, Open in file manager, inline Rename, Delete. Wired to App's knowledgeActions through a new optional actions prop, so rename keeps wiki-link rewriting and delete goes to trash.
  • Live notes table — Open note, Activate/Deactivate, Stop run (while running).

Main process

  • New 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 call preventDefault() on contextmenu, which suppresses this event entirely, so the two systems never conflict.

Fix

  • BrowserPane's blocking-overlay detection treated opacity: 0 as "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 native WebContentsView instead of hiding it. Dropped the opacity condition; closing overlays are already excluded via data-state="open".

Testing

  • npm run deps, npm run lint, npm run typecheck (plus a manual tsc over apps/main) all pass.
  • Manually verified the browser tab menu now renders unclipped with the view hidden while open.

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.
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.

1 participant