Repository navigation
fix(client): report telemetry ping on background sync and synchronize syncing status in UI - #123
Open
markusbrand wants to merge 1 commit into
Open
markusbrand wants to merge 1 commit into
markusbrand wants to merge 1 commit into
Conversation
… syncing status in UI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
client-tauri/src-tauri/src/lib.rs,spawn_background_sync_loopexecuted periodic synchronization in the background but omitted callingclient.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 invokesclient_pingwith best-effort error logging upon completing each background sync pass, matching manualrun_sync.client-tauri/src/Settings.tsx, thesync-statusevent listener and initialget_sync_statuscall 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 tosyncing: truewhenstatus === "syncing", clearing previous error/warning banners.fix-client-background-sync-ping-and-status-synccreated withproposal.md,specs/desktop-client/spec.md(delta requirements),design.md, andtasks.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)