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

rc.9: overlapping optimistic moves duplicate an item across filtered keyed lists

Đã đóng
#3,548 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
42/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
frontend

Hướng nghiên cứu

Trước tiên, hãy chạy bản tái hiện được liên kết và kiểm tra createOptimisticStore với các danh sách For đã lọc và có khóa. Theo dõi cách public flush(), publish(source) và việc xử lý các action chồng lấn cập nhật các vị trí đang chờ sau khi action cũ hơn được xác nhận. Hoàn tất khi bản tái hiện chỉ giữ card 0 trong lane 2 và card 1 trong lane 1, trong khi các action 2–4 vẫn đang chờ.

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 createOptimisticStore backed by an async iterable becomes inconsistent with filtered, keyed For lists while actions overlap. After an older action is confirmed, a later update causes the same item to render in two lists, even though the optimistic store contains that item only once and assigns it to only one list.

The reduced case has two cards and four optimistic moves. No router, SSR, database, drag handling, effects, or application-managed ownership.

Your Example Website or App

https://s.olid.uk/id/kln8x1FLT-GushIouj37EQ

Steps to Reproduce the Bug or Issue

Click Run reproduction once. Reload to repeat.

The button:

  1. Moves card 0 to lane 1, order 1.
  2. Moves card 0 to lane 2, order 6.
  3. Moves card 1 to lane 1, order 9.
  4. Publishes the authoritative result of action 1, resolves only action 1, and allows a task turn.
  5. Moves card 1 within lane 1, order 3.

Actions 2-4 remain pending. Each move calls public flush().

Observed: lane 1 renders cards 0 and 1; lane 2 also renders card 0. The store contains only two cards and places card 0 only in lane 2.

Expected behavior

Lane 1 should contain only card 1; lane 2 should contain only card 0. Confirming an older move must not expose its old placement alongside the newer optimistic placement.

Screenshots or Videos

No response

Platform

Linux/WSL, Chromium.
Published solid-js, @solidjs/signals, @solidjs/web and native @solidjs/compiler 2.0.0-rc.9.
Also reproduces with matching pkg.pr.new/mizulu/solid2 runtime packages at 788277a, retaining the rc.9 native compiler.
Verified in development and production DOM builds.

Additional context

Control: omit only publish(source), leaving action resolution and all moves unchanged. No duplicate appears.

In the full app, rendering recovers after all requests are confirmed. This reports inconsistent pending rendering, not persisted duplicate records.

Related: #3543. Preview 788277a fixes that subscriber-leak repro, but this duplication still reproduces. The exact internal cause has not been identified.

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

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.