Repository navigation
Fix: Clicking the agent's code tool node is prohibited. - #18165
Conversation
|
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)
📝 WalkthroughWalkthroughThe change makes Code tools non-interactive in the canvas and non-editable in the agent tool form. Other tools retain their existing click and edit behavior. ChangesCode tool interaction rules
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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 |
wangq8
left a comment
There was a problem hiding this comment.
LGTM. Clean fix with clear rationale.
The approach is correct: since Code has no config form, making its cards non-interactive by stripping data-tool, data-tool-id, and cursor-pointer attributes is the right solution — the node click handler will correctly ignore clicks on Code cards. The edit prop becoming optional in ActionButton and conditionally rendering the pencil icon only when edit is provided is a clean pattern.
One minor note for future cleanup: the setClickedToolId removal from the destructured useGraphStore() call in tool-node.tsx suggests nothing else in that component uses it. Worth a quick check to confirm it is not needed elsewhere in the same component — but from the diff this looks safe.
Nice work.
Summary
Fix: Clicking the agent's code tool node is prohibited.