Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

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

已关闭
#3,548 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
42/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
活跃
技术栈
typescript
领域
frontend

调研方向

首先运行链接的复现,并检查使用经过过滤且带键的 For 列表时的 createOptimisticStore。跟踪较早的 action 确认后,public flush()、publish(source) 以及重叠 action 的解析如何更新待处理的放置。完成的标准是:复现结果只在 lane 2 中保留 card 0,只在 lane 1 中保留 card 1,同时 action 2–4 仍保持待处理状态。

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
TypeScript
星标
36.1k
派生
1.1k
平均合并
12 小时 10 分钟
30 天内合并 PR
338

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

solidjs/solid 的其他 Issue

查看 solidjs/solid 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。