Skip to content

Chained optimistic store ignores a move back to the previous value after an action settles #3672

Description

@GabbeV

Describe the bug

With createOptimisticStore(base) where base is a createStore, a second action can update moving while its optimistic position write is ignored. The first action has fully settled and the base store has confirmed its result before the second action starts. Reproduces on Solid 2.0.0-rc.9 and the 40c65cd preview.

Your Example Website or App

https://s.olid.uk/id/fgVOue6FQCG8bUXFA9Nj3A

Steps to Reproduce the Bug or Issue

  1. Open the linked playground.
  2. Click Run reproduction once.
  3. Observe the values while the second move is pending. The first action is confirmed and settled before the second starts.

Expected behavior

Expected: base position 1, optimistic position 0, moving true.
Actual: base position 1, optimistic position 1, moving true. The optimistic setter ran, but only moving appears in the view.

Screenshots or Videos

No response

Platform

  • OS: Linux
  • Browser: Chromium (Playwright)
  • Solid: 2.0.0-rc.9 in the playground; also reproduced with the 40c65cd preview in development and production builds

Additional context

The repro uses one object and no router, network, drag handling, keyed list, or CSS. A control that sources the optimistic store from a plain derived object instead of chaining createOptimisticStore(base) shows position 0 correctly.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions