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

Đang mở
#5,162 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@brenelz đang làm issue này rồi.

Từ ngày 24/11/2026.

  • #5186 của @brenelz — đang mở

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
18/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
javascript, typescript
Lĩnh vực
frontend

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
TypeScript
Star
37k
Fork
1.2k
Merge trung bình
8 giờ 43 phút
Pull request đã merge (30 ngày)
365

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của solidjs/solid

Tất cả issue của solidjs/solid

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.