refactor(ui): migrate budgets, skills, ui-theme to shadcn - #34465
Conversation
…ration Adds a role/text-based characterisation test for UIThemeSettings, which had none, and extends the skills panel test to cover the delete confirmation. Both are green against the current antd/Tremor components so they can prove the shadcn migration keeps behaviour identical without being edited.
Replaces antd and Tremor with the installed shadcn primitives on the three route-exclusive panels: Tremor tabs, buttons and text on budgets; the antd delete Modal and Tremor button on skills; the Tremor card, inputs and buttons on ui-theme. Markup only, no behaviour change. The characterisation tests added in the previous commit are untouched and stay green, and the ui-theme inputs now carry real label associations. Shared components stay on antd; they are reached by other routes and are migrated separately. The form-bearing files on these routes are left alone.
…itellm_/dazzling-gagarin-3d4c69
Greptile SummaryMigrates three dashboard surfaces from Ant Design and Tremor to existing shadcn primitives
Confidence Score: 5/5The PR appears safe to merge with no concrete changed-code failures identified The migrated components use supported local primitive APIs, preserve their existing data operations and authorization behavior, and add focused tests for the newly migrated interactions
|
| Filename | Overview |
|---|---|
| ui/litellm-dashboard/src/app/(dashboard)/budgets/_components/budget_panel.tsx | Migrates nested budget and example tabs to supported local primitives without changing budget operations |
| ui/litellm-dashboard/src/app/(dashboard)/skills/_components/ClaudeCodePluginsPanel.tsx | Migrates deletion confirmation to the controlled alert-dialog primitive while retaining confirmation and pending-state behavior |
| ui/litellm-dashboard/src/app/(dashboard)/skills/_components/ClaudeCodePluginsPanel.test.tsx | Adds focused coverage for confirmation, cancellation, deletion, and list refresh behavior |
| ui/litellm-dashboard/src/app/(dashboard)/ui-theme/UIThemeSettings.tsx | Migrates theme settings markup to local card, input, label, button, and spinner primitives while preserving persistence behavior |
| ui/litellm-dashboard/src/app/(dashboard)/ui-theme/UIThemeSettings.test.tsx | Adds coverage for initial loading, saving, backend errors, reset persistence, and missing-token behavior |
Reviews (1): Last reviewed commit: "Merge remote-tracking branch 'origin/lit..." | Re-trigger Greptile
|
QA: verified end-to-end, all runbook scenarios pass ✅ Ran the dashboard dev server ( Skills delete (antd Modal → shadcn AlertDialog)Confirmation names the skill and warns "This action cannot be undone." Cancel deletes nothing (API Budgets (Tremor → ui/tabs, ui/button)List + "+ Create Budget" modal render; Examples nested tabs swap the code block with the active underline following the selection and no horizontal scrollbar. UI Theme (Tremor → ui/card, ui/input, ui/label, ui/button)Save persists ( Tested via Devin: https://app.devin.ai/sessions/06c407dfca0d455ab486fc83e359fff4 |
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
Before is commit
64aad5877a(pre-migration), after is commit39f0b56502(the migration commit). Screenshots are attached in a comment belowThe visual gate photographs all 35 dashboard routes at 1280x720 against a live proxy with a seeded database. It was calibrated on the untouched tree first (35/35 stable across two runs, then 35/35 identical across a full stack restart), the three migrated routes were re-baselined, and the gate was re-run: 35/35 passed, so the 32 routes not touched here are pixel-identical. That is the blast-radius check; tolerance is 0 differing pixels
The gate only ever photographs each route's default state, so the parts it cannot see were driven by hand against a live proxy with a seeded skill row
To reproduce, with a proxy on localhost:4000 and the dashboard dev server on localhost:3000
LiteLLM_ClaudeCodePluginTablelogo_url: nullandfavicon_url: nullVerified locally on the seeded stack: the skills delete removed the row from postgres, and the UI Theme save then reset round-tripped through
/get/ui_theme_settingsaslogo_urlset then back tonullType
🧹 Refactoring
Changes
Migrated, one route-exclusive file per route:
budgets/_components/budget_panel.tsx; TremorTabGroup/TabList/Tab/TabPanels/TabPaneltoui/tabs, TremorButtontoui/button, TremorTextto plain elements with token classesskills/_components/ClaudeCodePluginsPanel.tsx; the antd deleteModaltoui/alert-dialogand TremorButtontoui/button. The confirm keeps its in-flight state by using a plain destructiveButtonin the footer rather thanAlertDialogAction, which closes the dialog on clickui-theme/UIThemeSettings.tsx; TremorCard/Title/Text/TextInput/Buttontoui/card,ui/input,ui/label,ui/buttonand plain elements. The two inputs gain realhtmlForlabel associations, which the Tremor version did not haveNo new primitives were installed; every target was already in
src/components/ui/. Buttons use the primitive's own variants so colour stays a token swap, and the now-obsoleteno-restricted-importssuppressions for these three files are pruned fromeslint-suppressions.jsonDeliberately not touched, quoting the scope analysis for these routes:
common_components/DeleteResourceModal.tsx(23 pages),molecules/message_manager.tsx(53 pages),molecules/notifications_manager.tsx(53 pages),claude_code_plugins/skill_detail.tsx(4 pages). These are migrated separately so a page PR cannot silently restyle up to 52 other pagesbudgets/_components/budget_modal.tsx,budgets/_components/edit_budget_modal.tsx,skills/_components/add_plugin_form.tsx,common_components/check_openapi_schema.tsxBecause the shared components stay on antd, these routes still pull antd in through them; that goes away when those components are migrated on their own
Two notes for the reviewer. The primary buttons look darker because shadcn's
defaultvariant resolves--primary, matching the already-migrated Agents page rather than Tremor's indigo. And Base UI mounts only the active tab panel where Tremor mounted all of them, so the budgets Examples code blocks now render on demandFinal Attestation