You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Optimistic store update is hidden after a local derived-store write inside an action #3796
On experimental build 6f77b1b, writing a client-only flag to a writable derived store inside an action prevents a subsequent optimistic store update from appearing while that action is pending.
The optimistic store wraps the derived store. The local write only sets failed = false; the optimistic write changes title to "New" and sets saving = true. A direct JSX binding keeps showing "Old" and saving: false until the action completes.
Removing the setLocal call makes the optimistic update appear. The reproduction uses a normal component and direct text binding, without For, Show, routing, or external data loading.
During the two-second simulated save, observe Old / saving: false instead of the optimistic values.
After completion, the display changes to New / saving: false. The report records both states.
Reload and remove the marked setLocal call to compare: the optimistic values appear during the save.
Expected behavior
The optimistic view should immediately show New / saving: true while the action is pending, including when the action first writes to its underlying local store. After completion, it should follow the authoritative source with the temporary saving flag removed.
Platform
OS: Linux (Ubuntu / WSL)
Browsers: Chromium 153.0.8010.12 and Firefox 155.0; identical results
RC.13 shows the optimistic update correctly but suppresses the later source reconciliation discussed in #3733. The newer build reconciles correctly after completion, but loses the optimistic display while pending. Both playgrounds have Tailwind disabled.
The local setLocal write staged the row, and the optimistic setter then compared the container's slot against that staging instead of the same row. It guessed the whole slot with the old row, which hid the title/saving guesses. The slot now resolves to the inner row before it's compared, so New / saving: true shows while the action is pending. Thanks for the clear reproduction.
Activity
fix(signals): an optimistic write over a held row guesses the row's k…
refactor(signals): trim the F5 and #3796 fixes' minified cost
fix(signals): L2 lane takeover of held effects (#3766) and optimistic…
ryansolid commentedon Oct 6, 2026