[2.0 / next] A visible button's condition throws in its click handler during a held update
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
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
- Click Use value. It logs
condition: trueand starts a five-second update. - While Update pending… click Use value again. is visible, click Use value again.
- The click handler throws
Condition failed, even though the button is still visible and the async sibling still showsinitial. - When the async sibling resolves, it becomes
updatedand 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 onnext@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
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của solidjs/solid
-
[2.0 / next] Error formatting and async iterator protocol failures escape memo error handlingĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 22/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 14/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[2.0 / next] Outside latest reads of a derivation expose errors and values at different timesĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 22/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 15/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của solidjs/solid
Issue tương tự
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 75/100
siyuan-note/siyuan#20629 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Volume eject does not refuse system, root or /home mountsCó thể đã có người làm @bernardopg đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
spacedriveapp/spacedrive#3159 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
melgarafael/DeskcommCRM#3000 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
callstackincubator/simlock#639 ·
Maintainer thường phản hồi trong vòng 1 ngày