Repository navigation
fix: prevent child delimiter add from submitting form - #17421
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 (1)
📝 WalkthroughWalkthroughThe token chunker form’s delimiter-add button now explicitly uses ChangesToken chunker form
Estimated code review effort: 1 (Trivial) | ~2 minutes Suggested reviewers: 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.
Review: PR #17421 — fix: prevent child delimiter add from submitting form
Verdict: LGTM ✅
This is a clean one-line fix. The BlockButton element inside the Token Chunker form (which itself lives inside a <form>) defaults to type="submit". Adding type="button" prevents the click from submitting the parent dataset settings form, which was causing a page refresh and blocking users from adding child delimiters.
Verified:
- The
BlockButtonis indeed rendered inside a<form>context (the outerFormWrapper) - The adjacent "Remove"
Buttonalready hastype="button"— this fix brings the "Add" button in line - No regressions possible — this only restricts default button behavior
Details:
- Files changed: 1
- Additions: 1, Deletions: 0
- Author: euvre
Nice catch!
Summary
Fixes the child delimiter Add button in the dataset configuration Token Chunker form by setting it to
type="button". This prevents the click from submitting the outer dataset settings form, refreshing the page, and blocking users from adding child delimiters.Validation:
web/src/pages/agent/form/token-chunker-form/index.tsx.