Store browser drafts record by record
- github
- github/openchronology/timeline-app
- commit
- main
- github/athanclark
A signed-in user's browser-only timeline used to be saved whole after every change: the editor rebuilt the document and IndexedDB cloned it on the main thread. TimelineIndex now journals the moments, durations, links and deleted moments' last times each edit changes; drafts (src/drafts.ts) keep one IndexedDB record per entity and write only the journal's records, so a draft save takes under a millisecond at 200,000 moments. Opening a timeline stores every record once, in one transaction. Records rebuild exactly the document the index exports, and whole-document drafts from earlier versions still restore and convert. The capacity benchmarks record the draft save on its own, from the editor's openchronology:draft-changes performance measures. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Ti36soiZpKdSxKfvQLEcfY https://github.com/openchronology/timeline-app/commit/09bf955278f14eec7e8c8acb5519825676d6979c