mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-03 00:47:53 +00:00
Adds Editor.applyJson(jsonString) that delegates to the existing save_manager.loadCache JSON-deserialize path and additionally clears the undo stack and emits SceneResetEvent. Used by the new Reset flow so the user can't "undo" a reset back into their discarded edits. PageSceneAdapter gains an optional resetToOriginal() hook. When the host implements it AND a sceneToken is loaded, the File menu shows a destructive "Reset to original" item that opens a confirm modal and then defers to the host (which knows where to find the original snapshot — the webapp's per-token cache lands in a follow-up commit). Tauri leaves the hook off so nothing changes there. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>