Skip to content

refactor(ui): swap @ant-design/icons for lucide-react - #37553

Merged
ryan-crabbe-berri merged 2 commits into
litellm_internal_stagingfrom
litellm_shadcn_lucide_icons
Aug 20, 2026
Merged

ryan-crabbe-berri merged 2 commits into
litellm_internal_stagingfrom
litellm_shadcn_lucide_icons

Conversation

@ryan-crabbe-berri

@ryan-crabbe-berri ryan-crabbe-berri commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

TLDR

Problem this solves:

  • Dashboard drew icons from antd and lucide at once
  • antd icons block finishing the shadcn migration
  • Icon-only plugin buttons had no accessible name

How it solves it:

  • Moves the last 39 files onto lucide-react
  • Drops @ant-design/icons and bans it in eslint
  • Adds explicit size classes and aria-labels

User Flow

Before: an admin using the dashboard sees two icon styles side by side, and a screen reader user cannot tell the plugin row buttons apart

  1. They open http://localhost:4000/ui/?page=mcp-servers and click "Add New MCP Server"
  2. The tooltip hints next to the form labels are antd glyphs, while the chevrons and spinners on the same screen are lucide strokes
  3. They open http://localhost:4000/ui/?page=settings, go to Plugins, and reach the row action buttons by keyboard
  4. Both buttons announce only as "edit" and "delete" with no idea which plugin they act on

After: every icon comes from the same set, and the plugin buttons name their row

  1. They open http://localhost:4000/ui/?page=mcp-servers and click "Add New MCP Server"
  2. The tooltip hints are lucide strokes matching the rest of the screen, at the same size as before
  3. They open http://localhost:4000/ui/?page=settings, go to Plugins, and reach the row action buttons by keyboard
  4. The buttons announce as "Edit alpha" and "Delete alpha", naming the plugin they act on

Relevant issues

Linear ticket

Pre-Submission checklist

  • I have added meaningful tests
  • The handful of test files covering my change pass locally, e.g. uv run pytest tests/test_litellm/<your_test_file>.py -v
  • My PR passes all required CI/CD checks (e.g., lint, schema.d.ts sync check, etc.)
  • My PR's scope is as isolated as possible; it only solves 1 specific problem
  • I have received a Greptile Confidence Score of at least 4/5 before requesting a maintainer review

Screenshots / Proof of Fix

Setup: cd ui/litellm-dashboard && npm install && npm run dev, then sign in at http://localhost:3000

Before (75a290e)

MCP server form tooltip hints

  1. Open http://localhost:3000/?page=mcp-servers and click "Add New MCP Server"
  2. Screenshot the info glyphs next to "Transport Type" and the OAuth fields

Plugin row actions

  1. Open http://localhost:3000/?page=settings, open the Plugins tab, add a plugin if the table is empty
  2. Tab to the row action buttons and screenshot the accessible names the browser reports

Agent wizard and date picker

  1. Open http://localhost:3000/?page=agents, click "Add New Agent", and screenshot the step markers and key selection cards
  2. Open http://localhost:3000/?page=usage and screenshot the date range picker trigger

After (4439958)

MCP server form tooltip hints

  1. Open http://localhost:3000/?page=mcp-servers and click "Add New MCP Server"
  2. Screenshot the same info glyphs, now lucide, at the same 16px size

Plugin row actions

  1. Open http://localhost:3000/?page=settings, open the Plugins tab, add a plugin if the table is empty
  2. Tab to the row action buttons and screenshot the names, now "Edit " and "Delete "

Agent wizard and date picker

  1. Open http://localhost:3000/?page=agents, click "Add New Agent", and screenshot the step markers and the agent name chip
  2. Open http://localhost:3000/?page=usage and screenshot the date range picker trigger
  3. Open http://localhost:3000/?page=router-settings, open Routing Groups, and screenshot the search box prefix

Type

🧹 Refactoring

Caveats (if any)

  • antd itself stays; only its icon package leaves
  • @ant-design/icons remains installed as an antd dependency
  • Filled check marks become lucide outline circles
  • The info-hint block now repeats in ~60 places

Final Attestation

  • The tests check the right things, including the edge cases, and regressions in the respective real-world customer use-cases are not possible after this PR

The dashboard drew its icons from two libraries at once: lucide-react,
which shadcn/ui ships with, and @ant-design/icons, left over from antd.
This moves the last 39 files onto lucide and drops the dependency, so
the icon set matches the component library everywhere.

antd icons sized themselves from the inherited font-size and rendered as
role="img" with an aria-label, neither of which a lucide svg does, so the
swap carries explicit size classes and gives the two icon-only plugin
buttons real accessible names.
@ryan-crabbe-berri
ryan-crabbe-berri requested a review from a team August 19, 2026 23:48
@ryan-crabbe-berri
ryan-crabbe-berri enabled auto-merge (squash) August 19, 2026 23:49
@greptile-apps

greptile-apps Bot commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR completes the dashboard’s migration from Ant Design icons to Lucide, removes the direct icon-package dependency, and improves accessible names for plugin actions.

  • Replaces remaining Ant Design icon imports across dashboard components.
  • Adds explicit sizing where icons are not covered by shared component styles.
  • Removes @ant-design/icons from the manifest and prohibits future imports through ESLint.
  • Updates affected tests for the new icons and accessible labels.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
ui/litellm-dashboard/src/components/routing_groups/index.tsx The prior sizing issue is resolved: the Ant Design Input prefix now uses size-4, and shared Button styles already size the Refresh and Plus SVGs.
ui/litellm-dashboard/src/components/Settings/AdminSettings/PluginSettings/PluginSettings.tsx Migrates plugin action icons and gives icon-only row actions contextual accessible names.
ui/litellm-dashboard/package.json Removes the dashboard’s direct dependency on @ant-design/icons.
ui/litellm-dashboard/eslint.config.mjs Prevents reintroduction of Ant Design icon imports.

Reviews (2): Last reviewed commit: "fix(ui): size the icons antd hosts inste..." | Re-trigger Greptile

antd Tag and Input render their icon slot without the size rules the
shadcn Button and InputGroupAddon apply, so the agent chip Bot and the
routing group search prefix kept lucide's 24px default.
@ryan-crabbe-berri

Copy link
Copy Markdown
Contributor Author

@greptileai re review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants