refactor(ui): migrate mcp-servers, tag-management, tool-policies to shadcn - #34469
Conversation
… before the shadcn migration Rewrite the two markup-coupled assertions off antd class selectors and onto role/text queries, and add characterisation tests for the nine route-owned components that had none. Both rewritten tests and all nine new ones are green against the current antd and Tremor components, so the migration that follows can be judged by tests it never touched.
…o shadcn Replaces antd and Tremor with shadcn primitives across the 18 files these three routes exclusively own. Markup only: no behaviour, data flow or copy changed, and no shared or form-bearing component is touched, so the blast radius stops at these pages. The 12 tests covering these components are unchanged from the previous commit and still pass, which is the evidence that the rewrite preserved behaviour. Also prunes the six antd no-restricted-imports suppressions these files no longer need.
…itellm_/blissful-torvalds-5a5be3
Greptile SummaryThe PR migrates route-owned MCP server, tag management, and tool policy UI components from Ant Design and Tremor to shadcn primitives
Confidence Score: 5/5The PR appears safe to merge because the previously reported accessibility failure is fully addressed and no related blocking failure remains No blocking failure remains
|
| Filename | Overview |
|---|---|
| ui/litellm-dashboard/src/app/(dashboard)/mcp-servers/_components/MCPNetworkSettings.tsx | Migrates the network settings controls to shadcn and fully addresses the prior keyboard-accessibility thread by using a native button |
| ui/litellm-dashboard/src/app/(dashboard)/mcp-servers/_components/MCPNetworkSettings.test.tsx | Adds regression coverage confirming that the suggested CIDR control is focusable and activates with the keyboard |
| ui/litellm-dashboard/src/app/(dashboard)/mcp-servers/_components/mcp_servers.tsx | Migrates the MCP server listing and filtering interface to shadcn primitives |
| ui/litellm-dashboard/src/app/(dashboard)/tag-management/_components/index.tsx | Migrates the tag management page-owned interface to shadcn primitives |
| ui/litellm-dashboard/src/components/ToolPolicies/PolicySelect.tsx | Migrates the tool policy selector while retaining its existing selection behavior |
Reviews (2): Last reviewed commit: "fix(ui): make the suggested MCP network ..." | Re-trigger Greptile
The suggested CIDR chip was a click-only span both before and after the shadcn migration, so keyboard users could not reach or activate it. Render it as a Button, which brings focus and Enter/Space activation with it, and cover the keyboard path with a test that fails against the old span.
QA — live runtime verificationBuilt this PR's dashboard, served it from a live proxy on One non-blocking note: the only bot comment (Greptile P2) is that the suggested-CIDR badge in MCPNetworkSettings is click-only / keyboard-inaccessible. That's a pre-existing accessibility nit, not a functional break. Results
MCP Servers grid + badgesTool Policies — dropdown change persisted (trusted)QA performed by Devin: https://app.devin.ai/sessions/2e2a2f341b3c40dd8a26bfe8846f5049 |
TLDR
Problem this solves:
How it solves it:
Relevant issues
Linear ticket
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
@greptileaito re-request a review after pushing changes)Delays in PR merge?
If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).
Screenshots / Proof of Fix
Screenshots are in the local visual-gate baselines; drag them into this description:
/private/tmp/claude-501/-Users-yunengjiang-development-litellm--claude-worktrees-verify-veria-fixes-855b22/5c1d7cd1-1675-4378-b4f5-06aedca51f82/scratchpad/before/{mcp-servers,tag-management,tool-policies}-before.png/private/tmp/claude-501/-Users-yunengjiang-development-litellm--claude-worktrees-verify-veria-fixes-855b22/5c1d7cd1-1675-4378-b4f5-06aedca51f82/scratchpad/after/{mcp-servers,tag-management,tool-policies}-after.pngVisual blast-radius check, run against a live proxy with a seeded postgres and the dashboard dev server, photographing all 35 dashboard routes at 1280x720:
Because the gate's fixture has no MCP servers, it only photographs empty states. The card grid, server detail and tools viewer were checked separately against a live stack with three real MCP servers created through
POST /v1/mcp/server, driven at a deliberately short 1280x600 viewport to catch clipping the fixed-height snapshot cannot see. Confirmed there: the card grid with health, transport, auth, visibility and access-group badges; the overflow menu with Test Connection and Delete; the delete confirmation showing name, id and URL; the server detail tabs and overview cards; and the tools viewer.main.scrollHeightexceededclientHeightand scrolled to the bottom on every view, with no horizontal overflowReviewer click-through on a local proxy:
Type
🧹 Refactoring
Changes
The scope was picked mechanically from each route's real import closure, not by reading, so the three sets are disjoint and nothing shared is touched
mcp-servers (14 files)
MCPLogoSelector,MCPNetworkSettings,MCPServerCard,OpenAPIQuickPicker,TruePassthroughWarning,mcp_connection_status,mcp_discovery,mcp_server_cost_config,mcp_server_cost_display,mcp_server_view,mcp_servers,mcp_tool_configuration,mcp_tools, andMCPSemanticFilterTestPaneltag-management (1 file)
tag-management/_components/index.tsxtool-policies (3 files)
ToolDetail,ToolPolicies/PolicySelect,ToolPolicies/ToolPoliciesTableColumnsNot touched, and why:
notifications_managerandmessage_manager(53 pages each),DeleteResourceModal(23),numerical_input(14),team_dropdown(13),ModelSelector(11),McpCrudPermissionPanel(10), the Fallbacks and router-settings components (11 each), the wholeview_logstree (3 each), and the rest of the analyzer's SHARED bucket. These belong to the shared-component trackForm, blocked until refactor(proxy): type the PATCH /team/{team_id} request body #34195: 17 files under mcp-servers (create_mcp_server,mcp_server_edit,mcp_connect,EnvVarsSection,OAuthFormFields,StdioConfiguration,MCPToolsetsTab,ToolTestPanel,UserEnvVarsModaland the rest), plusCreateTagModalandtag_infoon tag-managementBecause mcp-servers keeps its 17 deferred form files and still imports shared components, that page continues to load antd after this PR. tag-management and tool-policies are built almost entirely from shared components (34 and 26 reaching those pages), so they own very little and their rendering barely moves
Two commits, deliberately: the first rewrites the markup-coupled assertions onto role and text queries and adds characterisation tests for the nine route-owned components that had none, all proven green against the antd components; the second is the migration and edits no test. A test that was written against the old markup and still passes against the new markup without being touched is the actual evidence here
Also prunes the six
no-restricted-importsantd suppressions these files no longer need, so the baseline ratchets downFinal Attestation