todo-app/lib
Krzysztof kuhy Rudnicki 85ba556af2
Some checks are pending
release-apk / release (APK) (push) Waiting to run
Sync on a Firebase-only device, and say why loadAccount failed
Fleet audit for the bugs found on diet-guard's desktop; two were live here.

`_autoSync` and the manual `_sync` both gated on `settings.isConfigured`,
which means "has a GitHub token". A device connected only to Firebase would
therefore never sync and would be told to "Add a GitHub token" -- advice that
is wrong now and will be wrong for every device once the mirror retires. Both
accept either backend, and the prompt names Firebase first.

This only escaped notice because this machine happens to hold a GitHub token;
diet-guard's desktop, which does not, never synced at all.

`loadAccount()` also swallowed its exception whole, hiding why a device could
not read its stored account -- indistinguishable from "no account set", and
the single most useful diagnostic when provisioning fails. It now logs at
error level with the stack trace and still returns null, so the settings
screen behaves exactly as before.

The unconfigured-Sync test now asserts the routing (unconfigured -> settings)
rather than one snackbar phrasing, which is the behaviour that actually
matters and does not break on wording.

256 tests, analyzer clean.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0177xwzcpfpWG2qca8Mr39q9
2026-08-09 22:29:03 +02:00
..
data Default a bare-link draft to the freeform template 2026-07-26 22:13:26 +02:00
desktop Make the sync-account route testable, and cover every branch 2026-08-09 21:49:16 +02:00
sync Sync on a Firebase-only device, and say why loadAccount failed 2026-08-09 22:29:03 +02:00
ui Sync on a Firebase-only device, and say why loadAccount failed 2026-08-09 22:29:03 +02:00
frame_stats_io.dart Cut the llm-design-spec template from 12 sections to 7 2026-07-26 22:03:35 +02:00
frame_stats_web.dart Cut the llm-design-spec template from 12 sections to 7 2026-07-26 22:03:35 +02:00
frame_stats.dart Make the app compile and run for web, behind platform seams 2026-07-20 13:14:03 +02:00
main.dart warm-tint the unified-design-system palette, fix design audit violations 2026-07-22 18:56:45 +02:00