Repository navigation
feat(zbugs-gpui): a macOS app menu, with Quit on Cmd-Q - #184
Merged
Merged
Conversation
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>
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.
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
Dropflushes the local store and closes the client.Checked on macOS 27, running the bundle as
cargo rundoes (#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.