fix(ui): restore the Add MCP Server dialog size and header spacing - #34679
Merged
yuneng-berri merged 3 commits intoJul 27, 2026
Merged
Conversation
The shadcn migration carried the antd modal's 1000px width over as an unprefixed max-w-[1000px], which tailwind-merge keeps alongside the DialogContent base class sm:max-w-md; the responsive variant wins from 640px up, so the dialog rendered at 448px. Prefix the override so the merge drops the base clamp
…e button DialogContent's close button is absolutely positioned 16px from the right edge at 32px wide, so it overlays the rightmost 24px of the p-6 content box. The justify-between header pins "+ Custom Server" to that same edge and, being out of flow, the close button reserves nothing. Give the action a right margin that clears it; keeping the margin on the button rather than the row leaves the header rule full-bleed
Contributor
Greptile SummaryRestores the Add MCP Server dialog’s intended desktop width and prevents its custom-server action from overlapping the close control.
Confidence Score: 5/5The PR appears safe to merge, with both targeted layout regressions addressed by focused styling changes and regression coverage. The responsive width override now replaces the conflicting base breakpoint class, and the header action reserves sufficient space for the existing absolutely positioned close control.
|
| Filename | Overview |
|---|---|
| ui/litellm-dashboard/src/app/(dashboard)/mcp-servers/_components/mcp_discovery.tsx | Correctly overrides the dialog’s responsive width clamp and reserves header space for the absolutely positioned close control. |
| ui/litellm-dashboard/src/app/(dashboard)/mcp-servers/_components/mcp_discovery.test.tsx | Adds focused class-contract regression coverage for both layout fixes without weakening existing assertions. |
Reviews (1): Last reviewed commit: "Merge branch 'litellm_internal_staging' ..." | Re-trigger Greptile
ryan-crabbe-berri
approved these changes
Jul 26, 2026
yuneng-berri
merged commit Jul 27, 2026
19348db
into
litellm_internal_staging
73 of 74 checks passed
Merged
5 tasks
stvnksslr
pushed a commit
to stvnksslr/litellm
that referenced
this pull request
Aug 3, 2026
…toration-c06977 fix(ui): restore the Add MCP Server dialog size and header spacing (cherry picked from commit 19348db)
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:
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
Both regressions are visible on the MCP Servers page. To capture before and after:
python litellm/proxy/proxy_cli.py --config litellm/proxy/dev_config.yaml --detailed_debug --reloadnpm run devinui/litellm-dashboard215f05588d(before this branch) and open http://localhost:3000/?page=mcp-serversa3f81eddcd, reload, and repeat step 4: the box is 1000px, the pills sit on one row, names are no longer truncated, and the X clears the "+ Custom Server" buttonType
🐛 Bug Fix
Changes
The shadcn migration in
428d23249atranslated the antdModalpropwidth={1000}intoclassName="max-w-[1000px]"onDialogContent. The baseDialogContentalready carriessm:max-w-md, and tailwind-merge treats a responsive variant as a distinct group, so it kept both classes; from 640px up thesm:rule wins the cascade and the dialog collapses to 448px. Prefixing the override assm:max-w-[1000px]lets the merge drop the base clamp. The unprefixedmax-w-[calc(100%-2rem)]in the base is untouched, so the dialog still fits below 640px.Separately, the header's
justify-betweenrow pins "+ Custom Server" to the content edge 24px in, whileDialogContent's close button is absolutely positioned 16px in at 32px wide. Being out of flow, the close button reserves no space, so it overlays the rightmost 24px of the content box and lands on the action. A right margin on the action clears it; keeping that margin on the button rather than the row leaves the header rule full-bleed.Both are pinned by tests in
mcp_discovery.test.tsx, each verified to fail with its fix reverted. jsdom has no layout engine, so they assert the class contract rather than a computed width.I swept the rest of the dashboard: this was the only
DialogContentpassing an unprefixedmax-w, and the onlyDialogHeaderwith ajustify-betweenaction row, so no other dialog carries either bug.Final Attestation
Before:
After:
