openpencil/tests/engine/app/document
Danila Poyarkov 6e68366bc6
fix(recovery): store snapshots of any size (#966)
* fix(recovery): snapshot a document only once it has unsaved edits

Opening a document lays it out, which bumps the scene version, so crash
recovery wrote a full .fig snapshot of every document opened from a file
without a writable source, edited or not. For the 401 MiB file from #924
that copied the whole archive a few seconds after opening and killed the
tab. Recovery now asks the document's change tracking, which ignores
layout, whether anything is unsaved.

* fix(recovery): store snapshots as Blobs so large documents fit

Chromium refuses a single IndexedDB value over 127 MiB, so a snapshot of
any larger document failed and recovery fell back to memory for the
rest of the session, holding another copy of the document. A Blob is
kept as a file at any size: a 421 MB snapshot now writes in IndexedDB.
Writes also no longer copy the archive first, and snapshots stored as
byte arrays by earlier versions still read back.

* test(recovery): drop the scene version from the large-buffer snapshot
2026-10-07 21:30:07 +00:00
..
autosave perf: speed up opening large pages (#953) 2026-10-07 20:57:57 +00:00
close test: typecheck the test suites and fix what that found (#896) 2026-10-05 12:42:38 +00:00
io perf: speed up opening large pages (#953) 2026-10-07 20:57:57 +00:00
recovery fix(recovery): store snapshots of any size (#966) 2026-10-07 21:30:07 +00:00