Sync with WorkManager
Queued writes have to survive process death
refresh() covers pulling data down. The other direction β a walk log the walker recorded while offline, still waiting to reach the server β is riskier: if that pending write only lives in memory (a coroutine, a viewModelScope.launch), the OS can kill the process before it ever sends, and the write is gone. WorkManager persists queued work to disk, so it survives process death, a reboot, even the app being force-closed β it resumes the work next time constraints are met.
Constraints(NetworkType.CONNECTED) tells WorkManager not to even attempt the work until the device has a network connection β no point burning a retry against a phone in airplane mode. BackoffPolicy.EXPONENTIAL controls what happens between retries after a failure: each retry waits roughly double the previous delay, so a flaky connection doesn't hammer the server (or the battery) with retries every few seconds.