Observed on v0.14.2b2 (POCO F8 Ultra), Sync Settings after a successful sync:
Last Sync succeeded at 13:00 … pulled 0, pushed 1
Found 0 remote db files to pull from /storage/emulated/0/Android/data/net.activitywatch.android/files/sync/poco_f8_ultra
Zero peers in a configured sync dir is usually a layout or setup problem, not a no-op.
[own-staging 2-level] …/files/sync/poco_f8_ultra/41662…/test.db 299.2 MB not pulled: own device_id, excluded from pull
syncBoth does call pull_all (correct, 3-level list_remote_dbs), but copySyncFilesToSafDir only mirrors internal → SAF. Nothing ever copies other hosts' {hostname}/{device_id}/test.db from the Syncthing folder into the app-private dir, so the only thing under the internal root is our own staging and pull is guaranteed to find zero peers. The #687 warning then tells the user their setup is broken when it is working as designed for push.
Two things:
- Decide whether Android pulls at all. If yes, peers have to be read from the SAF tree (either an inbound mirror of
{other-host}/… folders before the pull, or pull_all reading peer dbs via SAF-backed copies). If no for now, the Sync Settings text should say "push-only on Android" instead of the layout-problem warning.
- The root in that message is
…/files/sync/poco_f8_ultra, and the own staging is classified as 2-level under it — but resolveSyncDirectory sets AW_SYNC_DIR to …/files/sync, and the push lands at …/files/sync/poco_f8_ultra/<device_id>/test.db (3-level from that root). Worth checking what dirs::get_sync_dir() resolves to on Android vs the env var; if the pull root really is the hostname folder, pull could never work even with an inbound mirror.
Related desktop-side bug found in the same session: ActivityWatch/aw-server-rust#711 (resume cursor duplicates the boundary event; the phone's staging stopwatch bucket already holds 285 copies of one event).
cc @TimeToBuildBob
Observed on v0.14.2b2 (POCO F8 Ultra), Sync Settings after a successful sync:
syncBothdoes callpull_all(correct, 3-levellist_remote_dbs), butcopySyncFilesToSafDironly mirrors internal → SAF. Nothing ever copies other hosts'{hostname}/{device_id}/test.dbfrom the Syncthing folder into the app-private dir, so the only thing under the internal root is our own staging and pull is guaranteed to find zero peers. The #687 warning then tells the user their setup is broken when it is working as designed for push.Two things:
{other-host}/…folders before the pull, orpull_allreading peer dbs via SAF-backed copies). If no for now, the Sync Settings text should say "push-only on Android" instead of the layout-problem warning.…/files/sync/poco_f8_ultra, and the own staging is classified as 2-level under it — butresolveSyncDirectorysetsAW_SYNC_DIRto…/files/sync, and the push lands at…/files/sync/poco_f8_ultra/<device_id>/test.db(3-level from that root). Worth checking whatdirs::get_sync_dir()resolves to on Android vs the env var; if the pull root really is the hostname folder, pull could never work even with an inbound mirror.Related desktop-side bug found in the same session: ActivityWatch/aw-server-rust#711 (resume cursor duplicates the boundary event; the phone's staging stopwatch bucket already holds 285 copies of one event).
cc @TimeToBuildBob