Repository navigation
fix: remove the native application menu on Windows/Linux - #10
Merged
Merged
Conversation
Electron renders a default application menu (File/Edit/View/Window) as an in-window menu bar on Windows and Linux. The app drives all commands from its own UI and renderer keyboard shortcuts, so the native menu is redundant chrome. Call `Menu.setApplicationMenu(null)` on non-macOS platforms during app startup. macOS is intentionally excluded — its menu bar lives in the system bar and provides the standard app/edit accelerators expected there. Verified on Windows: the File/Edit/View/Window bar no longer appears; the tab bar sits directly under the native title bar. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Problem
On Windows/Linux, Electron renders a default application menu (File / Edit / View / Window) as an in-window menu bar between the title bar and the app content. The app drives every command from its own UI and renderer keyboard shortcuts, so that native menu is redundant chrome.
Fix
Call
Menu.setApplicationMenu(null)during startup on non-macOS platforms.macOS is intentionally excluded: its menu bar lives in the system top bar and provides the standard app/edit accelerators (⌘C/⌘V/⌘Q, etc.) expected on that platform, so it stays.
Verification (Windows)
OS-level window capture before/after:
File Edit View Windowmenu row → tab bar.Standard text-editing shortcuts in inputs still work (handled by Chromium, not the menu).
pnpm --filter @oh-my-github/client typecheckpasses.🤖 Generated with Claude Code