Files
artcraft/frontend/apps
Tanish MankuandClaude Opus 4.7 94fdb4ac2f webapp pagescene: per-token scene cache with original snapshot
Reworks scene-cache-store from a single playground-scoped string to a
Record<string, { original?, current }> keyed by sceneToken (with a
PLAYGROUND_KEY constant for the no-token slot). Visiting /edit-3d/A,
editing, jumping to /edit-3d/B, then coming back to /edit-3d/A
restores A's in-progress state — the cache hit short-circuits the
server fetch inside Editor.initialize.

The adapter's loadSceneViaApi seeds `original` on first server fetch
so the lib's "Reset to original" menu item has the snapshot it needs.
resetToOriginal pulls that snapshot, hands it to editor.applyJson
(which replaces the scene and clears undo history), and mirrors
`current = original` so a pre-serialization reload can't drag the
discarded edits back.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-13 15:42:52 -07:00
..