todo-app/lib/sync
Krzysztof kuhy Rudnicki 6db9ee11d0 Auto-export a local Markdown backup and recover from it on launch
Third durability layer beside GitHub auto-sync and Android Auto Backup:
a plain, human/LLM-readable Markdown file kept current on local disk.

- LocalBackup (lib/sync): pure, injectable file IO. scheduleExport()
  debounces writes (a burst of keystrokes → one export); recover() parses
  the file back into notes. Reused NotesMarkdown serializer.
- CaptureScreen wires it: on launch, recover into an *empty* DB only (so a
  stale backup never clobbers existing notes), then keep the backup current
  as notes change. Platform path = ~/todo/BACKLOG.md on desktop (the path
  the user's workflow already reads) or the app documents dir on mobile
  (covered by Android Auto Backup). File IO is injected in tests.
- Added fake_async dev dep to unit-test the debounce with a virtual clock.

151 tests, 100% line coverage.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 22:11:08 +02:00
..
github_client.dart Add list filters/sort, status, priority rework, export/import, structured template 2026-06-15 16:52:59 +02:00
github_device_auth.dart Add list filters/sort, status, priority rework, export/import, structured template 2026-06-15 16:52:59 +02:00
local_backup.dart Auto-export a local Markdown backup and recover from it on launch 2026-06-15 22:11:08 +02:00
notes_markdown.dart Reach 100% test coverage (capture-screen sync DI + plugin/clipboard fakes) 2026-06-15 17:11:01 +02:00
sync_service.dart Add list filters/sort, status, priority rework, export/import, structured template 2026-06-15 16:52:59 +02:00
sync_settings.dart Initial commit: offline-first CRDT notes app (capture + GitHub sync) 2026-06-14 14:20:19 +02:00