Skip to content

Commit 9b68277

Browse files
KyleAMathewsclaude
andcommitted
Update changeset with comprehensive fix details
- Document UI responsiveness fix for rapid user interactions - Explain root causes: event filtering and batching issues - Detail solution: triggeredByUserAction parameter and forceEmit logic 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 3407a55 commit 9b68277

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.changeset/open-zebras-remain.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
"@tanstack/db": patch
3+
---
4+
5+
Fix UI responsiveness issue with rapid user interactions in collections
6+
7+
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.
8+
9+
**Root Causes:**
10+
- Event filtering logic was blocking ALL events for keys with recent sync operations, including user-initiated actions
11+
- Event batching was queuing user actions instead of immediately updating the UI during high-frequency operations
12+
13+
**Solution:**
14+
- Added `triggeredByUserAction` parameter to `recomputeOptimisticState()` to distinguish user actions from sync operations
15+
- Modified event filtering to allow user-initiated actions to bypass sync status checks
16+
- Enhanced `emitEvents()` with `forceEmit` parameter to skip batching for immediate user action feedback
17+
- Updated all user action code paths to properly identify themselves as user-triggered
18+
19+
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 commit comments

Comments
 (0)