Describe the bug
A synchronous signal write remains pending when a <Show> condition reads that signal alongside an already-visible optimistic value. The two writes occur in separate tasks:
const [optimistic, setOptimistic] = createOptimistic(false);
const [drag, setDrag] = createSignal(false);
const move = action(function* () {
setOptimistic(true);
yield new Promise<void>(() => {});
});
void move();
setTimeout(() => setDrag(true), 0);
<Show when={optimistic() && !drag()} keyed>
<p>Optimistic content</p>
</Show>
After the timeout runs, optimistic() is visibly true, but drag() is still false, latest(drag) is true, and isPending(drag) is true. The independent signal update is held by the unfinished action even though the condition has a visible optimistic value to read.
Your Example Website or App
https://s.olid.uk/id/RyeDQ_i3S6OOMQWDELoNJQ
Steps to Reproduce the Bug or Issue
- Open the example and click Run reproduction once.
- Observe
optimistic: true, drag: false, latest(drag): true, and isPending(drag): true.
Expected behavior
The separate synchronous signal write should publish immediately: drag() should be true, isPending(drag) should be false, and the optimistic content should disappear while the action remains open.
Platform
- OS: Linux
- Browser: Chromium 153.0.8010.12 (Playwright)
- Solid: 2.0.0-rc.11 (
next in the linked playground)
Describe the bug
A synchronous signal write remains pending when a
<Show>condition reads that signal alongside an already-visible optimistic value. The two writes occur in separate tasks:After the timeout runs,
optimistic()is visiblytrue, butdrag()is stillfalse,latest(drag)istrue, andisPending(drag)istrue. The independent signal update is held by the unfinished action even though the condition has a visible optimistic value to read.Your Example Website or App
https://s.olid.uk/id/RyeDQ_i3S6OOMQWDELoNJQ
Steps to Reproduce the Bug or Issue
optimistic: true,drag: false,latest(drag): true, andisPending(drag): true.Expected behavior
The separate synchronous signal write should publish immediately:
drag()should betrue,isPending(drag)should befalse, and the optimistic content should disappear while the action remains open.Platform
nextin the linked playground)