Sync progress status#260
Merged
Merged
Conversation
rkistner
reviewed
Mar 25, 2025
Contributor
rkistner
left a comment
There was a problem hiding this comment.
I'm happy with the overall structure & apis - just added some implementation comments.
rkistner
reviewed
Apr 24, 2025
Contributor
rkistner
left a comment
There was a problem hiding this comment.
I didn't check the details of the sync status refactoring, but I'm happy with the overall approach.
rkistner
approved these changes
May 5, 2025
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.
This extends
SyncStatusto report download progress as it happens. Progress is reported as a(completed, total, fraction)triple (wherefraction = completed / total) and available:db.currentStatus.downloadProgress.untilCompletion.db.currentStatus.downloadProgress.untilPriority(myPrio).The best way to get a look and feel for the API may be to look at this example usage:
powersync.dart/demos/supabase-todolist/lib/widgets/guard_by_sync.dart
Lines 26 to 53 in 9d45ba3
In an actual app, it looks like this:
Bildschirmaufnahme.2025-03-31.um.13.27.20.mov
There is some delay in the
sync_localcommit not included in the progress bar now, but the amount of operations is updated as it should be.