Skip to content

Commit 0b00d81

Browse files
committed
chore: add changeset for critical scheduler fixes
1 parent aba16b6 commit 0b00d81

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
"@sylphx/zen": patch
3+
---
4+
5+
Critical bug fixes for scheduler and subscribe API
6+
7+
**Fixed Bugs:**
8+
9+
1. **subscribe() undefined handling** - Fixed bug where signals with undefined initial values would skip first 2 updates. Now uses hasValue flag instead of undefined check.
10+
11+
2. **Dead work elimination** - Added guard to queueBatchedNotification to skip queue when no legacy effect listeners exist. Eliminates unnecessary allocations in effect-based subscribe apps.
12+
13+
3. **Error recovery** - Clear all queue flags in finally block to prevent stuck state when effects/computeds throw errors. Ensures scheduler can recover from errors correctly.
14+
15+
**Impact:**
16+
- Fewer allocations (no pending notifications without legacy listeners)
17+
- Safer error handling (flags always cleared on errors)
18+
- Correct undefined handling (no silent bugs with undefined values)
19+
20+
All 48 tests passing.

0 commit comments

Comments
 (0)