mirror of
https://github.com/kuhyx/todo-app.git
synced 2026-11-11 12:27:50 +01:00
NoteRepository is rewritten on crdt_sync's LogStore: each Note is stored *as* a Record (per-field LWW + sticky tombstone), so the on-disk log IS the sync wire format. Its public API is unchanged (upsert/delete/listNotes/watchNotes/ watchCount/importNotes/changes/nodeId), so the UI and most tests are untouched; only the internals, the two sync methods (getChangeset/merge -> exportLog/importLog over a Log), and the changeset-specific tests change. Filtering/sorting now run in Dart over the in-memory log; watchNotes/watchCount seed synchronously in onListen to avoid a subscription race. SyncService moves from per-device sqlite changesets to per-device crdt_sync Logs under a new todo-sync/notes/ path (clean format cutover; old clients can't misread a new file). todo's own GitHubClient transport is kept. One-time migration in NoteRepository.open: reads the legacy sqlite DB (kept untouched as a safety net; the dep stays only for this), seeds every note -- tombstones included -- into the log with each field's HLC derived from its updated_at (so a pre-cutover edit still wins by real edit time across two independently-migrating devices), reuses the legacy node id, and sets a persisted "migrated" flag so it never re-runs. Verified: flutter analyze + dart format clean; 178 tests at 100% coverage (incl. migration, tombstone, restore-race, and corrupt-peer cases). Device verified on dev.kuhy.todo: real backlog of 27 live notes (+5 tombstones) migrated intact -- confirmed against a pulled sqlite backup, the pulled LogStore JSON, and the app's own "27 saved" -- notes render with status/ priority/dates, no crash, migration one-time. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019KwUCPESvE5CjCtmUFz8xQ |
||
|---|---|---|
| .agents/skills | ||
| android | ||
| docs | ||
| lib | ||
| linux | ||
| mcp | ||
| test | ||
| tool | ||
| .gitignore | ||
| .mcp.json | ||
| .metadata | ||
| analysis_options.yaml | ||
| CLAUDE.md | ||
| install_arch.sh | ||
| LICENSE | ||
| pubspec.lock | ||
| pubspec.yaml | ||
| README.md | ||
| run.sh | ||
| skills-lock.json | ||
todo
A new Flutter project.
Getting Started
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
For help getting started with Flutter development, view the online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.