Skip to content

fix: prevent child delimiter add from submitting form - #17421

Merged
wangq8 merged 1 commit into
infiniflow:mainfrom
euvre:fix/child-delimiter-add-button
Jul 27, 2026
Merged

wangq8 merged 1 commit into
infiniflow:mainfrom
euvre:fix/child-delimiter-add-button

Conversation

@euvre

@euvre euvre commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

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:

  • Ran the targeted ESLint check for web/src/pages/agent/form/token-chunker-form/index.tsx.
  • Pre-commit checks passed (web dependencies, Prettier, and ESLint).

@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. 🐞 bug Something isn't working, pull request that fix bug. 🧰 typescript Pull requests that update Typescript code labels Jul 27, 2026
@euvre euvre added the ci Continue Integration label Jul 27, 2026
@coderabbitai

coderabbitai Bot commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 34e3cf9d-08b5-4bb6-9fc6-90fac403bfe2

📥 Commits

Reviewing files that changed from the base of the PR and between cd846cc and b4bf442.

📒 Files selected for processing (1)
  • web/src/pages/agent/form/token-chunker-form/index.tsx

📝 Walkthrough

Walkthrough

The token chunker form’s delimiter-add button now explicitly uses type="button" to prevent form submission when adding entries.

Changes

Token chunker form

Layer / File(s) Summary
Delimiter add button behavior
web/src/pages/agent/form/token-chunker-form/index.tsx
The BlockButton for adding children_delimiters entries now declares type="button".

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested reviewers: cike8899

Poem

A bunny taps the button bright,
No form submits and takes to flight.
Delimiters grow, one by one,
The add-click keeps its gentle fun.
Hop, hop—safe actions done!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: making the child delimiter add button stop submitting the form.
Description check ✅ Passed The description matches the required Summary section and includes useful validation context.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@euvre
euvre requested a review from wangq8 July 27, 2026 07:40

@wangq8 wangq8 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 BlockButton is indeed rendered inside a <form> context (the outer FormWrapper)
  • The adjacent "Remove" Button already has type="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!

@wangq8
wangq8 requested a review from dcc123456 July 27, 2026 09:32
@wangq8
wangq8 merged commit f6464c9 into infiniflow:main Jul 27, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 bug Something isn't working, pull request that fix bug. ci Continue Integration size:XS This PR changes 0-9 lines, ignoring generated files. 🧰 typescript Pull requests that update Typescript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants