mirror of
https://github.com/kuhyx/todo-app.git
synced 2026-07-04 13:23:15 +02:00
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> |
||
|---|---|---|
| .. | ||
| capture_screen_test.dart | ||
| fake_note_repository.dart | ||
| github_client_test.dart | ||
| github_device_auth_test.dart | ||
| local_backup_test.dart | ||
| markdown_view_test.dart | ||
| note_detail_screen_test.dart | ||
| note_editor_test.dart | ||
| note_repository_test.dart | ||
| note_template_test.dart | ||
| note_test.dart | ||
| notes_list_screen_test.dart | ||
| notes_markdown_test.dart | ||
| settings_screen_test.dart | ||
| sync_service_test.dart | ||
| sync_settings_test.dart | ||