todo-app/test
Krzysztof kuhy Rudnicki c37a9ef118 Add the desktop wrapper, and stop the test suite eating BACKLOG.md
The desktop app is a browser now, so it cannot write files. This adds the other
half: a loopback HTTP server that serves the web build and owns the two files
the browser cannot touch -- `~/todo/BACKLOG.md`, which the user's tooling and
the todo MCP server read, and a disk copy of the note log so a wiped Chrome
profile is not a total-loss event for unsynced notes.

Notable details:

- Binds to 127.0.0.1 only. The endpoints overwrite files in the user's home
  with no authentication, so a routable bind would let anything on the network
  rewrite the backlog.
- Serves explicit content types. CanvasKit refuses a `.wasm` labelled anything
  else and the app then renders nothing at all.
- Mirroring to disk is debounced. The store persists on every keystroke, so
  mirroring eagerly meant an HTTP request plus a whole-log write per character;
  IndexedDB still gets every keystroke, only the durability copy waits.

Separately, this fixes a pre-existing destructive bug found while testing:
`settings_screen_test` did real file I/O and overwrote the user's canonical
`~/todo/BACKLOG.md` with a single fake note on *every* `flutter test` run. It
went unnoticed because the app rewrites the file whenever it launches. The
export destination is now injectable and the test redirects it to a temp dir;
verified that a full suite run leaves the real file byte-identical.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-20 13:33:25 +02:00
..
capture_screen_test.dart Surface sync outcomes so devices can't silently diverge 2026-07-16 17:58:41 +02:00
fake_note_repository.dart Make the app compile and run for web, behind platform seams 2026-07-20 13:14:03 +02:00
fake_secure_storage.dart Store the GitHub sync token in the OS keystore, migrating off plaintext 2026-06-15 22:57:05 +02:00
github_device_auth_test.dart Reach 100% test coverage (capture-screen sync DI + plugin/clipboard fakes) 2026-06-15 17:11:01 +02:00
local_backup_test.dart Cut per-keystroke O(N) work to keep capture smooth at scale 2026-07-11 21:51:46 +02:00
markdown_view_test.dart Add full note view/editor with templates and Markdown render 2026-06-15 21:59:31 +02:00
note_detail_screen_test.dart Add priority/template wizard and raw-as-default for guided mode 2026-06-27 12:10:21 +02:00
note_editor_test.dart Rework guided mode from Stepper to full-screen per-step view 2026-06-27 12:15:19 +02:00
note_repository_test.dart Make the app compile and run for web, behind platform seams 2026-07-20 13:14:03 +02:00
note_template_test.dart Add full note view/editor with templates and Markdown render 2026-06-15 21:59:31 +02:00
note_test.dart Add list filters/sort, status, priority rework, export/import, structured template 2026-06-15 16:52:59 +02:00
notes_list_screen_test.dart Add full note view/editor with templates and Markdown render 2026-06-15 21:59:31 +02:00
notes_markdown_test.dart Add list filters/sort, status, priority rework, export/import, structured template 2026-06-15 16:52:59 +02:00
settings_screen_test.dart Add the desktop wrapper, and stop the test suite eating BACKLOG.md 2026-07-20 13:33:25 +02:00
sync_service_test.dart Surface sync outcomes so devices can't silently diverge 2026-07-16 17:58:41 +02:00
sync_settings_test.dart Point notes sync at the consolidated syncs monorepo 2026-07-10 14:04:05 +02:00
wrapper_server_test.dart Add the desktop wrapper, and stop the test suite eating BACKLOG.md 2026-07-20 13:33:25 +02:00