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

Open
#5,162 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@brenelz is already working on this.

Since Nov 24, 2026.

  • #5186 by @brenelz — open

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
18/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Domain
frontend

Research direction

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.

Written by the indexing model from the issue text.

Description

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.

Dominant language
TypeScript
Stars
37k
Forks
1.2k
Avg merge
8h 43m
Merged PRs (30d)
365

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from solidjs/solid

All issues in solidjs/solid

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.