Skip to content

Confirming one overlapping optimistic-store action holds an independent signal update #3706

Description

@GabbeV

Describe the bug

Confirming one optimistic-store action while another is still pending can hold a later, independent signal update. A memo combines the signal with a card ID that neither action changes:

const condition = createMemo(() => drag() === cards[0].id);

After the first action confirms and updates the authoritative store, a later task calls setDrag("0"). The second action remains open. latest(drag) becomes "0", but drag() stays unset and isPending(drag) is true.

Your Example Website or App

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

Steps to Reproduce the Bug or Issue

  1. Open the playground, click Build, then Run reproduction.
  2. Observe drag: unset, latest: 0, and pending: true.

The button starts two optimistic moves, confirms the first while the second is pending, awaits a timer to separate the drag write into a later task, then sets drag. No explicit flush() is used.

Expected behavior

The independent signal update should publish: drag: 0 and pending: false, while the second move remains pending.

Platform

  • OS: Linux
  • Browser: Chromium 153.0.8010.12
  • Solid: mizulu/solid2@6958367 preview build (compiler and runtime)

Additional context

The earlier repros in #3688 and #3698 pass with this build. Controls also publish the drag update when only one move is open, when both moves stay open, or when the first settles before the second starts. The distinguishing sequence is confirming the first move after the second has started but before it settles.

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