Skip to content

2.0.0-rc.8 combined isPending reports false while both individual reads report true during an optimistic update #3409

Description

@GabbeV

Describe the bug

Two async memos depend on an optimistic value. During the optimistic update, isPending(a) and isPending(b) both report true, but isPending(() => [a(), b()]) reports false.

Your Example Website or App

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

Steps to Reproduce the Bug or Issue

  1. Wait for initialization.
  2. Click Run.
  3. A and B both report pending, while Combined reports false.
  4. Once A resolves, Combined becomes true while B is still loading.

Expected behavior

The combined indicator should report true while either of its reads is pending.

Screenshots or Videos

No response

Platform

  • OS: Windows
  • Browser: Firefox

Additional context

Replacing the optimistic value and action with an ordinary signal update makes the indicators work correctly.

Possibly related to #3379, but this uses two async siblings read by one isPending call rather than an async chain. It still reproduces after #3400.

Reproduced on next at 14ded24 and #3405 at 323f9ad, in development and production.

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