Repository navigation
fix(signals): a projection's synchronous throw reaches its readers (#3956) - #3979
Conversation
…3956) A re-run of a projection that threw synchronously only woke the leaves' readers for NotReadyError; any other error stayed with the derive, which the leaves' readers do not subscribe to, so the screen kept the last good value. Wake them the same way so they re-derive and meet the error. Fixes #3956 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LVm3wseHt9wRTY8LfPiHmQ
🦋 Changeset detectedLatest commit: 4b711c3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 12 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Size (brotli, eager entry chunk)
Bundled with Rolldown (what Vite ships), brotli q11, decimal KB. A scenario fails only when it is over its brotli cap and its minified size is more than 20 B over the minified recorded with the cap; over the cap within that allowance is brotli layout noise and passes with a warning. Caps and their recorded minified in |
Coverage Report for CI Build 38124404564Coverage remained the same at 77.429%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
Generated by Claude Code |
Merging this PR will improve performance by 12.68%
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ⚡ | createStore setter: delete + set one root key (#3044 overlay) |
2.1 ms | 1.8 ms | +12.68% |
Tip
Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.
Comparing fix/projection-sync-throw-3956 (4b711c3) with next (c51c5c9)
Fixes #3956
What was wrong: when a
createProjectionre-ran and threw synchronously (e.g. the entry it reads has since failed), the error stayed on the projection's internal derive. Readers of the projection's fields subscribe to the leaves, not to the derive, so nothing woke them: the screen kept showing the last good value and no<Errored>caught anything. The catch only woke the leaves' readers forNotReadyError(a flight going up).Fix: in the pass's catch, any other error wakes the family's readers too (
errorFamily), so they re-derive and meet the error. One line instore/projection.ts.Test:
tests/store/projection-sync-throw-3956.test.ts. A projection readsentry(key())and throws when the entry is errored, underErrored(Loading(...)).setKey("bad")now showsERRORED; onnextit stayedrow-good.Size: +6 B minified on "hydrating + every store primitive family"; the core, isPending/latest, render and CSR scenarios are unchanged. Full signals suite: 5156 passed, 22 expected fail.
🤖 Generated with Claude Code
https://claude.ai/code/session_01LVm3wseHt9wRTY8LfPiHmQ
Generated by Claude Code