| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Hi! I'm the It looks like you correctly set up a CI job that uses the autofix.ci GitHub Action, but the autofix.ci GitHub App has not been installed for this repository. This means that autofix.ci unfortunately does not have the permissions to fix this pull request. If you are the repository owner, please install the app and then restart the CI workflow! 😃 |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This PR is an experiment to investigate dropping the optimistic state after TanStackDB collection mutations have been applied to the backend database and synced back to clients via PowerSync (and then back to the TanStackDB collection).
For context: The current integration works in an offline-first mode. Where optimistic state is resolved once mutations have reflected in the PowerSync SQLite DB.
This adds a new mode to the PowerSyncTransactor which handles TanStackDB collection mutations.
The logic here is achieved by tapping in to the PowerSyncDatabase Write Checkpoint targeting and application state. This is currently achieved by spying on the internal ps_buckets state with temporary SQLite triggers. The checkpoint observer implementation here is LAZY and cuts many corners for the sake of experimentation. In an ideal world, this would use the requestCheckpoint logic from https://github.com/orgs/powersync-ja/discussions/324. The CheckpointObserver is also currently probably over-engineered, we might be able to use a simple watched query on ps_buckets for this functionality - the method here was eager to avoid missing any potential state changes.
A large portion of this PR was assisted by Codex GPT 5.5