Skip to content

Ask before quitting only while a song is being generated - #53

Closed
stalexxx wants to merge 2 commits into
timoncool:mainfrom
stalexxx:macos-quit-confirm
Closed

stalexxx wants to merge 2 commits into
timoncool:mainfrom
stalexxx:macos-quit-confirm

Conversation

@stalexxx

@stalexxx stalexxx commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Quitting mid-render throws the song away, and on macOS Cmd+Q sits next to Cmd+W.

  • The studio asks "A song is being generated. Quit YuE2 Studio and stop it?" only when GET /v1/music/jobs lists a queued or running job; otherwise it quits at once. If the service can't be reached to tell, it asks.
  • All platforms: closing the main window (the X, Alt+F4, Cmd+W) is intercepted this way, since that is how the studio quits.
  • macOS: the stock Quit item terminates the app and closes the window before anything can ask, so it is replaced by one of our own (Cmd+Q); the Dock's Quit is intercepted too.
  • Exits the app requests itself (with an exit code), such as restart after an update, are not intercepted.

Verified: cargo check passes on macOS (with RUSTUP_TOOLCHAIN=stable, since rust-toolchain.toml on main pins the Windows MSVC target). The Windows build and the dialogs themselves are not run yet.

Independent of #51 (based on main).

🤖 Generated with Claude Code

stalexxx and others added 2 commits October 7, 2026 14:24
The stock Quit item terminates the app and closes the window before anything
can ask, so Cmd+Q is replaced by a menu item of our own. It asks only when
/v1/music/jobs lists an active job, and quits at once otherwise.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Closing the main window is how the studio quits on Windows, so the check for
a running song moves to the window's close request and applies on every
platform. Cmd+Q and the Dock stay macOS-only.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@stalexxx stalexxx changed the title macOS: ask before Cmd+Q only while a song is being generated Ask before quitting only while a song is being generated Oct 7, 2026
stalexxx added a commit to stalexxx/YuE2-Studio that referenced this pull request Oct 7, 2026
Same change as the macos-quit-confirm branch (PR timoncool#53).

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@timoncool timoncool mentioned this pull request Oct 8, 2026
@timoncool

Copy link
Copy Markdown
Owner

Done in #51 (merged), shipped in 3.5.0: quitting with songs in progress asks first and stops them; a cancelled song is saved as cancelled at once.

@timoncool timoncool closed this Oct 10, 2026
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