Loading reveals content for page 1 while an open action still displays page 0

Offen
#5,162 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@brenelz arbeitet bereits daran.

Seit 24.11.2026.

  • #5186 von @brenelz — offen

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
18/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Bereich
frontend

Rechercherichtung

The payload names no source files. Start from the linked reproduction and the Loading fallback behavior it exercises, then read the related first-reveal discussion in #2937. Done means the fallback stays visible until the action publishes page 1, and the heading and content show the same page. This touches reactive scheduling and action commit timing, so it needs maintainer guidance.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Describe the bug

An action changes the selected page from 0 to 1 and stays open for one second. The heading keeps showing page 0. If the async memo was still waiting for its first answer when the action started, its answer for page 1 replaces the loading fallback after half a second. The heading and content then identify different pages.

Both are ordinary reads of the same selection:

const content = createMemo(() => fetchPage(id()));

const navigate = action(function* () {
  setId(1);
  yield delay(1000);
});

// Rendered together
<h2>Page {id()}</h2>
<Loading fallback="Loading…">{content()}</Loading>
Your Example Website or App

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

Steps to Reproduce the Bug or Issue
  1. Open the reproduction. It shows “Page 0” and “Loading…”. The page 0 request stays unresolved so there is no timing requirement for the click.
  2. Click Go to page 1. After 500 ms the content reads “Content for page 1”, but the heading still reads “Page 0”.
  3. After another 500 ms the action finishes and the heading changes to “Page 1”.
Expected behavior

While the action holds the selection at page 0, the fallback stays visible. Once the action finishes, “Page 1” and “Content for page 1” appear together. The request for page 1 can start immediately.

Screenshots or Videos

No response

Platform

Solid 2.0.3, Chromium on Linux.

Additional context

The first-reveal behavior described in #2937 seems relevant. In that example the action waited for fallback cleanup. Here the action waits only for a timer, and the resolved content was fetched using the action’s still-unpublished selection.

Vorherrschende Sprache
TypeScript
Sterne
37k
Forks
1.2k
Ø Merge
8 Std. 43 Min.
Gemergte PRs (30 T.)
365

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus solidjs/solid

Alle Issues in solidjs/solid

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.