diet-guard/app/lib/services
Krzysztof kuhy Rudnicki 1328bece05
Some checks are pending
pre-commit / pre-commit (push) Waiting to run
Tests / test (3.10) (push) Waiting to run
Tests / test (3.11) (push) Waiting to run
Tests / test (3.12) (push) Waiting to run
release-apk / release (APK) (push) Waiting to run
Use the platform sync device id for HLC stamps, not a hardcoded 'phone'
sync_merge.dart declared its own `const _syncDeviceId = 'phone'`, which was
unconditional -- so the desktop web build wrote records under
`diet-guard-sync/devices/desktop/` while every HLC string inside them ended
in `-phone`. The path segment came from the conditional-export constant, the
HLC did not.

Import `syncDeviceId` from github_client_factory.dart instead, so both halves
come from the same source: 'phone' on Android, 'desktop' on web, matching the
Python side's 'pc' in _constants.py.

Preventive, not a repair: there is no devices/desktop/ in the live RTDB yet,
so no already-written record has the mismatch. HLC tie-break is
nodeId.compareTo, so desktop stamps now sort below phone's rather than tying;
entryHlc is deterministic from entry.time and the bodies are identical for a
given entry id, so this changes which identical copy wins, never what data
survives.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GZH89WEqAjuJT8WZdqc7AP
2026-08-09 16:41:53 +02:00
..
app_settings_service.dart Remove unused features; fix reminder false alarms; share all state 2026-07-26 16:39:52 +02:00
average_service.dart Step Dart dates by the calendar, not by 24 hours 2026-08-09 15:06:41 +02:00
background_check_service.dart app: run the companion app's desktop target as a web build 2026-07-20 16:31:32 +02:00
background_sync_service.dart Sync meals and the food bank through Firebase, mirroring to GitHub 2026-08-05 08:35:21 +02:00
background_tasks_io.dart app: run the companion app's desktop target as a web build 2026-07-20 16:31:32 +02:00
background_tasks_web.dart app: run the companion app's desktop target as a web build 2026-07-20 16:31:32 +02:00
background_tasks.dart app: run the companion app's desktop target as a web build 2026-07-20 16:31:32 +02:00
budget_history_service.dart Remove unused features; fix reminder false alarms; share all state 2026-07-26 16:39:52 +02:00
budget_schedule.dart Remove unused features; fix reminder false alarms; share all state 2026-07-26 16:39:52 +02:00
day_status_service.dart Step Dart dates by the calendar, not by 24 hours 2026-08-09 15:06:41 +02:00
desktop_wrapper.dart Remove unused features; fix reminder false alarms; share all state 2026-07-26 16:39:52 +02:00
document_store_factory.dart app: run the companion app's desktop target as a web build 2026-07-20 16:31:32 +02:00
document_store_indexeddb.dart app: test the IndexedDB stores instead of shipping them unverified 2026-07-20 16:56:15 +02:00
document_store_io.dart app: run the companion app's desktop target as a web build 2026-07-20 16:31:32 +02:00
document_store_web.dart app: test the IndexedDB stores instead of shipping them unverified 2026-07-20 16:56:15 +02:00
document_store.dart app: run the companion app's desktop target as a web build 2026-07-20 16:31:32 +02:00
due_slot_check.dart Remove unused features; fix reminder false alarms; share all state 2026-07-26 16:39:52 +02:00
firebase_backend.dart Sync meals and the food bank through Firebase, mirroring to GitHub 2026-08-05 08:35:21 +02:00
foodbank_service.dart Remove unused features; fix reminder false alarms; share all state 2026-07-26 16:39:52 +02:00
frame_stats.dart app: package the desktop app as the web build, and delete the Linux embedder 2026-07-20 16:32:24 +02:00
fuzzy.dart Add Flutter companion app skeleton with local meal logging 2026-06-22 18:22:42 +02:00
github_client_factory_io.dart app: run the companion app's desktop target as a web build 2026-07-20 16:31:32 +02:00
github_client_factory_web.dart app: run the companion app's desktop target as a web build 2026-07-20 16:31:32 +02:00
github_client_factory.dart app: run the companion app's desktop target as a web build 2026-07-20 16:31:32 +02:00
github_device_auth.dart app: run the companion app's desktop target as a web build 2026-07-20 16:31:32 +02:00
log_storage_service.dart Remove unused features; fix reminder false alarms; share all state 2026-07-26 16:39:52 +02:00
notification_backend_factory.dart app: run the companion app's desktop target as a web build 2026-07-20 16:31:32 +02:00
notification_backend_io.dart app: run the companion app's desktop target as a web build 2026-07-20 16:31:32 +02:00
notification_backend_web.dart app: run the companion app's desktop target as a web build 2026-07-20 16:31:32 +02:00
notification_backend.dart app: run the companion app's desktop target as a web build 2026-07-20 16:31:32 +02:00
notification_service.dart app: run the companion app's desktop target as a web build 2026-07-20 16:31:32 +02:00
sync_merge.dart Use the platform sync device id for HLC stamps, not a hardcoded 'phone' 2026-08-09 16:41:53 +02:00
sync_service.dart Sync meals and the food bank through Firebase, mirroring to GitHub 2026-08-05 08:35:21 +02:00
sync_settings.dart app: run the companion app's desktop target as a web build 2026-07-20 16:31:32 +02:00
sync_state_factory_io.dart Sync meals and the food bank through Firebase, mirroring to GitHub 2026-08-05 08:35:21 +02:00
sync_state_factory_web.dart Sync meals and the food bank through Firebase, mirroring to GitHub 2026-08-05 08:35:21 +02:00
sync_state_factory.dart Sync meals and the food bank through Firebase, mirroring to GitHub 2026-08-05 08:35:21 +02:00
token_vault_factory.dart app: run the companion app's desktop target as a web build 2026-07-20 16:31:32 +02:00
token_vault_io.dart app: run the companion app's desktop target as a web build 2026-07-20 16:31:32 +02:00
token_vault_web.dart app: run the companion app's desktop target as a web build 2026-07-20 16:31:32 +02:00
token_vault.dart app: run the companion app's desktop target as a web build 2026-07-20 16:31:32 +02:00