You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
+
11
+
- Event filtering logic was blocking ALL events for keys with recent sync operations, including user-initiated actions
12
+
- Event batching was queuing user actions instead of immediately updating the UI during high-frequency operations
13
+
14
+
**Solution:**
15
+
16
+
- Added `triggeredByUserAction` parameter to `recomputeOptimisticState()` to distinguish user actions from sync operations
17
+
- Modified event filtering to allow user-initiated actions to bypass sync status checks
18
+
- Enhanced `emitEvents()` with `forceEmit` parameter to skip batching for immediate user action feedback
19
+
- Updated all user action code paths to properly identify themselves as user-triggered
20
+
21
+
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