Skip to content

fix(desktop): add custom window menu bar#2698

Open
janburzinski wants to merge 2 commits into
mainfrom
emdash/topbar-fix-windows-rkb1f
Open

fix(desktop): add custom window menu bar#2698
janburzinski wants to merge 2 commits into
mainfrom
emdash/topbar-fix-windows-rkb1f

Conversation

@janburzinski

Copy link
Copy Markdown
Collaborator

Description

  • adds a custom in window menu bar for windwos/linux
  • reuses native electron meun definitions via rpc
  • keeps macos unchanged
  • ensures menu stays accessible when sidebar is collapsed

Screenshot/Recording (if applicable)

https://streamable.com/j4xi7v

Checklist
  • I kept this PR small and focused
  • I ran a self-review before opening this PR
  • I ran the relevant local checks or explained why not
  • I updated docs when behavior or setup changed
  • I added or updated tests when behavior changed, or explained why not
  • I only added comments where the logic is not obvious
  • I used Conventional Commits for commit
    messages and, when possible, the PR title

@greptile-apps

greptile-apps Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds a custom in-window app menu for desktop platforms. The main changes are:

  • Shared native Electron submenu builders for File, Edit, View, and Help.
  • A new app RPC path for opening a selected menu at renderer-provided coordinates.
  • A Windows/Linux WindowMenuBar component that stays hidden on macOS.
  • Sidebar and titlebar placement so the menu stays reachable when the sidebar is collapsed.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
apps/emdash-desktop/src/main/app/menu.ts Factors the app menu into reusable submenu builders and adds native popup support for the custom menu bar.
apps/emdash-desktop/src/main/core/app/controller.ts Adds a structured RPC handler for opening app menus from the renderer.
apps/emdash-desktop/src/main/core/app/service.ts Delegates custom menu popup requests to the main menu module.
apps/emdash-desktop/src/renderer/features/sidebar/sidebar-space.tsx Shows the custom menu bar in the sidebar header only while the sidebar is open.
apps/emdash-desktop/src/renderer/lib/components/titlebar/Titlebar.tsx Shows the custom menu bar in the titlebar when the sidebar is collapsed.
apps/emdash-desktop/src/renderer/lib/components/titlebar/window-menu-bar.tsx Adds the Windows/Linux menu bar buttons and opens native submenus through RPC.
apps/emdash-desktop/src/shared/events/appEvents.ts Adds the shared menu id type used by the renderer and main process.

Reviews (2): Last reviewed commit: "fix(desktop): harden custom app menu" | Re-trigger Greptile

Comment thread apps/emdash-desktop/src/renderer/features/sidebar/sidebar-space.tsx Outdated
Comment thread apps/emdash-desktop/src/main/app/menu.ts
Comment thread apps/emdash-desktop/src/renderer/lib/components/titlebar/window-menu-bar.tsx Outdated
@janburzinski

Copy link
Copy Markdown
Collaborator Author

@greptileai

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