Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[2.0 / next] A visible button's condition throws in its click handler during a held update

Đang mở
#4,109 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

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
18/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
javascript, typescript
Lĩnh vực
frontend, web-dev

Hướng nghiên cứu

Start with the D-41 rule in packages/signals/docs/RULES-DERIVED.md (around line 337), which states that ordinary outside reads keep the committed result during a hold, and with the hosted playground repro. Reproduce the second click throwing while a <Show> button and an async sibling are held, then find where the outside read of the memo bypasses the held value. Done means the handler reads the committed true while the frame is held, and the error still surfaces when the boundary replaces the button.

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

Mô tả

Describe the bug

A button is shown with <Show when={condition()}>, and its click handler reads the same condition() memo.

An update makes that memo throw while a rendered async sibling holds the frame. The button stays visible, but clicking it again throws the new error. The ordinary outside read sees the failure before the frame that still shows the button reveals.

Your Example Website or App

https://s.olid.uk/id/180Kc1jFSmCmMLNpDCL08Q

Steps to Reproduce the Bug or Issue
  1. Click Use value. It logs condition: true and starts a five-second update.
  2. While Update pending… click Use value again. is visible, click Use value again.
  3. The click handler throws Condition failed, even though the button is still visible and the async sibling still shows initial.
  4. When the async sibling resolves, it becomes updated and the error boundary replaces the button with the error.

Both clicks are manual. Reload the playground to repeat.

Expected behavior

While the held frame still shows the button, the ordinary condition() read in its event handler should retain the committed true result. The failure should become observable when the frame reveals and the error boundary replaces the button.

Screenshots or Videos

No response

Platform
  • OS: Linux
  • Browser: Chromium 154.0.8037.57
  • Solid: playground pinned to next@d5e32a9af41c7bfe0bc090f7438ee4297d540b17, which includes #4085. The source regression also reproduces on next@ccd99481deed3ebb567ee11ab7a152ced84d122b.
Additional context

Follow-up to #4085. The hosted repro verifies that the second click throws while the button and pending indicator remain visible. The boundary only replaces the button after the async sibling resolves.

D-41 specifies that ordinary outside reads retain the committed outcome during a hold. It already records an early-read deviation for derived stores; this example uses a synchronous scalar memo.

Ngôn ngữ chính
TypeScript
Star
36.1k
Fork
1.1k
Merge trung bình
11 giờ 32 phút
Pull request đã merge (30 ngày)
356

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.