Repository navigation
v0.2.8 - Complete Signal Batching Implementation
π Critical Bug Fix - Complete Signal Batching Implementation
BREAKING FIX: v0.2.7's signal batching was incomplete. This release completes the fix by adding batch() to all 14 missing locations.
What was fixed:
- β
sync_engine.dart - 6 connection status updates (CRITICAL)
stop(),init-okhandler,init-errorhandler, auth error, websocket error, websocket close- Impact: Prevents SignalEffectException during network reconnection/errors
- β
presence.dart - 5 presence methods (HIGH)
setPresence(),updateCursor(),removeCursor(),setTyping(),sendReaction()- Impact: Fixes reactive cycles in multi-user collaboration features
- β
auth_manager.dart - 2 missing auth methods (HIGH)
refreshUser(),updateUser()- Impact: Completes the v0.2.7 auth fix (only 6 of 8 methods were batched)
- β
query_engine.dart - 1 query execution pattern (MEDIUM)
_executeQuery()success and error signal updates- Impact: Prevents reactive cycles during rapid query updates
Why this matters:
- v0.2.7 claimed "Added batch() calls to all auth methods" but only batched 6 of 8 auth methods
- Entire modules (sync_engine, presence) were completely unbatched
- Connection state changes during network issues would still trigger SignalEffectException
- Multi-user presence features could cause reactive cycles
Total fixes: 14 unbatched signal updates across 5 files
Technical Details:
// β Before: Unbatched signal update (causes reactive cycles)
_connectionStatus.value = false;
// β
After: Properly batched
batch(() {
_connectionStatus.value = false;
});Files changed:
lib/src/sync/sync_engine.dart- 6 fixeslib/src/reactive/presence.dart- 5 fixeslib/src/auth/auth_manager.dart- 2 fixeslib/src/query/query_engine.dart- 1 fix
Verification:
- β All 144 existing tests passing
- β No new linting issues
- β No API changes - fully backward compatible
Full Changelog: v0.2.7...v0.2.8