Solid 2: reconcile repeats unchanged presence and holds unrelated updates
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 68/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- frontend
调研方向
Start with packages/signals/src/store/next/store.ts, especially notifyFold and notifyFoldTail, then run the linked playground reproduction. Add an isolated regression test for the unchanged-absence case and verify that Value: 1 renders while the deletion action remains pending, while actual presence changes still notify.
由索引模型根据 Issue 内容生成。
描述
Describe the bug
Reconciling a plain store can hold an unrelated field's rendered update behind a pending action when a separate in expression observes a property that the action deleted. The incoming snapshot leaves that property absent, matching its already-staged presence.
Reproduction
One-button playground — preview 3ed3810, Tailwind disabled.
Click Build, then Run reproduction. The sequence is:
// Initial store: { a: { value: 0 }, b: { failed: true } }
const removeFlag = action(function* () {
setState(draft => { delete draft.b.failed; });
yield gate;
});
// In a later event, while removeFlag is pending:
setState(reconcile({ a: { value: 1 }, b: {} }));
The component separately renders state.a.value and "failed" in state.b; no memo combines them. The playground releases the action after 2.5 seconds.
Expected: Value: 1 appears while the deletion action remains pending.
Actual: Value: 0 remains until that action finishes, then becomes 1.
Controls and investigation
Verified in Chromium and Firefox, in development and production builds:
- Removing the separate presence expression allows the value to update immediately.
- Assigning
failed = falseinstead of deleting it, and reconciling the samefalse, allows it to update immediately. - Writing
a.value = 1directly instead of reconciling allows it to update immediately.
The suspected cause is the presence notification in notifyFold and notifyFoldTail. Value notifications compare old/new values, but the presence loops call setSignal for every observed key without comparing presence. The core joins the node's holding transaction before rejecting an equal value, so repeating false can entangle the reconciliation with the deletion action.
Adding an old/new presence comparison to both loops in an isolated test bundle prevents the hold. This is diagnostic evidence, not a fully validated patch.
Actual presence changes must still notify: deleting a prop override can select another merge source even when the resulting value is equal. This reproduction has no merge or provider switch; the suspected problem is the repeated absence-to-absence notification.
Version
solid-js and @solidjs/web from https://pkg.pr.new/mizulu/solid2/...@3ed3810 (Solid commit 3ed3810097bfc5e5d15829277b40315bbd2b5f74).
- 主要语言
- TypeScript
- 星标
- 36.2k
- 派生
- 1.1k
- 平均合并
- 11 小时 19 分钟
- 30 天内合并 PR
- 337
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
solidjs/solid 的其他 Issue
-
`lazy()`: remounting an already-loaded component renders empty (or the Suspense fallback) since 1.9.14可能已有人在做 @itisrmk 于 8 天前认领。 未关闭1.x
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
2.0.0-rc.18 | `await refresh(memo)` hangs in an action after an optimistic write and a dependency change可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 4/5 3-5 天 新手友好度 57/100
维护者通常 1 天内回复
-
[2.0] IMMUTABLE_UPDATE_IN_STORE false positive when an in-place `splice` shifts the next item into the removed index可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 3/5 1-2 天 新手友好度 55/100
维护者通常 1 天内回复
-
enhancement
难度 5/5 一周以上 新手友好度 35/100
维护者通常 1 天内回复
-
`createRoot`'s dispose function keeps `fn` alive, so `<For>`/`<Index>` rows retain removed list items可能已有人在做 @boombang 于 10 天前认领。 未关闭1.x
难度 4/5 1-2 天 新手友好度 45/100
维护者通常 1 天内回复
相似的 Issue
-
a10y a10y-audit ai-driven-qa claude
难度 2/5 1-3 小时 新手友好度 86/100
linagora/twake-directory-manager#219 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
type: bug
难度 2/5 1-3 小时 新手友好度 79/100
维护者通常 1 天内回复
-
0️⃣ phase/new
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
Pulse v7: buildPreferencesFromTelos() bypasses telosSectionOrFile(), renders empty on unified-TELOS installs可能已有人在做 @zephyr91 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
danielmiessler/LifeOS#2393 ·
维护者通常 4 天内回复