fix(custom-tool): restore modal body scroll so Save stays reachable#5321
Conversation
The Edit/Create Agent Tool modal clipped its footer (Save/Update) and could not scroll with long code or schema content. Root cause: #4354 migrated the modal to ChipModal and changed the body from a scroll region (flex-1 overflow-y-auto) to flex-none overflow-visible so the hand-positioned EnvVar/Tag autocompletes could spill past it. That removed the scroll region, so tall content grew the body past the modal's max-h-[84vh] cap and the overflow-hidden surface clipped the footer. Restore ChipModalBody as the scroll region (its documented behavior) and switch the EnvVar/Tag dropdowns to portaled inputRef caret-anchoring, matching the canonical Function-block editor, so they anchor to the caret in a portal and are never clipped by the scroll boundary.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview
Reviewed by Cursor Bugbot for commit d90dde9. Configure here. |
Greptile SummaryThis PR fixes the custom tool modal so long content can scroll without hiding the footer. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (3): Last reviewed commit: "fix(custom-tool): keep dropdown anchors ..." | Re-trigger Greptile |
Review follow-up. The autocomplete popovers already portal their menus (never clipped by the body's scroll boundary), so the fix is only to restore the body as the scroll region. Reverting the dropdowns to their content-relative absolute anchors keeps them glued to the caret while the body scrolls; the caret-viewport inputRef anchoring used fixed viewport coordinates that only refreshed on edits, detaching the menu on scroll.
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit d90dde9. Configure here.
|
@greptile the schema-param menu anchors to a |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit d90dde9. Configure here.
Summary
ChipModaland changed the body from a scroll region (flex-1 overflow-y-auto) toflex-none overflow-visibleso the hand-positioned EnvVar/Tag autocompletes could spill past it. That removed the scroll region, so tall content grew the body past the modal'smax-h-[84vh]cap and theoverflow-hiddensurface clipped the footer.ChipModalBodyas the scroll region (its documented behavior — header/footer stay pinned), and switch the EnvVar/Tag dropdowns to portaledinputRefcaret-anchoring, matching the canonical Function-block editor (code.tsx), so they anchor to the caret in a portal and are never clipped by the scroll boundary.Type of Change
Testing
Tested manually;
tsc, biome, and the tool-input test suite (47 tests) pass.Checklist