litellm/ui/litellm-dashboard/src
yuneng-jiang aa90828811
refactor(ui): migrate prompt, UI access, plugin and MCP filter forms to react-hook-form and shadcn (#37297)
* refactor(ui): migrate prompt, UI access, plugin and MCP filter forms to react-hook-form and shadcn

Moves four more admin dashboard forms off antd Form onto react-hook-form with the
shared shadcn form kit, keeping the submitted payload byte-identical in every case.

Each form was pinned with a characterization test proven green against the antd
original before any production code changed, then re-run unedited afterwards.

Behaviours that needed reproducing by hand rather than falling out of the port:

- antd onFinish reports only mounted fields, so UIAccessControlForm blanks a seeded
  but hidden restricted_sso_group at submit time instead of sending it
- antd InputNumber returns null on empty and clamps on blur, so MCPSemanticFilterSettings
  keeps top_k as null when cleared and clamps to [1, 100] rather than sending "" or NaN
- PluginSettings seeds plugin_key blank on edit so an untouched save preserves the
  stored credential instead of overwriting it with the redacted placeholder
- antd's url rule and zod's .url() disagree in both directions, so the async-validator
  pattern is ported verbatim to avoid silently changing which URLs are accepted

Forms with no onFinish keep preventDefault so no Enter-to-submit is introduced, and
the plugin key regains a reveal toggle built on InputGroup.

* chore(ui): prune stale eslint suppressions left by concurrent form-migration PRs

* Revert "chore(ui): prune stale eslint suppressions left by concurrent form-migration PRs"

This reverts commit e36bcc5862.

* fix(ui): keep the embedding model unclearable, matching the antd Select

The antd Select for embedding_model had no allowClear, so an admin could never
empty it. SearchSelect renders a clear button whenever a value is set and emits
an empty string, so the migration silently added a way to persist an empty
embedding_model and break semantic filtering.

Adds an opt-out to SearchSelect that defaults to the current behaviour, leaving
the other twenty callers unaffected, and opts this one field out. Pinned with a
test that fails when the opt-out is removed.
2026-08-18 18:47:06 +00:00
..
app refactor(ui): migrate prompt, UI access, plugin and MCP filter forms to react-hook-form and shadcn (#37297) 2026-08-18 18:47:06 +00:00
components refactor(ui): migrate prompt, UI access, plugin and MCP filter forms to react-hook-form and shadcn (#37297) 2026-08-18 18:47:06 +00:00
contexts refactor(ui): move dashboard toasts from antd message/notification onto sonner (#37207) 2026-08-17 18:22:41 -07:00
data feat(ui): shadcn migration foundation: Tailwind v4, shadcn init, antd cascade fix (#31995) 2026-07-02 19:02:27 -07:00
hooks refactor(ui): codemod every toast call site onto lib/toast and delete the antd-era facades (#37253) 2026-08-18 18:24:49 +00:00
lib refactor(ui): migrate guardrail and vector store forms to react-hook-form and shadcn (#37306) 2026-08-18 18:44:15 +00:00
utils refactor(ui): codemod every toast call site onto lib/toast and delete the antd-era facades (#37253) 2026-08-18 18:24:49 +00:00
autorouter_presets.json feat(ui): add Lite mixed-provider auto-router preset (#37068) 2026-08-17 10:07:01 -07:00
types.ts added and ran prettier autoformatter 2025-10-04 18:19:48 -07:00