Offline files and durability
Finish the storage recovery plan
Add explicit export, reset, cache replacement, failure messages, and a tested recovery path to the field-notes app.
8 minute lesson
The project is not finished when writes succeed. It is finished when loss and change are understandable.
Export user notes and attachments into a portable format. Reset each storage owner deliberately: cookies through their matching server response, Web Storage by known keys, IndexedDB after closing connections, named caches by version, and OPFS entries by identifier.
Do not use one blind “clear everything” call during routine cleanup. Cached responses are replaceable; a field note may not be. Put those values in different cleanup policies and ask before destructive deletion.
Run the final matrix: first visit, reload, second tab, browser restart, offline start, schema upgrade, full quota, rejected persistence, private session, stale cache, export, reset, and restore. Save the evidence for every boundary.
Complete the field-notes app with export and reset controls. Delete all local state, restore from the export, and prove saved notes survive while cached help can be downloaded again independently.
Lesson completed