fix: search children of disabled tree nodes - #684
Conversation
|
@nrps9909 is attempting to deploy a commit to the React Component Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review. WalkthroughChanges搜索结果子节点选择
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This localized change allows search to reach selectable descendants beneath disabled or non-selectable parents, with the documented regression and validation checks passing; no actionable merge-blocking risk remains. Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2 files. ✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
selectable={false}Fixes #652.
Why
getFirstMatchingNodepreviously usedcontinuefor a disabled or non-selectable node. That skipped the node's entire subtree, so an enabled matching child could be rendered in search results without becoming active or selectable through Enter.The updated traversal only excludes the parent itself as a candidate. It still descends into the parent's children, while the existing Enter handler continues to enforce disabled and selectable guards on the active node.
Verification
npm run tscnpm run lint(0 errors; 6 existing warnings)npm run compilegit diff --checkAI assistance disclosure: Codex was used to trace the active-node traversal, construct the exact-base regressions, implement the focused fix, and run the verification commands. I reviewed and verified the source diff, failure reproduction, and test results.
Summary by CodeRabbit