Sync Behavior
This page describes how website and device exchange config and app policy state.
Config Read Path (Website)
- Read cached config first.
- If cache is fresh (<2 minutes), reuse cache.
- Otherwise call
getDeviceConfig. - Parse
entries[]into typed dashboard config. - If
deviceUpdatedis true, acknowledge it by writingdeviceUpdated=false.
Apps Read Path (Website)
- Read cached apps first.
- Call
getDeviceAppsUpdatedTime. - Refetch
listDeviceAppsonly when timestamp changed or cache missing. - Normalize app fields (
jumpOut,timePolicy,timeControlled,managed).
Save Path (Website)
- Build changed config entries only.
- Write via
saveDeviceConfig. - Build changed app rows and write via
saveDeviceApps. - Optional legacy offline flags sync (
syncMasterOfflineFlagsDirectus) when changed.
Device Apply Path (Android)
ConfigPollerapplies changed keys based on newest entry timestamp.- Policy groups apply in sequence: system, apps, accessibility, kiosk, network, settings, updates, approval, lockout.
- Time enforcement reconciles foreground service start/stop via
TimeManagementService.reconcile().
Common Stale-State Causes
- Cache not invalidated after tab change.
- Device offline while cloud write succeeds.
- App list timestamp unchanged while operator expects new scan data.
