Add an autosave feature #9

Closed
opened 2026-02-20 19:45:26 +00:00 by ImBenji · 1 comment
Owner
No description provided.
ImBenji added this to the Arcs & Angles project 2026-02-20 19:45:26 +00:00
ImBenji added the enhancement label 2026-02-20 19:45:35 +00:00
ImBenji moved this to Ready in Arcs & Angles on 2026-02-22 17:03:01 +00:00
ImBenji moved this to On Hold in Arcs & Angles on 2026-03-02 17:14:29 +00:00
ImBenji moved this to Backlog in Arcs & Angles on 2026-08-12 12:40:51 +00:00
Author
Owner

Shipped. Verified against the repo 2026-09-05 during the roadmap audit.

lib/utils/session_recovery_store.dart is the implementation - deliberately NOT Hive, it writes real .ana files into a findable Autosaves folder (recovery_blob_store_io.dart, IndexedDB on web). Rolling numbered slots per document (autosave-<docKey>-<slot>.ana) rather than one blob getting overwritten, with stale-blob pruning.

Wired up in editor_core.dart on a 5s debounce (_autosaveDebounceDuration), with encoding off the UI thread, a "reveal autosaves folder" action in the menu, and shutdown_guard.dart catching OS shutdown/logout so whatever is sat in the debounce is not simply lost. Recovery is offered on startup through main.dart.

Covered by test/session_recovery_store_test.dart and test/shutdown_guard_test.dart.

This went well past the original ask (a 5-minute timer with 12 slots), so closing rather than leaving it open on the old wording.

Shipped. Verified against the repo 2026-09-05 during the roadmap audit. `lib/utils/session_recovery_store.dart` is the implementation - deliberately NOT Hive, it writes real `.ana` files into a findable Autosaves folder (`recovery_blob_store_io.dart`, IndexedDB on web). Rolling numbered slots per document (`autosave-<docKey>-<slot>.ana`) rather than one blob getting overwritten, with stale-blob pruning. Wired up in `editor_core.dart` on a 5s debounce (`_autosaveDebounceDuration`), with encoding off the UI thread, a "reveal autosaves folder" action in the menu, and `shutdown_guard.dart` catching OS shutdown/logout so whatever is sat in the debounce is not simply lost. Recovery is offered on startup through `main.dart`. Covered by `test/session_recovery_store_test.dart` and `test/shutdown_guard_test.dart`. This went well past the original ask (a 5-minute timer with 12 slots), so closing rather than leaving it open on the old wording.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: IMBENJI.NET/Metro-Map-Maker#9