Repository navigation
fix(sync-report): the last background sync reports how it ended - #1644
Closed
juanky201271 wants to merge 1 commit into
Closed
juanky201271 wants to merge 1 commit into
juanky201271 wants to merge 1 commit into
Conversation
The card took its state from the error field alone, so a sync the system killed, one cancelled by the app in the foreground, one skipped offline and one that failed without error text all showed a green Finished OK. The outcome now comes from the file the native task writes: failed on an error or a KO message, interrupted without an end time, skipped on the offline message, ok otherwise. Reporting an error no longer clears it, so the user can report it again; the setter and the file writer that served that are gone. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Contributor
Author
|
Moved into #1643. |
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.
Problem
The last-background-sync card on the sync report took its state from the
errorfield alone. Anything without one showed a green check and Finished OK, including:dateEnd= 0, message "Starting OK.")error)Tapping View/Report Error also cleared the error and rewrote
background.json, so the card flipped to green after one report.Change
backgroundOutcomeinsyncModel.tsderives one ofok | skipped | failed | interruptedfrom the file the native task writes:failedon anerroror a message ending in "KO.",interruptedwhen there is no end time,skippedon the offline message,okotherwise.setBackgroundSyncErrorInfoandBackgroundFileImpl.writeBackgroundhad no other caller and are removed; only the native task writes the file now.sync.*keys in the five languages.Tests
Five unit cases on
backgroundOutcome, one per outcome plus the KO-without-error one. The screen snapshot is unchanged.🤖 Generated with Claude Code