Skip to content

refactor(frontend): SchemaForm and SubscriptionForm off antd Form - #5891

Draft
ardaerzin wants to merge 1 commit into
pkg/settings-tools-triggersfrom
pkg/entity-ui-form-engine
Draft

refactor(frontend): SchemaForm and SubscriptionForm off antd Form#5891
ardaerzin wants to merge 1 commit into
pkg/settings-tools-triggersfrom
pkg/entity-ui-form-engine

Conversation

@ardaerzin

Copy link
Copy Markdown
Contributor

SchemaForm and SubscriptionForm move from antd's Form onto @rc-component/form — the same
engine antd itself uses, without the antd component layer. That is what makes the Tools and
Triggers drawers renderable on /m, which the lane two above depends on.

Read this one carefully. SchemaForm is the form the chat runtime drives for elicitation, and
nothing in this stack has been run in a browser. Five files, but the blast radius is the
elicitation path.
Not run in a browser — static gates only (pnpm lint-fix 24/24, tsc --noEmit clean
for @agenta/shared, ui, entities, entity-ui, settings-ui, oss, ee, mobile).

Stacked on pkg/settings-tools-triggers; review only this lane's diff.

@ardaerzin

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Rate Limit Exceeded

@ardaerzin have exceeded the limit for the number of chat messages per hour. Please wait 52 minutes and 45 seconds before sending another message.

@vercel

vercel Bot commented Aug 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agenta-documentation Error Error Aug 11, 2026 5:11am

Request Review

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 11398f80-4cbc-4352-98d3-42d0f807a1f5

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Summary by CodeRabbit

  • Improvements
    • Updated gateway configuration forms with a lighter, compatible form experience.
    • Added field binding, initial values, validation rules, labels, required-state indicators, and validation error display.
    • Preserved existing configuration prefilling and raw-value change handling across schema and subscription forms.
    • Improved support for nested and list-based form fields.

Walkthrough

The PR adds an @rc-component/form field wrapper and migrates SchemaForm and SubscriptionForm from Ant Design form APIs.

Changes

Gateway form migration

Layer / File(s) Summary
Form dependency and field wrapper
web/packages/agenta-entity-ui/package.json, web/packages/agenta-entity-ui/src/gatewayTool/components/FormItem.tsx
Adds @rc-component/form and introduces FormItem with field binding, validation, labels, initial values, configurable value props, and error rendering.
Schema form field migration
web/packages/agenta-entity-ui/src/gatewayTool/components/SchemaForm.tsx
Replaces Ant Design form hooks and field components with @rc-component/form, FormItem, and List across scalar, nested, and array fields.
Subscription form hook migration
web/packages/agenta-entity-ui/src/gatewayTrigger/drawers/subscription/SubscriptionForm.tsx
Uses the standalone useForm hook for subscription configuration form instances.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: moving SchemaForm and SubscriptionForm away from antd Form.
Description check ✅ Passed The description directly explains the form refactor, its purpose, scope, validation status, and affected components.
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.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch pkg/entity-ui-form-engine

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.

@ardaerzin

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

antd's Form IS @rc-component/form — antd wraps it and adds the label/error chrome
and its theming. So this is a swap of the wrapper, not a rewrite of the engine:
name paths, rules, initialValue, valuePropName, validateFields, Form.List and
useWatch all keep working because it is the same implementation underneath.

The chrome comes back as FormItem, a small shim over rc's Field that draws label
and error with @agenta/ui's Field. That component carries no antd and needs no
ConfigProvider, which is the whole point: these forms can now render on a host
that forbids antd instead of falling back to antd's light theme.

`form: FormInstance` stays cross-package public API. antd's instance is
structurally rc's, so web/oss ElicitationWidget keeps driving it unchanged — tsc
confirms across oss, ee and mobile.

antd's List handed each row a fieldKey/isListField pair that only its Form.Item
consumed; rc's Field needs neither, so that passthrough is gone.

Neither gateway tree imports antd now, which unblocks turning off `readOnly` for
Tools and Triggers on /m — not done here, since the drawers deserve a real look
in a browser first.

Gates: lint 24/24, tsc 0 across entity-ui, settings-ui, oss, ee and mobile.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant