Skip to content

fix(gui): quit with cmd+q on macos - #49

Merged
Microck merged 1 commit into
mainfrom
fix/macos-cmd-q
Nov 27, 2026
Merged

Microck merged 1 commit into
mainfrom
fix/macos-cmd-q

Conversation

@Microck

@Microck Microck commented Nov 27, 2026

Copy link
Copy Markdown
Owner

Summary

cmd+q did nothing in the macos app (#48). gpui ships no default quit, so the app never had one.

  • adds a quit action bound to cmd+q and a macos app menu with "Quit OpenVector".
  • installed on macos only. gpui's cmd is super on linux and windows, and super+q shouldn't quit there. closing the last window still quits everywhere.

Fixes #48

Evidence

  • new gpui test cmd_q_dispatches_quit: cmd+q from the app window reaches the quit action and the app menu lists it. cargo test -p openvector-gui --lib cmd_q passed.
  • bash tools/check-source.sh passed.
  • not run on a real mac yet. the release candidate build will cover the macos compile and a manual quit check.

Merge Danger

Door Two-way

Blast Radius macOS desktop app menu and shortcuts

Reviewed with sol-loop: 2 rounds with gpt-6.2-sol. Sol verdict: approved

@sourcery-ai

sourcery-ai Bot commented Nov 27, 2026

Copy link
Copy Markdown

Sorry @Microck, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 2 days by commenting @sourcery-ai review. Upgrade to get a review now.

@coderabbitai

coderabbitai Bot commented Nov 27, 2026

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

This PR adds a Quit action bound to cmd-q and a macOS-only "Quit OpenVector" app menu entry.

  • Behavior: On macOS, main.rs calls install_app_menu at startup, after fonts load. Other platforms do not call it, so cmd-q is not bound there.
  • Risk: The GPUI test cmd_q_dispatches_quit checks dispatch and menu order only. No real Mac run is recorded, so Intel Mac behavior from issue #48 is unverified.
  • Reviewer action: Run a macOS release-candidate build and confirm that cmd+Q quits the app.

Walkthrough

The app now registers a Quit action, binds cmd-q to it, and adds a Quit item to the OpenVector menu. On macOS, startup installs this menu after registering bundled fonts. A test checks that cmd-q dispatches one Quit action and that the first menu item is “Quit OpenVector.”

Sequence Diagram(s)

sequenceDiagram
  participant macOS
  participant main.rs
  participant install_app_menu
  participant App
  macOS->>main.rs: Start application on macOS
  main.rs->>install_app_menu: Call after font registration
  install_app_menu->>App: Register Quit action and cmd-q binding
  install_app_menu->>App: Install OpenVector menu with Quit item
  macOS->>App: Send cmd-q
  App->>App: Dispatch Quit action
Loading

Severity of issue fixed: Low

Merge Risk: Minimal · up to ca643

This adds Cmd+Q and a Quit menu entry on macOS. The change is small and limited to macOS, and no concrete problem was found. A manual quit check on a real Mac is still planned.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

Clippy (1.99.1)

Clippy execution timed out
Clippy (1.99.1) exceeded its 180-second time budget. Findings from completed work are retained; remaining checks are incomplete.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 82828423-30fd-4647-b40f-eef7f3a99ba0
Commits

Reviewing files that changed from the base of the PR and between 496657c and ca643d6.

Files selected for processing: 3

  • rust/crates/openvector-gui/src/app-input-tests.rs
  • rust/crates/openvector-gui/src/app.rs
  • rust/crates/openvector-gui/src/main.rs

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

@Microck
Microck merged commit 6ba3f43 into main Nov 27, 2026
9 checks passed
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.

app doesn't quit/close on "cmd+Q" on mac os (intel mac)

1 participant