fix(sync): keep retry usable and show partial sync results - #123
Open
mfagundez-4geeks wants to merge 1 commit into
Open
fix(sync): keep retry usable and show partial sync results#123mfagundez-4geeks wants to merge 1 commit into
mfagundez-4geeks wants to merge 1 commit into
Conversation
Three problems around a failed synchronization: - When /accept was rejected the store forced the notification back to "pending" locally while the server kept it in another state, so the card looked retryable when it was not. It now reloads the real state from the server instead of guessing it. - The AI generation consumable was spent before calling /accept, so every rejected retry burned one. It is now spent only after the server accepted the sync. - A 409 (a sync already running) is told apart from an actual failure and gets its own message, which needs the API helper to carry the HTTP status and error code. The card also understands the new "partial" status: it stays actionable with a Retry button, and it reports which languages failed instead of always blaming a timeout.
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.
Problems
/accept, the store forced the notification back topendinglocally while the server held another state, so the card looked retryable when it was not./accept, so every rejected retry burned one.Fix
409(sync already running) its own message.partialstatus: the card stays actionable and names the languages that failed.Files
store.tsx,syncNotifications.ts,storeTypes.ts,SyncNotificationCard.tsx,locales/{en,es}.json