Skip to content

Sync progress #555

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from
Draft

Sync progress #555

wants to merge 10 commits into from

Conversation

simolus3
Copy link
Contributor

@simolus3 simolus3 commented Apr 2, 2025

This implements the sync progress API for the JavaScript SDKs. This is currently work in progress as it's waiting for the releevant core extensions to be released.

The overall API is very similar to the one exposed by the other SDKs:

  1. SyncDataFlowStatus, which needs to be transferrable from workers, adds a new InternalProgressInformation field tracking progress across different buckets. Users are encouraged not to use that directly though.
  2. Instead, a new downloadProgress getter is added to SyncStatus with the same interface we expose for Dart and Kotlin: An untilCompletion getter and a untilPriority(priority) method. They both return a structure making the total and downloaded operations available (as well as a relative progress indicator).

I've added unit tests for this through the Node SDK, because that's easier to test with a local core extension build than the Web / RN SDKs that need subsequent builds. I think we should eventually share tests between the SDKs to be sure we're not missing anything, but I think this already points towards the implementation working :)

Copy link

changeset-bot bot commented Apr 2, 2025

🦋 Changeset detected

Latest commit: 6a3e3c2

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

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.

1 participant