Prompt to save temporary work before quitting

Merged
AN
3d ago
+208-6

Summary

Closes #149.

  • Route window close, native Quit, and title-bar/menu exit actions through the existing Save/Discard/Cancel workflow.
  • Wait for Save As and acknowledged final workspace flush before closing; failures and cancelled dialogs preserve the session.
  • Prevent repeated close requests and busy operations from bypassing the decision; flush workspace edits made during saving.
  • Document normal exit and forced-termination limitations.

Tests

  • cargo test -p perseid --lib --quiet: 733 passed.
  • Automated coverage includes window-close cancellation, repeated requests, Save/Discard/Cancel, cancelled dialogs, failed saves and final flush failures, and latest-workspace flushing.
  • git diff --check: clean.

Manual verification still needed

Interactive macOS window close / application Quit and Windows/Linux title-bar / menu Quit were not manually exercised in this environment. Please verify Save, Discard, Cancel, and cancelled Save As on those platform paths.