mirror of
https://github.com/kuhyx/todo-app.git
synced 2026-11-10 20:27:01 +01:00
Backup recovery and file import both wrote restored notes through `upsert`, which stamps a fresh clock. Under crdt_sync's per-field last-writer-wins that makes a *restore* outrank every other device: the restoring device claims it edited every field just now, so it silently overwrites newer edits made elsewhere on the next sync. This is not hypothetical. The new desktop app seeded itself from BACKLOG.md and rewrote 245 of 330 field clocks to today under a fresh node id, then synced -- taking authority over the phone for ~74% of all fields. Content happened to survive (the copy came from the same data; only a trailing newline on 5 notes differed via the Markdown round-trip), but nothing about the mechanism guaranteed that. The legacy sqlite migration already did the right thing for exactly this reason, so the fix is to use that same helper everywhere a note is *restored* rather than newly written. Renamed legacyRecordFor -> recordAtNoteTime, since it is no longer migration-specific. The freshness check in importNotes is unchanged: it decides whether the import wins *locally*. The clock decides whether it wins on *other* devices, and an import must not win there merely by being recent. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .agents/skills | ||
| android | ||
| assets/icon | ||
| bin | ||
| desktop | ||
| docs | ||
| lib | ||
| mcp | ||
| test | ||
| tool | ||
| web | ||
| .gitignore | ||
| .mcp.json | ||
| .metadata | ||
| analysis_options.yaml | ||
| CLAUDE.md | ||
| install_arch.sh | ||
| LICENSE | ||
| MIGRATION.md | ||
| 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.