-
Notifications
You must be signed in to change notification settings - Fork 3k
fix(cli): patch ink to clear staticNode on indirect subtree removal #7816
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Suggestion] No test covers the new
clearStaticNodeIfContainedancestor-walk logic — Concrete cost: a future ink patch version bump could break the walk (e.g., renamedparentNodefield) and the WASM crash from #6820 would silently return with no test to catch itSuggested fix: add an integration test that renders a
<Static>component inside a conditionally-rendered parent, toggles the parent off, and triggers another render cycle to confirm no crash.中文说明
[建议] 新增的
clearStaticNodeIfContained祖先遍历逻辑没有测试覆盖 —— 具体代价:未来 ink patch 版本升级可能破坏该遍历(例如parentNode字段被重命名),#6820 的 WASM 崩溃会在没有测试告警的情况下悄然回归。建议修复:添加一个集成测试,在条件渲染的父容器中渲染
<Static>组件,切换关闭父容器,并触发下一次渲染周期以确认不会崩溃。— qwen3.7-max via Qwen Code /review
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Valid suggestion. The regression test for this exact scenario (unmounting an ancestor of and confirming the renderer survives) exists in the ink fork and has been proposed upstream in vadimdemedes/ink#979.
For qwen-code, adding an integration test that exercises the patched reconciler through our own component tree (e.g. toggling transcriptFreeze) would be a good follow-up. The test would need to render via ink actual reconciler (not mocked) to exercise the yoga WASM path.