mirror of
https://github.com/storytold/designcraft.git
synced 2026-10-28 04:06:54 -06:00
File ▸ Close, its shortcut (Ctrl/Cmd+W) and the tab's × closed a document with unsaved changes at once. Closing also discards the document's recovery data, so the edits were gone for good. The three user paths now go through menus::close_document. A document with unsaved changes opens a dialog with Save, Don't Save and Cancel: - Save runs the same Save the menu does, then closes. If the document is still unsaved afterwards (the file picker was cancelled), it stays open. - Don't Save closes it. - Cancel (or Escape) does nothing. A document with nothing to save closes as before. The engine command file.close is unchanged and never asks, so scripts, MCP and the control channel's engine.execute keep working unattended. ui.menu.invoke without params acts like the menu item, as it does for other dialogs. Quitting the app is not covered here. Recovery data survives a quit, so unsaved documents come back on the next start. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>