Problem
The tray Settings → Sync indicator reports the device as disconnected / sync as not working, but the device is in fact paired and actively pushing events to the server. The component's state is derived from a stale or wrong signal — either polling a stale local config flag instead of the live /devices row, or the heartbeat-evaluation cadence is mis-keyed.
Approach
Fix the state derivation to use canonical server-side signals.
Repro:
- Pair a device, confirm events are landing server-side (check
/v1/me/events or the audit log).
- Open Settings → Sync.
- Observe the indicator showing "not connected" / "sync off" / red status despite events flowing.
Fix should:
- Compare against the canonical signal (server-side
devices.last_seen_at recency + devices.sync_enabled), not a local cached flag.
- Update on the same 10s tick the rest of the Status pane uses.
- Add an integration test that pins the false-positive case (paired + recent heartbeat +
cfg.sync_with_cloud=true → indicator should be green).
Acceptance criteria
Risks / Open questions
- 10s tick may be too coarse for snappy feedback after a manual pair → would need lower tick + ratelimit
- Timezone / clock-skew between tray and server when comparing
last_seen_at recency
- What threshold counts as "recent enough" for last_seen_at — needs a single project-wide constant, not a magic number per call site
Original draft notes
Bug. The Settings pane's sync-status indicator reports the device as disconnected / sync as not working, but the device is in fact paired and actively pushing events to the server. The component's state appears to be derived from a stale or wrong signal — either it's polling a stale local config flag rather than the live /devices row, or the heartbeat-evaluation cadence is mis-keyed.
Repro:
- Pair a device, confirm events are landing server-side (check
/v1/me/events or the audit log).
- Open Settings → Sync.
- Observe the indicator showing "not connected" / "sync off" / red status despite events flowing.
Fix should:
- Compare against the canonical signal (server-side
devices.last_seen_at recency + devices.sync_enabled), not a local cached flag.
- Update on the same 10s tick the rest of the Status pane uses.
- Probably worth an integration test that pins the false-positive case (paired + recent heartbeat + cfg.sync_with_cloud=true → indicator should be green).
Tracking
Problem
The tray Settings → Sync indicator reports the device as disconnected / sync as not working, but the device is in fact paired and actively pushing events to the server. The component's state is derived from a stale or wrong signal — either polling a stale local config flag instead of the live
/devicesrow, or the heartbeat-evaluation cadence is mis-keyed.Approach
Fix the state derivation to use canonical server-side signals.
Repro:
/v1/me/eventsor the audit log).Fix should:
devices.last_seen_atrecency +devices.sync_enabled), not a local cached flag.cfg.sync_with_cloud=true→ indicator should be green).Acceptance criteria
devices.last_seen_at+devices.sync_enabledRisks / Open questions
last_seen_atrecencyOriginal draft notes
Bug. The Settings pane's sync-status indicator reports the device as disconnected / sync as not working, but the device is in fact paired and actively pushing events to the server. The component's state appears to be derived from a stale or wrong signal — either it's polling a stale local config flag rather than the live
/devicesrow, or the heartbeat-evaluation cadence is mis-keyed.Repro:
/v1/me/eventsor the audit log).Fix should:
devices.last_seen_atrecency +devices.sync_enabled), not a local cached flag.Tracking
fix-tray-settings-sync-status-false-not-connected-while-device-is-activelyeta_band: tbd (set on the Project board when scoping firms up)channel/<name>labels when targeting firms up.