feat(x): native application menu bar - #876
Open
hrsvrn wants to merge 1 commit into
Open
Conversation
…gated devtools, update-aware Help
Replaces Electron's factory-default menu (electronjs.org Help links,
DevTools enabled in production) with a real application menu:
- File: New Chat (Cmd+N), New Note (Cmd+Shift+N), Export Note (md/pdf/docx)
- Edit: undo/redo route through the renderer on Windows/Linux so the
markdown editor's history routing keeps working; macOS keeps roles
- View: Search (Cmd+K), Toggle Sidebar (Cmd+\), Full-Screen Chat (Cmd+L),
zoom, full screen; Reload/DevTools now dev-only
- Go: Back/Forward + all ten sections with Cmd+1-9, riding the existing
deep-link pipeline (dispatchDeepLink -> app:openUrl)
- Tools: Quick Ask (live chord display), Start/Stop Meeting Notes with
dynamic relabel (same hook as the tray)
- Help: GitHub/issues/releases, Keyboard Shortcuts (deep-links the
settings tab), Open Data Folder, About, and a state-aware
"Check for Updates…" ("Restart to Update" when staged; GitHub releases
link on Linux where autoUpdater is unsupported)
Wiring: new menu:command + menu:toggleSidebar typed IPC channels; each
command reuses the exact code path of the in-app control it mirrors.
Chords the renderer already handles (Cmd+K/N/L/Z) stay display-only on
Windows/Linux. Zoom logic moves from main.ts into zoom.ts so menu clicks
and the before-input-event handler share one implementation; its stale
"Linux suppresses the menu bar" comment is gone. Menu rebuilds on
recording-state changes, quick-ask rebinds, and updater transitions.
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
Replaces Electron's factory-default menu (electronjs.org Help links, DevTools and Reload enabled in production) with a full native application menu for the desktop app.
How
apps/main/src/menu.ts, installed before the window is created so Linux/Windows never paint the default menu. Rebuilt on recording-state changes, quick-ask rebinds, and updater transitions — mirrorstray.ts.menu:command(one discriminated payload; each command reuses the exact code path of the in-app control it mirrors) andmenu:toggleSidebar(its own channel because the handler must live under the SidebarProvider). Go-menu navigation needs no channel — it rides the existing deep-link pipeline (dispatchDeepLink→app:openUrl), which already parks URLs while the renderer loads.main.tsintozoom.tsso menu clicks and thebefore-input-eventkeystroke handler share one implementation; the stale "Linux suppresses the menu bar" comment is corrected in the move.registerAccelerator: false), so existing keyboard behavior is untouched.updater.tsgainsonUpdaterStatusChanged; menu-opened Settings gets its own dialog instance that can deep-link any tab (ConfigTabis now exported).Testing
npm run deps,npm run lint,npm run typecheckall pass;apps/mainadditionally typechecked directly withtsc --noEmit(it is not covered by the workspace typecheck script).autoHideMenuBarchange if preferred.