Describe the bug
When an optimistic update reverts, onSettled reads 0 from the optimistic value but 1 from a synchronous memo that just returns that value.
Your Example Website or App
https://s.olid.uk/id/iGbCNfabQJigO0BstT97mw
Steps to Reproduce the Bug or Issue
- Click Run.
- Value and Copy become 1, then revert to 0.
- The captured onSettled snapshot says
Value: 0, Copy: 1.
Expected behavior
The callback reads a consistent settled state: both values are 0.
Screenshots or Videos
No response
Platform
- OS: Windows
- Browser: Firefox
Additional context
Reproduced on next at 14ded24, #3337 at 20f3143 and #3405 at 323f9ad.
Replacing createOptimistic with createSignal produces a consistent snapshot. The mismatch also reproduces without an action or delay.
Describe the bug
When an optimistic update reverts,
onSettledreads 0 from the optimistic value but 1 from a synchronous memo that just returns that value.Your Example Website or App
https://s.olid.uk/id/iGbCNfabQJigO0BstT97mw
Steps to Reproduce the Bug or Issue
Value: 0, Copy: 1.Expected behavior
The callback reads a consistent settled state: both values are 0.
Screenshots or Videos
No response
Platform
Additional context
Reproduced on next at 14ded24, #3337 at 20f3143 and #3405 at 323f9ad.
Replacing createOptimistic with createSignal produces a consistent snapshot. The mismatch also reproduces without an action or delay.