Skip to content

fix(client): report telemetry ping on background sync and synchronize syncing status in UI - #123

Open
markusbrand wants to merge 1 commit into
masterfrom
fix/client-background-sync-ping-and-status-sync
Open

markusbrand wants to merge 1 commit into
masterfrom
fix/client-background-sync-ping-and-status-sync

Conversation

@markusbrand

Copy link
Copy Markdown
Owner

Summary

  • Background Sync Telemetry Ping: In client-tauri/src-tauri/src/lib.rs, spawn_background_sync_loop executed periodic synchronization in the background but omitted calling client.client_ping(Some(sync_ok), Some(last_sync_at)). As a result, the server's operator diagnostics (GET /api/admin/clients) remained permanently stale for unattended clients. This fix invokes client_ping with best-effort error logging upon completing each background sync pass, matching manual run_sync.
  • Desktop Settings UI Active Sync State: In client-tauri/src/Settings.tsx, the sync-status event listener and initial get_sync_status call on mount only checked for terminal states ("synced", "error", "warning"), ignoring "syncing". Consequently, during background sync the UI remained in the idle state, did not poll progress, and allowed duplicate sync triggers that returned a confusing warning (Sync already in progress). This fix transitions the UI to syncing: true when status === "syncing", clearing previous error/warning banners.
  • OpenSpec Artifacts: Change fix-client-background-sync-ping-and-status-sync created with proposal.md, specs/desktop-client/spec.md (delta requirements), design.md, and tasks.md.

Verification

  • client-tauri/src-tauri: cargo test (all 21 unit tests passed)
  • client-tauri: npm run build (TypeScript compilation and Vite build succeeded)
  • web: npm run build (passed)
  • openspec validate fix-client-background-sync-ping-and-status-sync (passed)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant