refactor(ui): migrate the last antd components off antd onto shadcn - #37569
Merged
ryan-crabbe-berri merged 2 commits intoAug 20, 2026
Merged
Conversation
Contributor
Greptile SummaryThis PR completes the dashboard migration from Ant Design controls to shared shadcn primitives and adds synchronous router-settings capture during key creation
Confidence Score: 5/5The PR appears safe to merge, with no concrete changed-code failure identified The migrated controls preserve their form values, submission paths, reset behavior, and role gating, while the key workflow now captures displayed router settings before building its request
|
| Filename | Overview |
|---|---|
| ui/litellm-dashboard/src/components/organisms/create_key_button.tsx | Migrates key-creation controls and reads current router settings synchronously before payload construction; no actionable regression was established |
| ui/litellm-dashboard/src/components/add_model/AddModelForm.tsx | Replaces Ant Design layout and selectors while preserving provider, credential, mode, and mounted-form value handling |
| ui/litellm-dashboard/src/app/(dashboard)/agents/_components/add_agent_form.tsx | Replaces agent type selection, badges, and progress steps with shared primitives without changing the creation workflow |
| ui/litellm-dashboard/src/app/(dashboard)/users/_components/BulkEditUsers.tsx | Migrates bulk-user table, checkbox, team selector, and budget input while retaining the existing update behavior |
| ui/litellm-dashboard/src/components/CreateUserButton.tsx | Replaces the standalone invitation modal with Dialog and retains form reset and submission behavior |
| ui/litellm-dashboard/src/components/Settings/AdminSettings/PluginSettings/PluginSettings.tsx | Migrates plugin settings presentation to shared cards and tables while preserving credential-edit semantics |
| ui/litellm-dashboard/src/app/(dashboard)/prompts/_components/add_prompt_form.tsx | Replaces Ant Design Upload with a validated native file picker and preserves prompt conversion and creation |
| ui/litellm-dashboard/src/components/Teams.tsx | Migrates team navigation from Ant Design tabs to shared tabs while retaining role-gated tab contents and actions |
Reviews (1): Last reviewed commit: "refactor(ui): migrate the last antd comp..." | Re-trigger Greptile
ryan-crabbe-berri
enabled auto-merge (squash)
August 20, 2026 02:20
yucheng-berri
approved these changes
Aug 20, 2026
ryan-crabbe-berri
force-pushed
the
litellm_antd_shadcn_final
branch
from
August 20, 2026 02:54
776069b to
a6dff2b
Compare
Converts the remaining dashboard components that still imported antd: admin panel, agents, MCP toolsets, policies, prompts, bulk user edit, create user, plugin settings, teams, add model, auto router, cloudzero export, BYOK credentials, credential modal, onboarding link, create key and routing groups. Primitives map onto the house shadcn set: Typography onto semantic tags, Select onto ui/select, SearchSelect or MultiSelect, Input onto ui/input, Tooltip onto SimpleTooltip, Card, Table, Tabs, Switch, Checkbox, Radio, Tag onto Badge, Divider onto Separator, Spin onto UiLoadingSpinner, Modal onto Dialog, message onto toast, and Space, Row, Col, Flex and Layout onto flex containers.
The dashboard no longer renders antd, so every `.ant-*` locator in the Playwright suite matched nothing. Most were already dead before this branch, broken by the earlier shadcn ports; the models multi-select in the key specs and the provider picker in addModel are the ones this branch broke. Queries now go through roles, labels and test ids. Select popups portal to the body, so option lookups are page-scoped rather than scoped to the dialog that opened them. Two locators fall back to `data-slot` because the elements have no distinguishing accessible name.
ryan-crabbe-berri
force-pushed
the
litellm_antd_shadcn_final
branch
from
August 20, 2026 02:58
a6dff2b to
3dc475c
Compare
ryan-crabbe-berri
merged commit Aug 20, 2026
0b37454
into
litellm_internal_staging
66 of 67 checks passed
6 tasks
felixboelter
added a commit
to aihpi/tool-litellm
that referenced
this pull request
Aug 20, 2026
Upstream finished migrating the dashboard off antd (BerriAI#37569, BerriAI#37574), so AntdGlobalProvider.tsx no longer exists and antd is gone from package.json. The ConfigProvider patch was dead, and its missing file failed the build. Deleted it: the brand colour already goes through shadcn's --primary. They also extracted the login SSO notice into a <SsoEnabledNotice /> component, so the legal-links patch now matches one short line instead of a multi-line antd Alert. Less to churn against. Separately, branding/layout.tsx had gone stale without anyone noticing. It was an unguarded whole-file copy taken before e368eea, so every build silently dropped upstream's NoRedisWarningBanner from both app shells, and it had also stripped their comments. Rebuilt it as upstream's current file plus only our four additions, so the delta is now just the two Legal imports and the column shell that makes the footer a real row. To stop that recurring, layout.tsx joins the guarded manifest. The guard was never Authentik-specific, so manifest.txt, baseline.sha256 and rebaseline.sh move up to aihpi/ and the manifest names copies relative to that. Both copies now fail the build when upstream moves them and get 3-way merged by the nightly re-sync step before the push. Verified: apply.sh applies clean, is idempotent, and exits 1 naming layout.tsx when its upstream version is altered. npm ci and npm run build on Node 24 compile. In the built bundle --primary:#dd6108 is present, the legal links reach both the login page and the dashboard shell, "AI Model Hub", "KI-Servicezentrum" and "Login with Authentik" are all there, and AUTO_REDIRECT_UI_LOGIN_TO_SSO and "Access your LiteLLM Admin UI" are gone. The patched layout keeps NoRedisWarningBanner in all three places.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TLDR
Problem this solves:
.ant-*selector in the e2e suite was deadHow it solves it:
from "antd"imports left insrcno-restricted-importssuppressionsUser Flow
Before: an admin creating a key sees the modal in two visual languages, and a router setting they just typed can be dropped from the request
After: the same modal renders as one consistent kit, and the value they typed is always the value that is sent
Relevant issues
Linear ticket
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
Screenshots / Proof of Fix
Shared setup: proxy on http://localhost:4000 with
STORE_MODEL_IN_DB=True, dashboard dev server on http://localhost:3000, signed in as a proxy adminBefore (c2b3c4b)
Create Key dialog renders one consistent kit
Router settings survive an immediate submit
Teams page header and tabs
Add Model, Prompts, Policies, Agents, Plugin Settings, Bulk Edit Users
?page=prompts,?page=policies,?page=agents,?page=admin-paneland the Bulk Edit drawer on?page=usersAfter (3dc475c)
Create Key dialog renders one consistent kit
Router settings survive an immediate submit
Teams page header and tabs
Add Model, Prompts, Policies, Agents, Plugin Settings, Bulk Edit Users
Type
🧹 Refactoring
Caveats
PageHeader's tabs render-prop form now has no callersantddependency stays installed, removed separatelyQA runbook
Selector-only rewrites, so the bullets group by spec rather than repeating the same three sentences for each of 34 tests. Every changed line swaps an antd class lookup for a role, label or test id; no assertion changed
role=optionscoped to the page, because the popup portals to the body and is not a descendant of the dialogrole=dialognamed "Regenerate Virtual Key", which is what kept the stale Regenerate button behind the modal from being clickedoption.evaluate(el => el.click())workaround that existed only because antd rendered options off-viewport during its open animationrole=dialogwith its own title, so the four sites that all read.ant-modal:visiblecan no longer match each otheruseId()and#team_aliascannot exist any moreselectProviderto click the combobox open before typing, because a Base UI combobox ignoresfill()while closed and highlights nothing, so the old fill-then-Enter selected nothinghasTextfilter on the form dialog, because the discovery dialog is still open behind it and both arerole=dialog[data-slot="skeleton"]instead of.ant-skeletonFinal Attestation