Skip to content

feat(zbugs-gpui): a macOS app menu, with Quit on Cmd-Q - #184

Merged
tmm merged 1 commit into
mainfrom
zbugs-gpui-quit
Nov 12, 2026
Merged

tmm merged 1 commit into
mainfrom
zbugs-gpui-quit

Conversation

@tmm

@tmm tmm commented Nov 12, 2026

Copy link
Copy Markdown
Member

GPUI has no menu bar of its own and GPUI Kit leaves Cmd-Q to the app (its own test, initialization_leaves_quit_and_close_shortcuts_to_the_application), so Cmd-Q did nothing in zbugs-gpui.

The app now sets the app menu zbugs-swift (SwiftUI) and zbugs-rune (Rune's default macOS menu) get from their frameworks: Services, Hide ZBugs GPUI (⌘H), Hide Others (⌥⌘H), Show All, and Quit ZBugs GPUI (⌘Q). Quitting drops the window and the session, whose Drop flushes the local store and closes the client.

Checked on macOS 27, running the bundle as cargo run does (#182): the menu bar shows the menu with its key equivalents, and ⌘Q from the keyboard ends the process in under 2 s with exit status 0, after the session's flush, with no crash report.

Rune's menu also adds Edit and Window menus to a regular app. This PR leaves those out: GPUI Kit's inputs bind their own editing keys, and the request was Quit.

GPUI has no menu bar of its own and GPUI Kit leaves quitting to the app,
so Cmd-Q did nothing. The app now sets the app menu zbugs-swift and
zbugs-rune get from their frameworks: Services, Hide (Cmd-H), Hide
Others (Opt-Cmd-H), Show All, and Quit (Cmd-Q). Quitting drops the
window and the session, which flushes the local store.

Amp-Thread-ID: https://ampcode.com/threads/T-1bf9c90a-2f81-4c85-a699-75afe55683ef
Co-authored-by: tmm <tmm@tmm.dev>
@tmm
tmm merged commit c68399b into main Nov 12, 2026
16 checks passed
@tmm
tmm deleted the zbugs-gpui-quit branch November 12, 2026 22:03
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.

2 participants