Skip to content

Fix: The operator field of the compiler operator is a required field. - #18212

Merged
wangq8 merged 2 commits into
infiniflow:mainfrom
cike8899:fix-0.27
Aug 13, 2026
Merged

wangq8 merged 2 commits into
infiniflow:mainfrom
cike8899:fix-0.27

Conversation

@cike8899

Copy link
Copy Markdown
Contributor

Summary

Fix: The operator field of the compiler operator is a required field.

@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. 🐞 bug Something isn't working, pull request that fix bug. 🧰 typescript Pull requests that update Typescript code labels Aug 13, 2026
@cike8899
cike8899 requested a review from wangq8 August 13, 2026 06:53
@cike8899 cike8899 added the ci Continue Integration label Aug 13, 2026
@cike8899
cike8899 marked this pull request as draft August 13, 2026 06:53
@cike8899
cike8899 marked this pull request as ready for review August 13, 2026 06:53
@coderabbitai

coderabbitai Bot commented Aug 13, 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: 3886cabe-d5cd-4353-9e8a-c343017c6a73

📥 Commits

Reviewing files that changed from the base of the PR and between 7e536c7 and 9043749.

📒 Files selected for processing (4)
  • web/src/components/compilation-template-form-field.tsx
  • web/src/locales/en.ts
  • web/src/locales/zh.ts
  • web/src/pages/agent/form/compilation-form/index.tsx

📝 Walkthrough

Walkthrough

The compilation template field is now required in the UI and form schema. English and Chinese validation messages were added. The schema now uses a translation-aware hook.

Changes

Compilation template validation

Layer / File(s) Summary
Localized schema validation
web/src/pages/agent/form/compilation-form/index.tsx, web/src/locales/en.ts, web/src/locales/zh.ts
The form uses useFormSchema() with a required compilation_template_group_id and localized validation messages.
Required field configuration
web/src/components/compilation-template-form-field.tsx
The compilation template form item is marked as required.

Estimated code review effort: 2 (Simple) | ~10 minutes

Mergeability Score: ⚪ Minimal · up to 90437

The compiler operator form enforces a non-empty operator field while retaining localized validation and required-field wiring; no actionable merge-blocking risk remains beyond normal checks.

Suggested reviewers: jinhai-cn, dcc123456

Poem

I’m a rabbit guarding the form today,
The template must hop into place.
English and Chinese messages bloom,
While schemas translate in the room.
Required fields now lead the way.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
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.
Title check ✅ Passed The title clearly describes the main change: making the compiler operator field required.
Description check ✅ Passed The description includes the required Summary section and clearly states the purpose of the change.

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.

@wangq8 wangq8 mentioned this pull request Aug 13, 2026
1 task done

@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.

Makes the compiler operator field required — reasonable and matches the intent. The new compilationTemplateRequired key is correctly placed under knowledgeConfiguration (next to compilationTemplate), and the useFormSchema hook resolves it via useTranslation() in the right namespace. A few notes:

  1. Merge conflict with #18216. Both PRs rewrite FormSchema in web/src/pages/agent/form/compilation-form/index.tsx and touch the same locale blocks (en.ts/zh.ts). This PR keeps plan, #18216 replaces plan with mode. Coordinate merge order; the second one to land will need a rebase.

  2. FormSchema recreated every render. Moving it into useFormSchema() means a new schema (and zodResolver) is built on each render. Functionally fine with react-hook-form, but consider wrapping in useMemo to avoid churn.

  3. Hardcoded required on CompilationTemplateFormField. It's currently only used in compilation-form (verified), so this is fine today — but if the component is ever reused for an optional field, the unconditional required will be wrong. Consider making it a prop defaulting to false.

  4. Minor: the zh.ts/en.ts diff also carries unrelated formatter reformats (missing_name, ttsTip), harmless noise.

LGTM once the merge-order conflict with #18216 is acknowledged.

@wangq8
wangq8 merged commit 75bb42c into infiniflow:main Aug 13, 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:M This PR changes 30-99 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