[repro] synced data not appearing in derived collection during pending optimistic mutation (issue #1017)#1166
Open
claude[bot] wants to merge 1 commit intomainfrom
Open
[repro] synced data not appearing in derived collection during pending optimistic mutation (issue #1017)#1166claude[bot] wants to merge 1 commit intomainfrom
claude[bot] wants to merge 1 commit intomainfrom
Conversation
… optimistic mutation (issue #1017) Adds a test that reproduces the bug where synced data from a source collection does not appear in a derived (live query) collection while there is a pending optimistic mutation. The test: 1. Creates a source collection with controllable sync 2. Creates a derived collection via createLiveQueryCollection 3. Uses createOptimisticAction to insert an item (mutation stays pending) 4. Syncs a new item into the source collection while mutation is pending 5. Asserts that both items should be visible in the derived collection Currently failing because synced data is invisible while optimistic mutations are pending. Co-Authored-By: Claude <noreply@anthropic.com>
|
More templates
@tanstack/angular-db
@tanstack/db
@tanstack/db-ivm
@tanstack/electric-db-collection
@tanstack/offline-transactions
@tanstack/powersync-db-collection
@tanstack/query-db-collection
@tanstack/react-db
@tanstack/rxdb-db-collection
@tanstack/solid-db
@tanstack/svelte-db
@tanstack/trailbase-db-collection
@tanstack/vue-db
commit: |
Contributor
|
Size Change: 0 B Total Size: 90.8 kB ℹ️ View Unchanged
|
Contributor
|
Size Change: 0 B Total Size: 3.7 kB ℹ️ View Unchanged
|
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.
Summary
Adds a reproduction test for issue #1017: Synced data does not appear in a derived (live query) collection while there is a pending optimistic mutation on that derived collection.
What the test asserts
The test validates that synced data from a source collection should appear in derived collections immediately, regardless of whether there are pending optimistic mutations.
Test flow:
createLiveQueryCollection(simple passthrough)createOptimisticActionto insert an item with a pending mutationHow to run
Observed failure
The synced item (
synced-1) is invisible in the derived collection while the optimistic mutation is pending, confirming the bug.Related
Fixes #1017