Skip to content

fix/client: correctly parse SyncStatus::Error payload from Tauri event#26

Merged
ClemPera merged 2 commits intomainfrom
fix/client-sync-error-status
Apr 14, 2026
Merged

fix/client: correctly parse SyncStatus::Error payload from Tauri event#26
ClemPera merged 2 commits intomainfrom
fix/client-sync-error-status

Conversation

@ClemPera
Copy link
Copy Markdown
Owner

SyncStatus::Error(String) serializes as {"Error": "..."} in JSON via serde's default enum representation. The frontend was assigning this object directly to the store, causing SYNC_LABEL lookup to return undefined and the status to render as blank.

  • Normalize the payload in the sync-status listener, extracting the variant name and error message separately
  • Store syncErrorMessage in the general store (optional arg on setSyncStatus)
  • Update tests to cover the error message round-trip

SyncStatus::Error(String) serializes as {"Error": "..."}  in JSON via serde's
default enum representation. The frontend was assigning this object directly to
the store, causing SYNC_LABEL lookup to return undefined and the status to render
as blank.

- Normalize the payload in the sync-status listener, extracting the variant name
  and error message separately
- Store syncErrorMessage in the general store (optional arg on setSyncStatus)
- Update tests to cover the error message round-trip
Comment thread notto-client/src/components/account/AccountMenu.tsx Outdated
The message was already logged by the backend. Sending it to the frontend
had no good use: displaying it would spam on every sync cycle, and logging
it on the frontend is redundant.

Error is now a unit variant, serializing as the plain string "Error" like
the other variants. This also removes the payload normalization workaround
added in the previous commit.
@ClemPera ClemPera merged commit 57b0fc5 into main Apr 14, 2026
6 checks passed
@ClemPera ClemPera deleted the fix/client-sync-error-status branch April 14, 2026 13:01
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.

2 participants