enhancement: no autosave and no crash recovery #16
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
linux
packaging
performance
question
tech-debt
ui
windows
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
ben/openDither#16
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Version: 0.1.2 (
main@41c7fc5)System: any.
Steps to reproduce
kill, or the OOM killer on a large canvas (see the memory issue).What should have happened
The work comes back on the next start, or at least a recovery file is offered.
What happened instead
There is nothing: no autosave, no recovery file, no "restore the document from the last session" prompt.
grep -rn "autosave\|recovery" app/srcfinds nothing. What exists is a crash log (last-crash.log,install_panic_hook) and the "ask before closing unsaved work" prompt, which only covers the case where the app gets to close itself.The pieces for a fix are all there:
project::savewrites a complete document (zip, pictures included) atomically (write_atomic),paths::data_dir()is the right place, and the app already tracksunsavedandproject_path.Suggested fix
unsavedand something changed, writedata_dir()/recovery/<id>.opendither(or one slot,recovery.opendither) with the sameproject::save, off the UI thread once there is one.@ mention: this overlaps with the "work on the UI thread" issue only in that a periodic save must not stutter the window — a one-off write of a few MB is acceptable, or it goes to the worker once that exists.
A check that would catch it
An
--auditrow with a temp data folder: mark a document dirty, run the autosave hook, assert a recovery file exists and loads back with the same picture fingerprint; then save cleanly and assert the recovery file is gone.