diff --git a/.changeset/khaki-ties-shout.md b/.changeset/khaki-ties-shout.md deleted file mode 100644 index a0a8569b6..000000000 --- a/.changeset/khaki-ties-shout.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -"@tanstack/svelte-db": patch ---- - -Add Svelte support - -Usage example: - -```svelte - - - - -``` diff --git a/.changeset/open-zebras-remain.md b/.changeset/open-zebras-remain.md deleted file mode 100644 index 9a3ac2434..000000000 --- a/.changeset/open-zebras-remain.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -"@tanstack/db": patch ---- - -Fix UI responsiveness issue with rapid user interactions in collections - -Fixed a critical issue where rapid user interactions (like clicking multiple checkboxes quickly) would cause the UI to become unresponsive when using collections with slow backend responses. The problem occurred when optimistic updates would back up and the UI would stop reflecting user actions. - -**Root Causes:** - -- Event filtering logic was blocking ALL events for keys with recent sync operations, including user-initiated actions -- Event batching was queuing user actions instead of immediately updating the UI during high-frequency operations - -**Solution:** - -- Added `triggeredByUserAction` parameter to `recomputeOptimisticState()` to distinguish user actions from sync operations -- Modified event filtering to allow user-initiated actions to bypass sync status checks -- Enhanced `emitEvents()` with `forceEmit` parameter to skip batching for immediate user action feedback -- Updated all user action code paths to properly identify themselves as user-triggered - -This ensures the UI remains responsive during rapid user interactions while maintaining the performance benefits of event batching and duplicate event filtering for sync operations. diff --git a/examples/react/todo/CHANGELOG.md b/examples/react/todo/CHANGELOG.md index d9a840e6e..91b2fda7f 100644 --- a/examples/react/todo/CHANGELOG.md +++ b/examples/react/todo/CHANGELOG.md @@ -1,5 +1,15 @@ # examples/react/todo +## 0.0.37 + +### Patch Changes + +- Updated dependencies []: + - @tanstack/electric-db-collection@0.0.13 + - @tanstack/query-db-collection@0.0.13 + - @tanstack/react-db@0.0.31 + - @tanstack/trailbase-db-collection@0.0.7 + ## 0.0.36 ### Patch Changes diff --git a/examples/react/todo/package.json b/examples/react/todo/package.json index 8fdd98514..0a1609a71 100644 --- a/examples/react/todo/package.json +++ b/examples/react/todo/package.json @@ -1,15 +1,15 @@ { "name": "@tanstack/db-example-react-todo", "private": true, - "version": "0.0.36", + "version": "0.0.37", "dependencies": { - "@tanstack/electric-db-collection": "^0.0.12", + "@tanstack/electric-db-collection": "^0.0.13", "@tanstack/query-core": "^5.75.7", - "@tanstack/query-db-collection": "^0.0.12", - "@tanstack/react-db": "^0.0.30", + "@tanstack/query-db-collection": "^0.0.13", + "@tanstack/react-db": "^0.0.31", "@tanstack/react-router": "^1.125.6", "@tanstack/react-start": "^1.126.1", - "@tanstack/trailbase-db-collection": "^0.0.6", + "@tanstack/trailbase-db-collection": "^0.0.7", "cors": "^2.8.5", "drizzle-orm": "^0.40.1", "drizzle-zod": "^0.7.0", diff --git a/packages/db/CHANGELOG.md b/packages/db/CHANGELOG.md index 3535e0a6e..23e0251f1 100644 --- a/packages/db/CHANGELOG.md +++ b/packages/db/CHANGELOG.md @@ -1,5 +1,27 @@ # @tanstack/db +## 0.0.31 + +### Patch Changes + +- Fix UI responsiveness issue with rapid user interactions in collections ([#308](https://github.com/TanStack/db/pull/308)) + + Fixed a critical issue where rapid user interactions (like clicking multiple checkboxes quickly) would cause the UI to become unresponsive when using collections with slow backend responses. The problem occurred when optimistic updates would back up and the UI would stop reflecting user actions. + + **Root Causes:** + + - Event filtering logic was blocking ALL events for keys with recent sync operations, including user-initiated actions + - Event batching was queuing user actions instead of immediately updating the UI during high-frequency operations + + **Solution:** + + - Added `triggeredByUserAction` parameter to `recomputeOptimisticState()` to distinguish user actions from sync operations + - Modified event filtering to allow user-initiated actions to bypass sync status checks + - Enhanced `emitEvents()` with `forceEmit` parameter to skip batching for immediate user action feedback + - Updated all user action code paths to properly identify themselves as user-triggered + + This ensures the UI remains responsive during rapid user interactions while maintaining the performance benefits of event batching and duplicate event filtering for sync operations. + ## 0.0.30 ### Patch Changes diff --git a/packages/db/package.json b/packages/db/package.json index 1d8398d7f..266466d3f 100644 --- a/packages/db/package.json +++ b/packages/db/package.json @@ -1,7 +1,7 @@ { "name": "@tanstack/db", "description": "A reactive client store for building super fast apps on sync", - "version": "0.0.30", + "version": "0.0.31", "dependencies": { "@electric-sql/d2mini": "^0.1.7", "@standard-schema/spec": "^1.0.0" diff --git a/packages/electric-db-collection/CHANGELOG.md b/packages/electric-db-collection/CHANGELOG.md index 35ee7c726..7332c0bbb 100644 --- a/packages/electric-db-collection/CHANGELOG.md +++ b/packages/electric-db-collection/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/electric-db-collection +## 0.0.13 + +### Patch Changes + +- Updated dependencies [[`3e9a36d`](https://github.com/TanStack/db/commit/3e9a36d2600c4f700ca7bc4f720c189a5a29387a)]: + - @tanstack/db@0.0.31 + ## 0.0.12 ### Patch Changes diff --git a/packages/electric-db-collection/package.json b/packages/electric-db-collection/package.json index d51c0cc43..808f560f7 100644 --- a/packages/electric-db-collection/package.json +++ b/packages/electric-db-collection/package.json @@ -1,7 +1,7 @@ { "name": "@tanstack/electric-db-collection", "description": "Electric SQL collection for TanStack DB", - "version": "0.0.12", + "version": "0.0.13", "dependencies": { "@electric-sql/client": "1.0.0", "@standard-schema/spec": "^1.0.0", diff --git a/packages/query-db-collection/CHANGELOG.md b/packages/query-db-collection/CHANGELOG.md index 0e3b82931..00b4a3f87 100644 --- a/packages/query-db-collection/CHANGELOG.md +++ b/packages/query-db-collection/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/query-db-collection +## 0.0.13 + +### Patch Changes + +- Updated dependencies [[`3e9a36d`](https://github.com/TanStack/db/commit/3e9a36d2600c4f700ca7bc4f720c189a5a29387a)]: + - @tanstack/db@0.0.31 + ## 0.0.12 ### Patch Changes diff --git a/packages/query-db-collection/package.json b/packages/query-db-collection/package.json index c855e5a90..74bf0d41a 100644 --- a/packages/query-db-collection/package.json +++ b/packages/query-db-collection/package.json @@ -1,7 +1,7 @@ { "name": "@tanstack/query-db-collection", "description": "TanStack Query collection for TanStack DB", - "version": "0.0.12", + "version": "0.0.13", "dependencies": { "@tanstack/db": "workspace:*", "@tanstack/query-core": "^5.75.7" diff --git a/packages/react-db/CHANGELOG.md b/packages/react-db/CHANGELOG.md index 7062c0eed..28cc23fed 100644 --- a/packages/react-db/CHANGELOG.md +++ b/packages/react-db/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/react-db +## 0.0.31 + +### Patch Changes + +- Updated dependencies [[`3e9a36d`](https://github.com/TanStack/db/commit/3e9a36d2600c4f700ca7bc4f720c189a5a29387a)]: + - @tanstack/db@0.0.31 + ## 0.0.30 ### Patch Changes diff --git a/packages/react-db/package.json b/packages/react-db/package.json index 24c74e2db..6745d640c 100644 --- a/packages/react-db/package.json +++ b/packages/react-db/package.json @@ -1,7 +1,7 @@ { "name": "@tanstack/react-db", "description": "React integration for @tanstack/db", - "version": "0.0.30", + "version": "0.0.31", "author": "Kyle Mathews", "license": "MIT", "repository": { diff --git a/packages/svelte-db/CHANGELOG.md b/packages/svelte-db/CHANGELOG.md new file mode 100644 index 000000000..588a8b0e5 --- /dev/null +++ b/packages/svelte-db/CHANGELOG.md @@ -0,0 +1,29 @@ +# @tanstack/svelte-db + +## 0.0.1 + +### Patch Changes + +- Add Svelte support ([#91](https://github.com/TanStack/db/pull/91)) + + Usage example: + + ```svelte + + + + + ``` + +- Updated dependencies [[`3e9a36d`](https://github.com/TanStack/db/commit/3e9a36d2600c4f700ca7bc4f720c189a5a29387a)]: + - @tanstack/db@0.0.31 diff --git a/packages/svelte-db/package.json b/packages/svelte-db/package.json index 3d9b5754f..83712e918 100644 --- a/packages/svelte-db/package.json +++ b/packages/svelte-db/package.json @@ -1,7 +1,7 @@ { "name": "@tanstack/svelte-db", "description": "Svelte integration for @tanstack/db", - "version": "0.0.0", + "version": "0.0.1", "scripts": { "build": "svelte-package --input ./src --output ./dist --tsconfig ./tsconfig.build.json", "test": "npx vitest --run", diff --git a/packages/trailbase-db-collection/CHANGELOG.md b/packages/trailbase-db-collection/CHANGELOG.md index 6e4896add..622eecf88 100644 --- a/packages/trailbase-db-collection/CHANGELOG.md +++ b/packages/trailbase-db-collection/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/trailbase-db-collection +## 0.0.7 + +### Patch Changes + +- Updated dependencies [[`3e9a36d`](https://github.com/TanStack/db/commit/3e9a36d2600c4f700ca7bc4f720c189a5a29387a)]: + - @tanstack/db@0.0.31 + ## 0.0.6 ### Patch Changes diff --git a/packages/trailbase-db-collection/package.json b/packages/trailbase-db-collection/package.json index 4a269b0bf..58b6dcc28 100644 --- a/packages/trailbase-db-collection/package.json +++ b/packages/trailbase-db-collection/package.json @@ -1,7 +1,7 @@ { "name": "@tanstack/trailbase-db-collection", "description": "TrailBase collection for TanStack DB", - "version": "0.0.6", + "version": "0.0.7", "dependencies": { "@standard-schema/spec": "^1.0.0", "@tanstack/db": "workspace:*", diff --git a/packages/vue-db/CHANGELOG.md b/packages/vue-db/CHANGELOG.md index 00790b0b2..d5a373888 100644 --- a/packages/vue-db/CHANGELOG.md +++ b/packages/vue-db/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/vue-db +## 0.0.30 + +### Patch Changes + +- Updated dependencies [[`3e9a36d`](https://github.com/TanStack/db/commit/3e9a36d2600c4f700ca7bc4f720c189a5a29387a)]: + - @tanstack/db@0.0.31 + ## 0.0.29 ### Patch Changes diff --git a/packages/vue-db/package.json b/packages/vue-db/package.json index 6f6b43d9f..993225f4a 100644 --- a/packages/vue-db/package.json +++ b/packages/vue-db/package.json @@ -1,7 +1,7 @@ { "name": "@tanstack/vue-db", "description": "Vue integration for @tanstack/db", - "version": "0.0.29", + "version": "0.0.30", "author": "Kyle Mathews", "license": "MIT", "repository": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6b92cc785..ad5bc6764 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -99,16 +99,16 @@ importers: examples/react/todo: dependencies: '@tanstack/electric-db-collection': - specifier: ^0.0.12 + specifier: ^0.0.13 version: link:../../../packages/electric-db-collection '@tanstack/query-core': specifier: ^5.75.7 version: 5.75.7 '@tanstack/query-db-collection': - specifier: ^0.0.12 + specifier: ^0.0.13 version: link:../../../packages/query-db-collection '@tanstack/react-db': - specifier: ^0.0.30 + specifier: ^0.0.31 version: link:../../../packages/react-db '@tanstack/react-router': specifier: ^1.125.6 @@ -117,7 +117,7 @@ importers: specifier: ^1.126.1 version: 1.129.2(@netlify/blobs@9.1.2)(@tanstack/react-router@1.129.2(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(@vitejs/plugin-react@4.7.0(vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(terser@5.43.1)(tsx@4.19.3)(yaml@2.7.0)))(drizzle-orm@0.40.1(@types/pg@8.11.11)(gel@2.0.1)(kysely@0.27.6)(pg@8.14.1)(postgres@3.4.7))(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(terser@5.43.1)(tsx@4.19.3)(yaml@2.7.0)) '@tanstack/trailbase-db-collection': - specifier: ^0.0.6 + specifier: ^0.0.7 version: link:../../../packages/trailbase-db-collection cors: specifier: ^2.8.5