Skip to content

Conversation

@marbemac
Copy link
Contributor

🎯 Changes

So related to the whole longer lived editing session concept, running into delete and the insert issue on pending mutation. Basically if user deletes something in our editor, we tx.mutate and delete the record. Then if the user cmd+z to undo in our editor, we reverse the operation and insert the record that was just deleted (on same tx, it has not been committed yet).

This pattern results in the Uncaught Error: Unhandled mutation combination: delete-insert error.

This PR adds handling for delete-insert pattern.

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested this code locally with pnpm test:pr.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).

Signed-off-by: Marc MacLeod <marbemac+gh@gmail.com>
@changeset-bot
Copy link

changeset-bot bot commented Dec 23, 2025

🦋 Changeset detected

Latest commit: 50b09dc

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

This PR includes changesets to release 12 packages
Name Type
@tanstack/db Patch
@tanstack/angular-db Patch
@tanstack/electric-db-collection Patch
@tanstack/offline-transactions Patch
@tanstack/powersync-db-collection Patch
@tanstack/query-db-collection Patch
@tanstack/react-db Patch
@tanstack/rxdb-db-collection Patch
@tanstack/solid-db Patch
@tanstack/svelte-db Patch
@tanstack/trailbase-db-collection Patch
@tanstack/vue-db Patch

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

@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 23, 2025

More templates

@tanstack/angular-db

npm i https://pkg.pr.new/@tanstack/angular-db@1068

@tanstack/db

npm i https://pkg.pr.new/@tanstack/db@1068

@tanstack/db-ivm

npm i https://pkg.pr.new/@tanstack/db-ivm@1068

@tanstack/electric-db-collection

npm i https://pkg.pr.new/@tanstack/electric-db-collection@1068

@tanstack/offline-transactions

npm i https://pkg.pr.new/@tanstack/offline-transactions@1068

@tanstack/powersync-db-collection

npm i https://pkg.pr.new/@tanstack/powersync-db-collection@1068

@tanstack/query-db-collection

npm i https://pkg.pr.new/@tanstack/query-db-collection@1068

@tanstack/react-db

npm i https://pkg.pr.new/@tanstack/react-db@1068

@tanstack/rxdb-db-collection

npm i https://pkg.pr.new/@tanstack/rxdb-db-collection@1068

@tanstack/solid-db

npm i https://pkg.pr.new/@tanstack/solid-db@1068

@tanstack/svelte-db

npm i https://pkg.pr.new/@tanstack/svelte-db@1068

@tanstack/trailbase-db-collection

npm i https://pkg.pr.new/@tanstack/trailbase-db-collection@1068

@tanstack/vue-db

npm i https://pkg.pr.new/@tanstack/vue-db@1068

commit: 50b09dc

@marbemac
Copy link
Contributor Author

Tests failing with:

error Dependency @tanstack/query-db-collection has multiple versions defined in the workspace. multiple-dependency-versions

error Dependency @tanstack/react-db has multiple versions defined in the workspace. multiple-dependency-versions

But only in CI - works on my local machine. Let me know if there's something I should do to resolve them!

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