mirror of
https://github.com/kuhyx/todo-app.git
synced 2026-11-11 14:07:49 +01:00
The capture screen fed the on-disk BACKLOG.md backup off an always-live watchNotes() subscription, so every keystroke re-queried the whole table, re-parsed every row, and rebuilt the full Markdown export on the UI isolate — O(notes) per character. It also fired a whole-screen setState just to update the "Saved locally" timestamp. - Add NoteRepository.changes: an O(1) broadcast tick after each write (upsert/delete/merge; importNotes transitively). LocalBackup now pulls notes via an injected fetcher only when its 2s debounce fires, so the query + parse + Markdown export runs at most once per idle window instead of on every keystroke. Capture listens to changes, not watchNotes; a launch-time schedule() keeps BACKLOG.md fresh. - Scope the save indicator to a ValueNotifier/ValueListenableBuilder so a keystroke updates one line of text, not the AppBar/dropdowns/editor. - Key list tiles by note id for identity-based reorder diffing. Measured on a 4K/144Hz desktop the UI-thread build stays <=3.3ms; coverage held at 100% on all changed files. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| capture_screen_test.dart | ||
| fake_note_repository.dart | ||
| fake_secure_storage.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 | ||