mirror of
https://github.com/anomalyco/opentui.git
synced 2026-04-25 04:55:58 +03:00
[PR #680] [MERGED] fix(solid): handle ScrollBox parent mismatch in getParentNode #708
Labels
No labels
bug
core
documentation
feature
good first issue
help wanted
pull-request
question
react
solid
tmux
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/opentui#708
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/anomalyco/opentui/pull/680
Author: @IlyaGulya
Created: 2/13/2026
Status: ✅ Merged
Merged: 2/15/2026
Merged by: @kommander
Base:
main← Head:fix/scrollbox-for-cleanup📝 Commits (1)
9716630fix(solid): handle ScrollBox parent mismatch in getParentNode to fix child removal📊 Changes
2 files changed (+631 additions, -0 deletions)
View changed files
📝
packages/solid/src/reconciler.ts(+9 -0)➕
packages/solid/tests/scrollbox-cleanchildren.test.tsx(+622 -0)📄 Description
Summary
add/removeto its internalcontentwrapper (scrollbox → wrapper → viewport → content), so children reportcontentas their parent. The reconciler passesscrollboxitself — causing the identity check incleanChildren(getParentNode(el) === parent) to always fail, leaving stale nodes behind._getParentNodeinreconciler.tsdetect when the child's parent is thecontentof aScrollBoxRenderableand return the ScrollBox instead. This keepsuniversal.jsuntouched.Root cause
ScrollBox.add(obj)delegates tothis.content.add(obj), which setsobj.parent = contentparentargument isscrollbox(the JSX parent)cleanChildren()checkedgetParentNode(el) === parent→content !== scrollbox→falseremoveNode()was skipped → stale children remained in the treeOnly triggered with multiple dynamic siblings (two+
<For>,<For>+<Show>, etc.) because that's whencleanChildrenuses the marker-based path where the guard exists.AI Disclosure
This PR was created with assistance of AI agent (Claude Code + Claude Opus 4.6)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.