Skip to content

[2.0.0-rc.20] isPending disagrees with an async memo derived from it #4677

Closed

Description

@GabbeV

Describe the bug

An async memo that reads both id() and isPending(id) can publish a badge containing pending: true while a separate binding of isPending(id) displays false.

In the repro, an independent details memo takes 500 ms. The badge captures the ID and pending status synchronously, then returns that presentation after 1000 ms. Item 0 starts with synchronous, already-loaded values.

The visible sequence after setting id to 1 is:

Time       ID   Details   Pending   Async badge
Initially   0   Item 0    false     ID: 0, pending: false
~1000 ms    0   Item 0    false     ID: 0, pending: true
~2000 ms    1   Item 1    false     ID: 1, pending: false

The pending output and its async derivation visibly disagree for about one second.

Your Example Website or App

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

Steps to Reproduce the Bug or Issue

  1. Open the linked repro, pinned to Solid 2.0.0-rc.20.
  2. Click "Load item 1" once.
  3. After about one second, observe Pending: false beside Async badge: ID: 0, pending: true.
  4. After about two seconds, both settle. Reload to repeat.

Expected behavior

The pending output and ordinary derivations of that output should publish consistently. isPending can intentionally differ from its input's ordinary published value, but its async badge should not disagree with the pending output itself without an explicit deferral boundary.

Screenshots or Videos

No response

Platform

  • OS: Debian GNU/Linux 13 (Linux)
  • Browser: Chromium 154.0.8037.57 (automated verification)
  • Solid: 2.0.0-rc.20, development build

Additional context

Verified from the saved repro in a fresh browser context, with no runtime errors. Tailwind is disabled. The example uses ordinary JSX bindings, two memos, real setTimeout delays, and one signal setter. There is no Loading, createDeferred, manual flush, or effect writing a signal.

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