The antd form reset on [form, actualSchema, tool], so it reseeded whenever
the schema changed and not only when a different tool was picked. Keying the
migrated form's remount on tool.name alone narrowed that: a same-named tool
whose schema changed would have kept its old indexed values and submitted
them under the new schema's keys, and any field the new schema added would
never get its default. The key now covers the schema content as well.
Reachability, so nobody reads more into this than is there: selectedTool is a
state snapshot set on click, so this is not reachable through the current
parent. It is a latent divergence rather than a live bug, and it is fixed
because the contract for this migration is zero functional change.
The schema default helpers move into the pure module beside the other
argument logic. They arrived carrying the original's explicit any and built
their result by mutating it; they are now typed with unknown, built by
spread, and covered directly by unit tests rather than only through a render.
Also takes the last five hardcoded neutrals onto tokens. The earlier pass
scanned the gray family only and did not see the slate ones in the tool name
chip, which had no dark variant. Counting colour utilities that have no
dark: counterpart reads 0 for this file now, against 64 before the migration.
The Base UI combobox only renders a selected value that is present in its
item list, so the port synthesizes an item for the current value when the
search results no longer contain it. That synthetic item carried an empty
user, and selecting it ran the same handler as a real result, wiping both
the email and the user id before submit.
The synthetic item now carries no user at all and the select handler
ignores it, so reselecting the value already in the field leaves both
identity fields alone. antd needed none of this: its Select renders a
value that is absent from its options.
The team create and edit forms send a different set of keys depending on
which collapsible sections the user opened, because a closed section is
unmounted and its values never reach the request. Nothing covered that,
so a form rewrite could change the request body without failing a test.
Pins the exact key set the create form sends with every section closed,
the keys Additional Settings adds once opened, and that a value typed
then re-hidden is dropped while a reopened one is restored. Does the same
for the team member and search tool sections on the edit form, asserting
absence at the wire level rather than just comparing values.
Also hardens two option queries in the member modal suite onto the option
role, and lifts the duplicated mock seeding in the team info suite into
one function both blocks call.
* test(ui): raise vitest test and hook timeouts for CI headroom
The UI unit suite runs about 3x slower on the CI runner than locally, which
put the slowest cases right on the 30s per-test limit. TeamInfo's pass
through routes case takes ~8s locally and has been failing on staging at the
timeout across consecutive runs even though it passes reliably when run
directly.
Raise testTimeout to 60s and set hookTimeout to 30s so the current slow cases
have headroom. This is a stopgap while the suite gets split into proper tiers,
not a fix for the underlying per-test cost.
* test(ui): query agent form panels with findByRole like the rest of the file
The panel helper was the only synchronous query in add_agent_form's
integration test; every other lookup already retries via findBy. On the CI
runner the second case has been failing with "Unable to find an accessible
element with the role button and name /Cost Configuration/" against a modal
whose body had not rendered.
Make the helper retry like its siblings and await it at each call site.
The tool test panel drove its argument fields through an antd Form, so the
call payload was whatever rc-field-form happened to have mounted. It now runs
on react-hook-form with shadcn controls, and the payload itself lives in
toolCallArguments.ts as a pure function of the schema fields plus the entered
values.
Fields bind by index rather than by name, because an MCP tool's JSON schema
can name a property anything: a key containing a dot would be one flat key to
antd but a nested path to react-hook-form. Binding to args.0, args.1 and
zipping back to the real keys at submit time keeps the emitted arguments
identical whatever the server calls its properties.
Coercion, the blank filter, the required and JSON rules, and the params
wrapper for nested-object schemas all keep their previous behaviour, and the
neutral colours in the panel move onto tokens so it reads correctly in dark
mode.
* refactor(ui): move the admin, SSO, SCIM, alerting and fallback forms off tremor
Swaps the tremor Button, Card, Callout, Grid, Divider, Text, Title, TextInput, Table parts, Badge, Icon and Switch in these nine files for the shadcn layer and lucide icons, keeping antd in place. The SCIM create-token button keeps an explicit type="submit"; the two SCIM copy buttons sit outside the antd form so they stay plain buttons, and the alerting form's Enterprise Feature upsell button is a link wrapper rather than a save action, so it deliberately stays type="button" while the form keeps its own Update Settings submit. The teal login callout on the admin panel maps to the info Alert variant since no teal variant exists. Prunes the nine tremor no-restricted-imports suppressions these files no longer need.
* fix(ui): keep the alerting settings name column left aligned
tremor's TableCell hardcoded text-left, so the align="center" attribute never took effect. The shadcn cell has no text-align of its own, so translating that attribute into text-center would have centered the field name and its description for the first time.
* fix(ui): restore the CloudZero key reveal toggle and the SCIM divider gap
tremor's TextInput drew its own show/hide button whenever the type was
password and the field was not disabled, so the straight pass-through to
the plain shadcn Input silently deleted that affordance from the CloudZero
API key field. Rebuilds it with the InputGroup reveal pattern that
email_settings.tsx already uses, behind a small local control so the antd
Form.Item keeps its id, value and onChange wiring and the field still
matches its shadcn sibling in the same form.
Also puts the SCIM separator back on my-6: tremor's Divider was
"w-full mx-auto my-6", and the conversion shipped my-4, tightening that
gap by 8px on each side. The disabled SCIM token field stays a bare Input
because tremor suppressed its toggle when disabled too.
The selector takes value and onChange, which is exactly what lets it sit
inside both an antd Form.Item and a react-hook-form FormField, so the doc
bullet naming only antd was about to describe half the truth. The props
interface already states the contract.
That bullet was also the only Form.Item match in the file, and it has twice
inflated the migration's canonical tag count, which now needs no subtraction.
Its four hardcoded colours move to tokens for the same reason as the rest of
the sweep. Its antd Select stays.
The agent forms moved to react-hook-form in #37357, which deliberately kept
the antd Select for the agent type picker because its dropdownRender footer
and two-tier options have no shadcn equivalent. The Form.Item wrapped around
it survived as a side effect rather than for that reason: it carries no name
and no rules, and the file renders no antd Form at all, so it bound nothing
and validated nothing.
It was also the only label in the file rendering antd's required asterisk,
while AgentFormField renders genuinely required fields without one. Moving it
to the file's own Field, FieldLabel and labelWithHint makes it match, and
gives the label a control to point at.
The shared alias editor was light-only: 18 hardcoded palette classes across
its headings, table cells, config preview and five raw controls, so it read
grey-on-grey against the dark dashboard theme.
Its five buttons also carried no type attribute, and all three consumers
render it inside a real antd Form with an onFinish. Measured against the
pre-change file in jsdom with a liveness gate on both sides: clicking Add
Alias fired the parent's onFinish once, and a row action fired it once more.
So editing a model alias inside the create-team, team-update or create-key
form also submitted that form. shadcn Button renders type="button", which
closes the path.
Swapping the raw input and button elements for the shadcn primitives is what
makes the colours resolve, since a bare element needs the whole token set
hand-written to work in both themes.
`items` feeds `hasNullItemLabel` as well as label resolution, and that
selector decides whether `Select.Value` renders the placeholder. None of
the twenty fixed sites has a null-valued item, so their placeholders are
unchanged, but nothing pinned that.
Cover both halves: the placeholder still renders when nothing is
selected, and a null-valued entry in `items` takes over from it. The
second case is the trap to avoid when adding `items` to a Select that
relies on its placeholder.
Base UI's Select.Value resolves an option's label only when the root
carries an `items` prop or the Value has a child. `resolveSelectedLabel`
in @base-ui/react/internals/resolveValueLabel.js falls through every
branch to `stringifyAsLabel(value)` otherwise, and `state.items` is
written only from the root's `items` prop, so the `<SelectItem>` children
rendered inside `<SelectContent>` never populate it.
A self-closing `<SelectValue />` on a root without `items` therefore
renders the raw value once something is selected. The placeholder branch
still works, so the trigger looked right until the user picked an option
and then showed `development` for Development, `LiteLLM_VerificationToken`
for Keys, `all` for All Actions, and `24h` for Daily.
Pass `items` at the 20 affected sites, using the array form the other 52
call sites already use. Where a literal option sat alongside mapped ones,
build one array and map the options over it so the labels and `items`
cannot drift.
The record-map form is avoided deliberately: `items[value]` on an object
literal reaches Object.prototype, so a dynamic value named `toString`
would resolve to a function and React would throw on it. The array form
matches with `.find` and has no prototype lookup, which matters where the
values are user-supplied model groups, team ids and key aliases.
Also replace the option lookup in CompetitorIntentConfiguration's test
helper, which searched by text and clicked the last match. That match is
now ambiguous because the trigger carries the label too, and the helper
already flaked roughly one run in six before this change.
Ports user_search_modal from antd Form to react-hook-form plus the shadcn
kit, keeping the antd Modal and Alert shells. Payload parity was proven by
rendering the antd original beside the migration in one describe.each: an
untouched submit yields the same three keys with the identity fields
undefined, and picking an option yields the same email and id on both sides.
antd Select swallows Enter, so the original never submitted from a field.
The Base UI combobox does not, which added an Enter-to-submit path; the
inputs now swallow Enter and both sides measure zero submits from every
field with one from the button.
* refactor(ui): move the budget, cache, cost tracking and playground forms off tremor
Swaps tremor Accordion for the Base UI Collapsible, TextInput for the shadcn Input and the two
tremor Buttons for the shadcn Button across the budget modals, cache settings, the cost tracking
add-provider and add-margin forms and the playground model selector. The accordion bodies keep
tremor's unmount-when-closed semantics, since headless-ui's Disclosure.Panel and Base UI's panel
both default to unmounting, so the antd fields inside behave exactly as before.
The two cost tracking buttons are the one deliberate behaviour change. tremor's Button renders a
bare button with no type, so inside the antd Form that wraps both components it was an implicit
submit on top of its own onClick. For the discount form that meant every click ran
handleAddProvider twice, once from onClick and once from the form's onFinish, and for the margin
form the submit did nothing at all because that Form has no onFinish. The shadcn Button forces
type="button", so the add now fires once from onClick alone and no type="submit" is added back.
The three inputs that used onValueChange now read e.target.value, and each one gained a test that
types into it and asserts the reported string, so the wiring cannot silently regress. The cache
settings suite gained a collapse contract test that the advanced sections are absent until the
section is expanded. Prunes the six no-restricted-imports suppressions these files no longer need,
each dropping from two to one for the antd import that stays.
* fix(ui): keep enter to submit on the cost tracking add forms
The shadcn Button forces type="button", so converting the two tremor buttons left both cost
tracking modals with no submit button at all. Each form still holds two fields that block
implicit submission, the provider select's search input and the value input, so pressing Enter
stopped adding anything. Both buttons get type="submit" back.
For the discount modal that alone would restore the double add the conversion had just removed,
since a submit also ran the form's onFinish, so the parent drops onFinish and the now dead
handleFormSubmit. Click and Enter both go through onClick exactly once. The margin form's parent
never had an onFinish, so restoring the submit type there is enough on its own.
Adds three cases to the cost tracking settings suite: the discount add fires once from a click,
the discount add fires once from Enter, and the margin add fires once from Enter. Dropping either
type="submit" kills the Enter cases and putting onFinish back makes both discount cases see two
calls. Also drops the two empty placeholders on the budget modals that only existed to suppress
tremor's "Type..." default.
* fix(ui): restore Enter-to-submit on the margin modal
The tremor Button rendered a bare native button, which defaults to
type="submit", so Enter in the percentage field submitted the margin
modal. The shadcn Button wraps Base UI, which defaults to type="button",
and the migration also replaced the margin modal's form element with a
plain div, so Enter went inert while the visually identical discount
modal kept working.
Give the margin modal the same form wrapper the discount modal already
has and mark its action button as the submit button. Also move the cache
settings advanced-section test into the integration file, where a test
that renders the real component tree belongs.
* refactor(ui): move the teams page and team detail views off tremor
Swaps the tremor Accordion, Badge, Button, Card, Grid, Text, TextInput and
Title usages in Teams.tsx, TeamInfo.tsx, EditMembership.tsx and
LoggingSettings.tsx for the shadcn layer. The team model badge colour map
becomes a variant map: all-proxy, direct and access-group chips render as
secondary and no-default as outline, so the kind is now conveyed by the
tooltip rather than by hue. The LoggingSettings top decoration is drawn with
border-t-4 border-t-blue-500 and its light red Remove button becomes a ghost
button with red text. antd stays in place for this pass and the eslint
no-restricted-imports counts for the four files ratchet down by one each.
* fix(ui): keep the password reveal and model badge hues in the team views
The tremor TextInput rendered a show/hide button for every password field, so
the shadcn swap silently dropped it for the sensitive logging parameters. The
password branch now renders an InputGroup with an eye toggle, matching the
pattern email settings already uses, and a test pins the masking.
The team model chips go back to four distinct colours by way of the shared
StatusBadge, so a directly granted model still reads differently from an
access group one without hovering for the tooltip.
The hand-drawn blue accent on the logging integration card is dropped: the
tremor decoration it replaced never rendered, because the caller's own border
classes won the class merge, so the bar was new rather than preserved.
* fix(ui): drop the dead empty placeholder on the team name field
The team name input carried placeholder="" only to suppress tremor
TextInput's default "Type..." hint. shadcn Input has no default
placeholder, so the empty string does nothing and the field now relies on
its label, matching the other converted create-team fields.
Removes one named callback from a team and leaves the team's other callbacks
registered and firing. Before this, the only removal route was
POST /team/{team_id}/disable_logging, which clears every callback at once, so a
tenant sharing a team could not deregister its own integration
The handler filters metadata["logging"], keeps the survivors encrypted, refreshes
the cached team so the removal applies to keys that are already live, and emits a
redacted audit row, matching what the add and disable routes do
Resolves LIT-5161
* refactor(ui): move the add model and credential forms off tremor
TextInput becomes the shadcn Input, Text becomes a sized paragraph, the
advanced settings Accordion becomes a bordered Collapsible, and the
Team-BYOK Switch moves to the Base UI switch with onCheckedChange plus an
aria-label. That switch stays wrapped in a span so the antd Tooltip still
shows on hover while it is disabled for non-premium users, matching what
the tremor wrapper div did. provider_specific_fields keeps antd's
Input.TextArea through an AntdInput alias so its antd import stays a single
statement. Prunes the tremor no-restricted-imports suppressions these files
no longer need.
* fix(ui): keep the reveal toggle on the provider secret fields
tremor's TextInput drew its own show/hide button whenever the type was
password, and the shadcn Input is a plain native input, so every provider
secret this form renders (API keys, client secrets, and the same fields
inside the add credential modal) lost that affordance.
Puts the password branch on antd's Input.Password, which is what the other
dynamic credential forms in the dashboard already use, so the reveal comes
back and the antd Form.Item wiring stays untouched. The control chain moves
into an early-return helper, which keeps the extra branch from pushing the
file past its no-nested-ternary budget and drops that count from 5 to 3.
* refactor(ui): move the virtual key create and edit forms off tremor
Swaps the tremor primitives in the create-key modal, the key edit view and
their two shared field components for the in-repo shadcn layer: Accordion
becomes Collapsible, Grid/Col become grid divs, Text/Title become real
paragraphs and headings, and TextInput becomes the shadcn Input. antd stays
where it already was, so the antd Input keeps rendering the textareas and
hidden fields under the AntdInput alias.
Two behavioural notes. The key edit view's Save Changes button keeps saving
because it carries an explicit type="submit"; Base UI's button otherwise
defaults to type="button". Its Cancel button now really is type="button",
where the tremor one had no type at all and so submitted the form on top of
calling onCancel, and a test pins that.
Base UI's Collapsible panel unmounts while closed exactly like the headless
Disclosure panel tremor wrapped, so the create-key tests now open Optional
Settings before querying inside it instead of relying on a tremor mock that
flattened every accordion.
* refactor(ui): hoist the create-key collapsible header classes and keep optional settings a heading
Names the repeated Collapsible trigger and chevron class strings the way the
cost tracking conversion does, since nine copies of each lived in this one
file, wraps the Optional Settings trigger in an h3 so the section keeps a real
heading next to Key Ownership and Key Details, and drops the placeholder=""
that only ever existed to suppress tremor's default hint.
* feat(vector_stores): add Valkey as a managed vector store provider
Adds a valkey provider for managed vector stores, searchable via the
valkey-search module over RESP. Introduces BaseDirectVectorStoreConfig
for datastores that execute searches directly instead of building an
HTTP request, and refactors the valkey semantic cache to share the new
connection URL helper. Registered in the provider enum, router params,
proxy config registry, Admin UI Add Vector Store modal, and provider
endpoint support matrix.
* fix(vector_stores): join list queries and bound valkey socket timeouts
Review feedback: multi-string queries are now space-joined like every
other embedding-based provider instead of dropping all but the first,
and the request timeout is threaded through the direct vector store
interface into bounded socket_connect_timeout / socket_timeout values
on both redis clients so an unreachable Valkey host cannot pin proxy
workers until the OS TCP timeout.
* chore(ui): regenerate schema.d.ts for valkey vector store fields
* docs(ui): make the Valkey vector store setup note and field tooltips explicit
* feat(ui): pick the Valkey embedding model from the proxy's models like Milvus
* fix(ui): number the setup steps in the vector store provider alerts
An internal user who administers an organization saw an empty
Organization Usage dashboard and had to be promoted to proxy admin to
see any of it.
Two independent gates were closed on them. The route layer rejected
GET /organization/daily/activity with 401 before the handler ran, since
the route belonged to no list a non-proxy-admin can reach, and the
handler's own org-admin scoping was therefore dead code. In the
dashboard, viewOrganizationUsage was granted by session role alone, and
an org admin's session role is internal_user, so the Organization Usage
option never rendered and its data fetch stayed disabled.
The route now sits in self_managed_routes, where the handler restricts
results to organizations the caller is ORG_ADMIN of and 403s on any
other org, and viewOrganizationUsage joins the existing per-capability
org-admin allowance that already covers viewDeletedTeams.
A caller who administers no organization resolves to an empty id list
rather than to None, so the organization-alias lookup is scoped by that
same list instead of reading the whole table.
The Usage page falls back to the global view when org-admin membership
is revoked while it is open, so the selector never keeps a value it no
longer offers.
* refactor(ui): migrate the MCP per-user env vars modal to react-hook-form and shadcn
Moves UserEnvVarsModal off the antd Form store onto react-hook-form with a
zod schema built from the server's declared per-user variables, and swaps
antd Input.Password for the shared PasswordInput.
The submit payload is unchanged: every declared variable is still sent as a
key, trimmed, with an untouched field sending an empty string. antd reset
the store from the modal's afterOpenChange; the migrated form reproduces
that by remounting on the same callback, so reopening still starts blank.
Adds UserEnvVarsModal.test.tsx, which was written against the antd original
and proven green before any production change, then re-run unedited against
the migration. Two further cases cover the reveal toggle, which antd
provided through visibilityToggle.
* refactor(ui): migrate the MCP toolset create and edit form to react-hook-form and shadcn
Moves the toolset name and description fields off the antd Form store onto
react-hook-form with a zod schema, and takes the surrounding panel onto
semantic colour tokens so the tab renders in dark mode. The purple selected
tool styling keeps its hue and gains dark variants rather than flattening
to neutral.
Payload is unchanged: create still sends toolset_name, description and
tools, an untouched description is still the empty string rather than
undefined, and the tool selection is still held outside the form. The antd
form carried no onFinish and its buttons sit outside the form element, so
the migrated form keeps submit on the footer button and neutralises its own
submit rather than introducing Enter to save.
Adds MCPToolsetsTab.test.tsx, proven green against the antd original before
any production change and re-run unedited afterwards.
* refactor(ui): migrate the MCP tool arguments form to react-hook-form and shadcn
Moves the schema-driven tool argument form off the antd Form store onto
react-hook-form. Validation moves to an explicit resolver that reproduces
antd's rules field by field, including the per-field required message and
the JSON object and array messages, and the same resolver is reused by
getSubmitValues so the imperative path and the rendered errors cannot
disagree.
getSubmitValues still rejects with a plain object carrying errorFields
rather than an Error. ChatUI branches on `err instanceof Error` to choose
its toast, so rejecting with an Error would have silently changed the
message the user sees. That is pinned by a test proven green against the
antd original with a Form.Item liveness gate, and proven red when the
rejection is switched to an Error.
Enum and boolean fields keep the antd Select, whose allowClear has no
shadcn equivalent; dropping it would remove the only way to unset an
optional enum. Everything else moves to the shadcn Input and Textarea and
onto semantic colour tokens.
Adds MCPToolArgumentsForm.test.tsx covering the string, integer, number,
boolean, object, array, nested-params and string-schema paths, written
against the antd original and re-run unedited afterwards.
* refactor(ui): drop the decorative antd Form.Item from the MCP connect guide
The connect guide rendered a single antd Form.Item with no field name and no
Form ancestor, so it registered nothing and carried no payload; it was only
supplying bottom margin. It becomes a div with the same margin class, which
removes the file's last antd Form dependency.
Also takes the guide onto semantic colour tokens so it renders in dark mode.
The blue and green callouts keep their hue and gain dark variants rather
than flattening to neutral, since the colour carries meaning there.
* chore(ui): ratchet the MCP tool arguments form lint suppressions
The react-hook-form migration removed four of the five nested ternaries
in MCPToolArgumentsForm, so lower the grandfathered count to match and
hoist the one inline object literal the budget rule flags.
* test(ui): classify the MCP modal batteries as integration tests
Both render a real component tree down to the form controls and stub only
the network boundary, which is the repo's definition of an integration
test rather than a unit test. The tool arguments battery renders a single
module in milliseconds, so it stays unsuffixed.
* refactor(ui): migrate agent forms to react-hook-form and shadcn
Move the agent create wizard and the agent detail editor off antd Form onto
react-hook-form with shadcn primitives. The two parents share three children
(agent_form_fields, dynamic_agent_form_fields, cost_config_fields), so the whole
form graph migrates in one commit.
The submit payload is unchanged. antd validates and submits only fields that are
currently mounted, and its Collapse panels mount lazily on first open and then
stay mounted, so a payload depends on which panels the user ever expanded.
react-hook-form keeps every registered value instead, so the panels track their
own mounted set and the detail editor filters the never-opened panels back out
before building the request. shouldUnregister stays off, since it drops values
for collapsed panels rather than merely excluding them from submit.
Tags, examples and forwarded header names move from antd tags-mode selects to a
combobox in the kit. Base UI clears the combobox input on blur before the blur
handler runs, so the pending text is committed from the input-clear reason,
which is what antd did when the field lost focus.
The agent type picker stays on antd Select: its popup content is not part of the
form graph, and the Base UI popup opens a macrotask later, which the existing
unit test cannot observe.
* refactor(ui): use the shared PasswordInput in the agent forms
* refactor(ui): drop the narration comments from the agent wizard
Moves the guardrail form graph off antd Form onto react-hook-form with the
shadcn field primitives. The graph migrates atomically: add_guardrail_form and
guardrail_info own the form instances, and guardrail_provider_fields,
guardrail_optional_params and LLMJudgeFields are field groups rendered inside
them, so an antd parent could not host a react-hook-form child either way.
The submit payload is unchanged. Two characterization suites, 25 cases, pin it:
each case was written against the antd original, proven green there, and passes
unedited against the migration.
Behaviour worth calling out. Nested provider fields are keyed with ":" rather
than "." so they stay flat keys the way antd stored them, since a dotted name
is a lodash path in react-hook-form and would have started shipping a nested
object. antd InputNumber clears to null and clamps on blur where a native
number input does neither, so the judge criteria weights reproduce that. The
guardrail_info submit handler is read through a ref at validation-resolution
time, matching how antd re-read onFinish, so a submit fired by the same click
that changed state still sees that state.
Two antd behaviours are preserved rather than fixed, both worth their own
follow-up: deselecting every mode blocks Next instead of falling back to the
seeded default, and a required provider-specific field is never enforced at
create time. One is fixed and disclosed: a failed validation now names the
problem instead of rendering "[object Object]", and the guardrail name label is
associated with its control, which it was not before.
MultiSelect takes an optional id so the label can point at the control.
SkipMessageSelect was duplicated verbatim in both parents and now lives in the
shared field module.
The edit project modal had seven payload tests and none of them cleared a
required field, so rewiring its submit button to send raw form values with
validation skipped left all seven green. The validation layer was untested
on that path while looking well covered.
Adds the missing case: clearing the project name blocks the save and shows
the error. It passes on current code, so the behaviour was always correct,
and it fails under the validation-bypass mutation, so it has teeth.
* refactor(ui): migrate the SCIM and Hashicorp Vault forms to react-hook-form and shadcn
Both forms move off antd Form onto react-hook-form plus the shadcn kit, with
neutral greys on semantic tokens and coloured callouts keeping their hue behind
a dark variant, so both are dark-mode ready.
Neither file had a test, so each one gained a characterization test written
against the antd original and proven green there before any source changed. The
same files pass unedited after the migration.
Two payload details the migration has to reproduce rather than tidy up. antd
onFinish emits a mounted but never-set field as a key holding undefined, and the
vault handler turns each of those into an empty string to clear it server-side,
so every rendered vault field is seeded to an empty string rather than left
absent. And the vault form still refuses to seed or send a blank sensitive
field, so a stored secret stays write-once.
SCIM keeps its Enter-to-submit path: its footer button was a Tremor Button
carrying an explicit type=submit, which Tremor forwards, so the form could
already be submitted from the keyboard.
* refactor(ui): migrate SSO, SCIM and vault forms to react-hook-form and shadcn
Moves the SSO settings form graph, the SCIM token form and the Hashicorp
Vault config form off antd Form onto react-hook-form plus the shadcn
FormField primitives, keeping today's submit payloads byte for byte.
The SSO graph migrates atomically because an antd Form.Item parent cannot
host a react-hook-form child. BaseSSOSettingsForm now owns the shared
schema, the field components and a mounted-field picker that reproduces
what antd's onFinish actually sent: rc-field-form validates only mounted
entities, so hidden provider and mapping fields never reached the wire.
submitMountedSSOValues keeps that behaviour explicit instead of leaving it
to which fields happen to be rendered.
EditSSOSettingsModal seeds through an explicit mapper rather than
spreading the server record, so a field the form does not declare cannot
leak into an update. The vault modal keeps its two distinct behaviours for
blank inputs, clearing non-sensitive fields with an empty string and
omitting blank secrets so a stored credential survives a save.
* fix(ui): render SSO select labels and guard seeding completeness
The migrated Select triggers rendered the raw stored value rather than the
option label, so an untouched Default Role showed "internal_user" and a
chosen provider showed "okta". Base UI resolves a label only through a
Value function child, so both selects now format through the same option
list that builds their items.
Adds three characterization cases the earlier suite did not reach: an
empty required provider credential blocks the submit and names the field,
reopening the modal against a different stored config replaces every
seeded value rather than merging, and every field the provider forms can
mount survives the seeding mapper. The last one fails by name when a key
is dropped from that mapper, which is the class of defect an explicit
allowlist invites.
* test(ui): cover the edit SSO modal against its real form tree
The existing modal test stubs BaseSSOSettingsForm out, so no field ever
registers and validation passes trivially. Rewiring the Save button to
call the submit handler with raw form values, skipping both validation and
the mounted-field filter, left all 112 tests green.
Adds an integration test that renders the real modal, the real form body
and the real antd shell, stubbing only the two data hooks. Clearing a
required credential now blocks the save and names the field, and a valid
save asserts the exact payload. The bypass mutation fails both cases, and
dropping only the mounted-field filter fails the payload one.
* refactor(ui): move the search tool, tag and vector store views off tremor
Swaps the tremor Button, TextInput, Text, Title, Card, Badge, Accordion and
TabGroup usages in the search tools, tag management and vector store views for
the shadcn primitives, following the tremor conversion cookbook. Both tab panels
in the vector store info view carry keepMounted so the tester's state survives
switching to Details and back, and a test pins that contract.
tremor's Button renders a bare button element with no type, so inside the antd
Forms here the Test Connection button in the create search tool modal and the
Cancel buttons in the tag editor and the vector store form were implicit submit
buttons. The shadcn Button defaults to type="button", so they can no longer
submit, and every button that is meant to submit now carries an explicit
type="submit". Clicking Test Connection and Cancel against a live proxy on the
merge base already only ran the connection test and only cancelled, so this
closes a latent trap rather than changing what the pages do.
Decrements the seven no-restricted-imports suppression counts these files no
longer need, leaving the antd half of each entry in place for the antd pass.
* refactor(ui): use the line tab strip in the vector store detail view
The detail view's tabs kept the default pill TabsList, so it no longer matched
the underline strip tremor rendered before the swap or the one the vector store
list view already uses.
* test(ui): pin the tag and vector store form save and cancel buttons
Cancel in the tag editor used to submit the form and save the tag because the
tremor button carried no type; nothing in the suite failed if it started doing
that again. Each form now has a pair of cases: Save Changes and Create still
submit, and Cancel leaves the record alone.
* fix(ui): keep the reveal toggle on the search tool API key
tremor's TextInput drew its own show/hide button whenever the type was
password, and the shadcn Input is a plain native input, so the straight
prop pass-through silently deleted that affordance from the create search
tool form's API key field.
Puts it on antd's Input.Password instead, which is what the sibling edit
form in the same directory (SearchTools.tsx) already uses for the very
same field, so the reveal survives and the two forms behave the same.
The file already imports antd, so this adds no import and no suppression.
* test(ui): pin the antd submit payloads for the key create and edit forms
Characterization only, no source change. Both suites are green against the
current antd components, so they can gate the react-hook-form migration that
follows without being edited.
key_edit_view had no exact-payload assertion, only objectContaining, so nothing
caught a form that started sending server-only key fields. The new case asserts
the whole object.
create_key_button's existing suite runs against a hand-rolled antd fake and
stubs out KeyLifecycleSettings and RateLimitTypeFormItem, so neither the real
store nor those two controls were covered. The new file drives the real antd
form and pins the network payload instead.
* refactor(ui): move the shared key form controls off antd onto shadcn
KeyLifecycleSettings and RateLimitTypeFormItem each owned an antd Form.Item and
took the parent's FormInstance as a prop, so neither could be hosted by anything
but an antd form. That is what made the key create and edit forms one
inseparable migration unit.
Both are now presentational: they take value and onChange and let the parent own
the binding, so an antd Form.Item and a react-hook-form FormField can host them
equally. The two parents keep their antd forms for now and pass the binding down
unchanged, which is why every existing payload assertion still holds.
Controls are shadcn Select, Input, Switch and Checkbox on semantic colour
tokens, so both are dark-mode ready. The rotation notice keeps its blue hue and
gains a dark variant rather than flattening to a neutral.
The form prop the two components took was already inert: antd dispatches its own
store update before calling the child's onChange, so setFieldValue was writing a
value the store had just been given.
KeyLifecycleSettings.test.tsx keeps every assertion; only the harness moves the
duration binding up into a Form.Item, and one case disables user-event's
pointer-events check because Base UI leaves a reopened select popup inert under
jsdom, reproduced on a bare shadcn Select with none of this code involved.
* test(ui): pin the role-gated key fields and tidy the new assertions
Adds the case that proves policies and prompts leave the payload entirely for a
role that cannot see them, which a react-hook-form port would otherwise start
sending from defaultValues. Green against antd like the rest.
Also hoists the two large expected payloads into named constants and drops two
unused exports, so the lane adds no new lint-budget pressure.
* fix(ui): give the key expiry input and Never Expire checkbox separate labels
The expiry label carried htmlFor for the duration input while also wrapping
the Never Expire checkbox and its own label, so the two controls shared one
ambiguous association. Splitting the row into a plain container with a label
per control makes each name resolve to the control it describes.
Also drops the prop and test comments added in this branch, which the
repository comment policy does not allow.
* test(ui): pin the create-form expiry binding to the generate payload
create_key_button coalesces a missing or blank duration to null before it
calls keyCreateCall, so the key is present in the payload whether or not the
control is bound to the form. Every existing case stayed green with the
Form.Item removed, which left the binding uncovered.
The new case opens Key Lifecycle, types an expiry, and asserts it arrives as
that value. Proven red with the Form.Item removed and green with it restored.
* refactor(ui): migrate the model settings and credential rotation modals to react-hook-form
Both modals owned a self-contained antd FormInstance with no shared form
children, so each migrates on its own without touching the add_model graph.
ModelSettingsModal keeps its antd Modal shell, footer buttons and Skeleton
placeholder. The single store_model_in_db field becomes a shadcn Switch inside
a FormField, the antd Form.Item tooltip stays a hover tooltip rather than
becoming always-visible description text, and the remount-on-new-config
behaviour that the antd `key` provided is now RHF's `values` option.
UpdateModelCredentialsModal keeps the antd Modal and warning Alert. The
Input.Password becomes an InputGroup with an Eye/EyeOff reveal toggle so the
reveal affordance survives, and the required rule ports to the same message.
Both submit paths stay exactly as they were: Enter still submits here because
the antd Form had onFinish and a real submit button, while the settings modal
keeps submitting only from its footer button.
* refactor(ui): reuse the shared PasswordInput in the credential rotation modal
* refactor(ui): move the internal user create, edit and detail views off tremor
The tremor SelectItem rows nested inside the antd role Select become
antd Select.Option so the antd control keeps driving the form; the antd
removal is left to the antd pass. The user detail tabs move from a
numeric index to overview/details slugs (the public initialTab number
prop is unchanged and mapped at the boundary), every panel is
keepMounted, and a test pins that contract. The per-team remove button
keeps tremor's light red look as a ghost icon button rather than a
solid destructive one. Prunes the tremor no-restricted-imports
suppressions these files no longer need.
* refactor(ui): keep the user detail tab strip on the line variant
The tremor TabList defaulted to the underline strip, so the shadcn
TabsList needs variant="line" to keep that look instead of the filled
segmented pill; the triggers pick up the same active classes the users
page strip right above already uses. Also drops the vestigial empty
placeholder on the embedded create user email field, which only existed
to suppress tremor's built-in "Type..." hint.
* feat(complexity_router): custom classifier plugins via classifier_type 'plugin'
Adds a third classification mode where an operator-supplied hook decides the
tier instead of the heuristic scorer or the LLM classifier. The hook implements
an async classify(context) returning a tier name (built-in value, tier_labels
label, or tier_definitions name) or None to decline; failures, timeouts, and
unknown tiers fall back exactly like a failed LLM classifier. The context
carries the request messages and metadata, including caller identity, so a
plugin can route by team, spend, or any business rule.
The plugin resolves from a dotted path at proxy startup with a load-time check
that classify is a coroutine function, and is closed off over HTTP like the
routing plugins list. Routing decisions record the new classifier_plugin cause.
tier_definitions now accepts classifier_type 'plugin' alongside 'llm'.
* fix(proxy): resolve plugin dotted paths in _delete_deployment before hashing ids
The db-sync reconcile re-reads the raw config and hashes litellm_params to
compute which ids the config wants served, but the router's ids were hashed
from the resolved params where plugin dotted paths are live instances. The
mismatched ids made the reconcile evict every plugin-bearing auto-router one
sync after startup, on any proxy with a database connected. This also affected
the existing routing plugins list, not just the new classifier plugin.
Resolving the plugins in _delete_deployment the same way load_config does makes
both sides hash the same canonical form. A plugin module broken on disk at
reconcile time skips cleanup instead of evicting valid deployments, matching
how a get_config failure is handled
* fix(complexity_router): treat non-string plugin verdicts as declines, centralize the empty-mapping sentinel
A hook returning a non-string raised inside resolve_classified_tier outside the
plugin exception boundary, failing the request instead of falling back. Also
moves the read-only empty mapping to constants.py per repo convention and moves
the classifier plugin product docs out of the package README for the docs repo
* refactor(complexity_router): rename the plugin classifier mode to classifier_type 'custom'
The mode value now names the operator's intent while classifier_plugin keeps
naming the mechanism; routing decisions keep the classifier_plugin cause
* refactor(proxy): pin plugin-bearing deployment ids from the raw params instead of resolving in the reconcile
Replaces the previous approach of re-running plugin resolution inside
_delete_deployment, which imported operator modules on every reconcile cycle
and skipped the whole cleanup pass when any one module was broken on disk.
load_config now stamps model_info.id from the raw litellm_params before
resolution swaps dotted paths for live instances, so the reconcile's raw-config
hash matches by construction and needs no resolution at all: a broken module
cannot stall cleanup for unrelated models, and any future param-transforming
resolution is covered by the same pin. _generate_model_id becomes a staticmethod
so the pin can run before the Router exists; its statically dead non-string key
branches are removed. Also documents candidate_models as an informational
snapshot for classifier plugins, unlike the narrowing surface RoutingPlugin
filters
* fix(router): restore _generate_model_id key handling, align classifier context with the routing-plugin pattern
The staticmethod conversion accidentally dropped the non-string-key branches
from _generate_model_id, a silent hash change for any params with non-string
keys; they are restored verbatim. The classifier plugin context now follows
the Router-level routing-plugin recipe exactly: structured messages come from
resolve_structured_messages over the raw messages, and the metadata key comes
from the shared get_metadata_variable_name_from_kwargs helper, which also
replaces the duplicated inline sniff in _pick_model_for_tier. This removes the
raw-or-resolved fallback where a plugin could silently receive resolved
messages when a call site forgot to pass the raw ones
* refactor(router): make generate_model_id public, guard classifier context construction
Two modules legitimately hash deployment ids with the same helper now (Router
and the proxy's config-load pin), so the private name was lying about its
audience and the cross-module call needed a pyright suppression; renaming it
public restores the static safety net. The classifier plugin's RoutingContext
construction moves inside the failure boundary, matching the LLM path where
litellm-side prompt building also falls back rather than failing the request,
and a prompt-only call with no message list is now covered by a test
* refactor(ui): move the MCP server forms and detail tabs off tremor
Swaps the tremor Button, TextInput, Title, Text and Tab primitives in the six
MCP server components for the shadcn layer, and leaves the antd Modals, Forms
and Selects alone for the antd pass. In the two files that mix both input
libraries, antd's Input is imported as AntdInput so the shadcn Input keeps its
canonical name.
Two behaviours needed care. Base UI's Button forces type="button", so the
create button in CreateMCPServer now carries an explicit type="submit"; Cancel
and the OAuth authorize button stay non submitting, which also drops the
accidental implicit submit they inherited from tremor. Every TabsContent gets
keepMounted, because Base UI unmounts inactive panels while tremor only hid
them, and a save started from the Cost Configuration tab reads fields that live
in the Server Configuration panel. mcp_server_edit.test.tsx gains a regression
test for that: drop keepMounted and the pending edit never reaches the update
payload.
One affordance is gone: password fields no longer draw tremor's built in reveal
toggle, since the shadcn Input is a plain native input.
Prunes the six no-restricted-imports suppressions these files no longer need.
* fix(ui): keep the reveal toggle on the MCP secret fields
tremor's TextInput drew its own show/hide button whenever the type was
password, and the shadcn Input is a plain native input, so the straight
prop pass-through silently deleted that affordance from five fields: the
create modal's authentication value and the OAuth client id and secret in
both the M2M and the interactive flow.
Puts them on antd's Input.Password instead, which is what every sibling
secret field in this directory already uses (TokenExchangeFormFields,
IdJagFormFields, AwsSigV4Fields and the edit form), so the reveal survives
and the five fields now match their neighbours instead of behaving
differently inside the same form. Both files already import antd, so this
adds no import and no suppression.
* test(ui): pin the connect tab mount contract
mcp_connect's per-card "limit tools to specific MCP servers" toggle lives
in panel local state that feeds the rendered header block, so the panels
have to stay mounted across a tab switch. Base UI unmounts an inactive
panel unless keepMounted is set, and unlike the edit form there was no
test holding that down.
Toggles the header on from the LiteLLM Proxy panel, switches to Cursor and
back, and asserts both the switch and the x-mcp-servers line in the curl
example survived. Dropping keepMounted from that panel fails it.
* fix(ui): keep the MCP tab strips underlined instead of segmented
A bare tremor TabList is variant="line", so the connect strip and the
server settings strip both drew an underlined tab on a full width
divider. Converting them bare turned each into a filled segmented
control, because the shadcn TabsList defaults to the pill.
Both strips now use variant="line" with the divider recipe, and the
connect strip gets back the grey rounded box tremor drew around its four
tabs.
* refactor(ui): migrate the vector store creation form to shadcn
CreateVectorStore and S3VectorsConfig were the last antd Form.Item users on
the vector stores page. Both are now built from the shared Field primitives
and shadcn controls, so the page picks up the design tokens and dark mode.
CreateVectorStore's antd Form was inert: no Form.Item carried a name, there
was no onFinish, and the submit button sat outside the form element, so the
form store never held anything. Form.useForm is dropped rather than replaced
with react-hook-form, and the existing imperative validation is unchanged.
S3VectorsConfig's four Form.Item wrappers had no name either, so its inputs
were already prop-controlled and decoupled from the parent store. The
embedding model picker keeps its typeahead by moving to Combobox.
The submit payload is unchanged. A new characterization suite pins it: it was
written against the antd originals, proved green there first, and passes
unedited against the migration.
* test(ui): cover the S3 embedding model combobox end to end
The migration moved this control from an antd Select with showSearch to a
Combobox, and nothing exercised it: the suite pinned the payload but never
loaded the option list, filtered it, or selected from it.
The case drives the whole interaction. It stubs three models, one of which is
a chat model, opens the list and asserts the chat model is absent, types to
filter, selects the remaining embedding model and asserts it arrives in the
providerParams argument.
Proved green against the antd originals of both files first, then unedited
against the migration. It queries the control by role rather than by label,
because the antd original rendered a label with no control associated to it,
which the migration fixes.
Moves six antd Form graphs onto react-hook-form + shadcn: the pass-through
create and edit forms with their two shared sections, the project create and
edit modals, and the access group edit modal.
Each form graph moved atomically. An antd Form.Item parent cannot host a
react-hook-form child, so a shared section that renders a Form.Item has to move
with every parent that mounts it or the field silently stops reaching the
payload. PassThroughSecuritySection holds Form.Item name="auth" and is imported
by both pass-through parents, so all four files move together.
Submit payloads are unchanged and pinned by characterization tests written
against the antd originals first. That includes the parts that look like bugs:
add_pass_through still sends timeout and cost_per_request as strings while
pass_through_info sends them as numbers, and both edit modals still omit fields
whose antd Form.Item never mounted.
One behaviour does change. Enter in the add pass-through form ran Cancel and
discarded the filled form, because HTML implicit submission activates the first
submit button in tree order and Tremor renders buttons with no type attribute,
making the footer Cancel that button. Cancel is now type="button" and Enter
submits.
* refactor(ui): migrate the caching, cost tracking, alerting and user detail forms to react-hook-form and shadcn
Moves the last of this lane's antd Form usage onto react-hook-form plus the
shadcn field kit, and takes the neutral greys in the files touched onto
semantic tokens so these screens are dark-mode ready.
Each unit is characterization-first: a payload-pinning test was written and
proven green against the antd original before any production code changed,
then re-run unedited against the migration. Every pre-existing test for these
files still passes without edits.
Two behaviour changes are deliberate and disclosed rather than buried.
Saving cache settings with the Advanced section collapsed used to drop
namespace, ttl, max_connections and the GCP fields from the payload, and to
send ssl as false even when the loaded value was true, because antd reports
only mounted fields at submit while its store keeps the rest. Keeping the
values in form state fixes that, and the payload no longer depends on whether
the section was expanded.
Adding a provider discount used to call the handler twice per click, because
the child submit button sat inside a Form carrying onFinish that called the
same function the button's onClick already called. Removing the leftover
wrapper collapses it to one request. Both calls read the same config and sent
the same body, so this changes request count rather than stored state.
* fix(ui): restore Enter submission on the provider discount form
Removing the antd Form wrapper from cost_tracking_settings also removed
native Enter submission from the Add Provider Discount modal, where the
original carried onFinish and AddProviderForm renders a type="submit"
button. Wrapping the fields in a native form whose onSubmit only calls
preventDefault restores it: implicit submission clicks the default
button, so Enter and a click each produce exactly one request rather
than the two the antd version fired on both paths.
The margin modal is deliberately left as a div. Its antd Form carried no
onFinish and AddMarginForm renders type="button", so Enter was already
inert there and a test now pins that alongside the working click path.
Also swaps five any[] mock forwarders for unknown[] in the user detail
test and asserts the role trigger renders its label rather than a blank
or raw value.
* refactor(ui): retire the tremor date range picker in favour of the shared advanced picker
UsageDatePicker was the last tremor DateRangePicker surface. Its three call sites in the old usage page and the caching dashboard now render AdvancedDatePicker, which already had the same prop interface, preset list and idle-callback day-boundary adjustment. AdvancedDatePicker drops its own tremor Button and Text for the shadcn Button and a plain paragraph, and it now applies the className prop it already declared so the mb-4 the tag-based usage tab passes keeps landing on the picker root. usage_date_picker.tsx and its calendar-grid test are removed, and the two no-restricted-imports suppressions those files carried are pruned
* fix(ui): let the advanced date picker anchor its panel to the trigger's left edge
The picker's dropdown is 600px wide and right-anchored to a 300px trigger, which was fine while every caller sat at the right edge of its row. The two old usage tabs place it in the left column, so the preset column landed left of the main scroll container and was clipped. AdvancedDatePicker gains an align prop (default right, unchanged for existing callers) and the old usage call sites pass left. The caching dashboard grid gives the picker an auto track instead of a third equal share, so the fixed-width trigger no longer spills past the card at laptop widths
* fix(ui): give the advanced date picker a real focusable trigger
The picker's display was a click-only div, so tabbing through the usage,
old usage, caching, cost optimization and guardrails monitor pages skipped
the date range control entirely and its focus ring classes never fired. It
is now a type="button" element carrying aria-expanded, which restores the
keyboard and screen reader access the tremor picker had. The panel also
reports its anchoring as data-align so the test can assert intent instead
of a Tailwind class
* fix(ui): make date picker relative-range presets keyboard-operable
The presets were non-focusable divs with click handlers, so a keyboard-only admin tabbed past Today / Last 7 days / Last 30 days / MTD / YTD and had to type both dates by hand. They are now buttons carrying aria-pressed.
* feat(ui): plan-mode override tier in the auto-router create and edit forms
The backend plan_mode_min_tier field (#37230) was API-only. Both forms now
carry an Advanced: Plan-Mode Override panel in the shared complexity config
component: a toggle derived from field presence, so on writes the highest
tier that has models and off deletes the key, and a tier select limited to
tiers with models because the backend rejects a floor at an empty tier. The
edit modal manages the key on every save, so clearing it actually clears the
stored config instead of the preserved copy resurrecting it, while unmanaged
keys like plan_mode_patterns still round-trip untouched
* refactor(ui): hoist the eligible plan-mode tier list out of the panel JSX
* refactor(ui): move tierOptions into complexity_router_tiers, the shared tier-utility module
* refactor(ui): migrate login, onboarding and search tool forms to react-hook-form and shadcn
Moves four forms off antd Form and Tremor widgets onto react-hook-form plus
the shadcn kit, and onto semantic colour tokens so the screens are dark-mode
ready. antd Modal and Alert stay as the shells.
The submit payload is unchanged in all four. Each unit is pinned by a
characterization test that was proven green against the antd original before
any production code changed, and the pre-existing test files pass unedited.
Extracts the search tool payload builder, which was duplicated verbatim
between the create and edit forms, into searchToolPayload.ts with unit tests,
and adds a shared PasswordInput so the four reveal toggles antd and Tremor
gave for free are preserved on one component.
* refactor(ui): keep the search tool Test Connection button an implicit submit
Tremor's Button renders no type attribute, so inside a form it defaults to
submit. The Test Connection button therefore fires both its own onClick and
the form's onFinish today, which creates the search tool as a side effect of
testing the connection. shadcn's Button renders type="button", so the naive
swap silently dropped that second path.
Restores parity with an explicit type="submit" and pins it with a test, so
the double submit is recorded rather than quietly changed. Fixing it belongs
in its own change.
Also prunes the two now-stale eslint suppression counts for the migrated
search tool files, scoped to those keys only.
* refactor(ui): announce the login button spinner the way antd did
antd's Button renders its loading indicator as role="img" with aria-label
"loading", so a screen reader announces the request in flight. The shadcn
spinner is a bare svg, which drops that. Labels it on the login button to
match, as already done on the onboarding submit button.
* fix(ui): drop noValidate from the migrated login, onboarding and search-tool forms
antd's Form renders no novalidate attribute and its required rules emit
aria-required rather than the native required attribute, so nothing in
these four forms was ever gated by native constraint validation. The only
type="email" input is disabled and readOnly, which bars it from validation
in every browser. Measured in jsdom and again in Chrome against a live
proxy: form.checkValidity() is true with the fields empty, a native submit
reaches react-hook-form, and zod blocks it with the same messages.
Removing the attribute keeps the rendered form faithful to antd, and keeps
a constraint added later behaving the way antd would have behaved instead
of being silently suppressed.
* fix(ui): accept a null api_key when seeding the search tool edit form
The list endpoint declares api_key as str | None and search_tool_info as
dict | None, and the masking helper returns non-string values untouched, so
a tool stored without an API key comes back as "api_key": null. zod's
optional() accepts undefined and rejects null, so the edit form for any
such tool failed with "expected string, received null" and could never be
submitted. antd carried no schema and forwarded whatever the server sent.
nullish() restores that, and the payload still forwards the null rather
than coercing it to an empty string. The new case seeds both null vectors
and fails without this change.
* chore(ui): drop the narration comments from the search tool forms
These restate the state change or the JSX block directly below them, which
the repo's comment policy rules out, and both files are rewritten by this
change rather than merely touched.
EditUserModal was rendered by the users dashboard but nothing could ever
open it. Its two pieces of state, editModalVisible and selectedUser, were
only ever set to false and null, so the modal short-circuited to null on
every render.
The edit path users actually reach goes through the row actions menu,
which routes to the user detail view and its edit form, so removing this
leaves no capability behind. The submit handler that fed the dead modal
goes with it, along with the imports it was the last consumer of.
* 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.
* refactor(ui): migrate guardrail and vector store forms to react-hook-form and shadcn
Ports four antd forms in the guardrails and vector stores pages onto
react-hook-form with zod resolvers and the shadcn field kit, and takes the
files they live in off light-only Tailwind colors
VectorStoreForm and vector_store_info now build their payloads from typed
form values instead of an antd FormInstance, seeding the edit view through an
explicit mapper rather than spreading the whole server record. The submit
modal in TeamGuardrailsTab moves to the same shape, and its URL rule is
reproduced exactly: src/lib/forms/antdUrl.ts compiles the pattern
async-validator uses for `type: "url"`, with a test asserting the compiled
source and flags match, so a protocol-less www host keeps passing and a bare
domain keeps failing
CompetitorIntentConfiguration had no FormInstance at all: its antd Form was a
layout wrapper with no named items and no onFinish, so it moves onto the field
primitives directly rather than gaining form state it never had. Its tag and
threshold controls are replaced by local TagsInput and ThresholdInput
components that reproduce what antd did, comma token separators plus commit on
blur for tags, and clamp-on-blur with step-precision display for the
thresholds, without introducing the native number constraints that would
newly block the surrounding guardrail form
Every payload is pinned by a characterization test that was proven green
against the antd original before the swap and then re-run unedited
* fix(ui): keep the vector store edit form saving when the server sends null
The proxy returns null for an unset vector_store_name or
vector_store_description rather than omitting the key, and both columns are
nullable. z.string().optional() accepts undefined but rejects null, so
loading any store whose name or description was never set left the edit form
stuck on "Invalid input: expected string, received null" and it could not
submit at all. nullish() accepts both and forwards null unchanged, which is
what the antd version did
Pinned by an untouched-save case that seeds both fields null and clicks Save
without typing anything. It fails against the optional() schema with zero
requests sent, and passes against both the fix and the antd original, sending
vector_store_name and vector_store_description as null
Also drops the deep import into @rc-component/async-validator, an undeclared
transitive dependency that failed the knip gate. The URL parity assertion now
compares against a checked-in snapshot of the pattern async-validator 5.1.0
compiles, so it stays an exact-equality check, and removes a comment that only
restated the networking layer's error handling
* refactor(ui): migrate auto router and credential forms to react-hook-form and shadcn
Moves four antd Form surfaces onto useZodForm plus the shared FormField and
FieldGroup primitives: the routing group modal, the auto router edit modal, the
add auto router tab, and the reuse credentials modal. Field labels that carried
an antd tooltip= keep it as a hover Tooltip on a help icon, and hardcoded greys
give way to semantic color tokens.
Two Base UI combobox wrappers come out of the two auto router surfaces that
shared the same antd controls: AccessGroupTagsCombobox replaces mode="tags" for
model access groups, and ModelChoiceCombobox replaces the searchable single
select for default and embedding models.
Payload building for the routing group modal moves to routingGroupPayload.ts so
the JSON args parsing and the four bound fields can be asserted directly
instead of through a render.
handle_add_auto_router_submit now takes a resetForm callback rather than an antd
form instance, which drops one any from its signature.
No change to what any of these forms submit. The reuse credentials payload keeps
the same key set, with the stored credential values rendered read-only and
merged back in at submit rather than copied into form state.
* refactor(ui): type the auto router create payload boundary
handleAddAutoRouterSubmit took its values as any, so a change to either side
of the auto router create payload passed static checking. It now takes an
exported AddAutoRouterValues, and add_auto_router_tab annotates the object it
builds with that same type, so the producer and the consumer cannot drift.
Its model_info is built in one shot rather than assigned into after the fact,
which drops the second any and keeps the two conditional keys exactly as they
were.
Adds a routing group case that saves an untouched edit of a group whose stored
arguments are null, which is the shape the proxy returns for an unset field.
* refactor(ui): migrate CloudZero and cost tracking forms to react-hook-form and shadcn
Moves four forms off antd Form onto react-hook-form with the shadcn field
primitives, keeping the request payloads byte identical.
The two CloudZero modals were near duplicates, so the payload builder and the
API key input now live in shared modules next to them. The Update modal keeps
its redaction behaviour: the key field arrives empty with a "leave empty to
keep existing" hint, and an untouched save omits api_key from the request so
the stored secret survives. There is a test that fails if that regresses.
add_provider_form had no Form instance of its own, and its Form.Item wrappers
carried no name, so nothing was registered in the parent store. The parent in
cost_tracking_settings still owns an antd Form element, which stays for now,
and the migrated button keeps type="submit" so the parent's onFinish path
behaves exactly as before.
Each unit got characterization tests written against the antd version first,
then re-run unedited against the migration. Payload parity was also checked
side by side with toStrictEqual across seven scenarios.
* test(ui): guard the CloudZero null connection id against a zod type error
The proxy returns connection_id as null rather than omitting it, and a plain
z.string() rejects null. The seeding coalesces it to "" so an untouched save
reports the friendly required message instead of "expected string, received
null". Dropping that coalesce fails this test.
* refactor(ui): migrate the regenerate key and team member forms to react-hook-form and shadcn
Moves RegenerateKeyModal and EditMembership off antd Form onto react-hook-form
plus the shadcn field kit, and onto semantic color tokens so both are dark-mode
ready. The antd Modal shell and Alert stay as they are.
The submitted payload is unchanged on both. Payload construction is extracted
into regenerateKeyPayload.ts and memberFormValues.ts and unit tested there, and
each component keeps an integration test that was written against the antd
original and proven green before any source changed.
RegenerateKeyModal keeps antd InputNumber's precision=2 rounding of max_budget.
The rounding is string-exact rather than float based, so 1.005 still submits as
1.01 the way antd did. Submission stays on the modal footer button, so Enter
still does nothing.
EditMembership omits noValidate. Its numeric fields are already native number
inputs carrying min and step, so browser constraint validation blocks a bad
submit today and continues to. That is pinned by tests.
* fix(ui): accept null-valued fields the proxy returns for keys and members
The proxy returns null rather than omitting the key for an unset
key_alias, user_email or user_id. antd had no schema and forwarded
whatever came back, but z.string().optional() accepts undefined and
rejects null, so regenerating an alias-less key or editing a member
with no email failed validation and silently never submitted.
Widen those three fields to nullish() and pin each with a test that
seeds null and submits without touching the field. Each test passes
against the pre-migration antd component and failed against the
migration before this commit, and the payloads it asserts are the
ones antd put on the wire.