Commit 57b328f
authored
refactor(ui): map hardcoded Tailwind palette classes onto semantic tokens (#37576)
* refactor(ui): map hardcoded Tailwind palette classes onto semantic tokens
The dashboard painted itself with literal palette utilities (text-gray-500,
bg-blue-50, border-red-200) that resolve to one fixed color regardless of
theme, so the shadcn token layer and its .dark block could never take effect.
A codemod (scripts/codemod-color-tokens.mjs) rewrites 3,232 of those across
254 files onto the existing token scale: neutrals become foreground /
muted-foreground / muted / border / card, and red, green, amber and blue
collapse into destructive, success, warning and info, with the pale -50 to
-300 tints expressed as opacity modifiers on the same token. Hover and focus
variants map to accent so they lift rather than recess. 210 now-redundant
dark: variants are dropped since the tokens carry both modes.
The .dark palette is retuned to a neutral gray ramp with the sidebar recessed
below the content canvas, replacing the blue-tinted shadcn default where the
sidebar read as a full-height card floating on a near-black page.
Nothing sets the .dark class yet, so light mode is unchanged and dark mode
stays inert until a theme toggle lands.
* chore(ui): drop the one-shot color-token codemod script1 parent 7b574b9 commit 57b328f
256 files changed
Lines changed: 2460 additions & 2424 deletions
File tree
- ui/litellm-dashboard
- src
- app
- (dashboard)
- access-groups/_components
- agents/_components
- api-reference/_components
- caching/_components
- coordination_redis_settings
- cost-optimization/_components
- cost-tracking/_components
- pricing_calculator
- guardrails-monitor/_components
- guardrails/_components
- custom_code
- llm_judge
- mcp-servers/_components
- models-and-endpoints/components
- playground/components
- chat_ui
- compareUI
- components
- complianceUI
- policies/_components
- prompts/_components
- prompt_editor_view
- conversation_panel
- router-settings/_components
- search-tools/_components
- skills/_components
- tag-management/_components
- components
- usage/_components/components
- EndpointUsage/components
- EntityUsage
- UsageViewSelect
- users/_components
- view_users
- vector-stores/_components
- workflows
- chat
- mcp/oauth/callback
- components
- AIHub
- forms
- EntityUsageExport
- GuardrailsMonitor
- PassThroughSettings
- Settings
- AdminSettings/SSOSettings
- RouterSettings/Fallbacks
- SidebarAccountMenu
- TeamsPage
- ToolPolicies
- UsagePage/components
- EntityUsage
- VirtualKeysPage
- add_model
- alerting
- chat_ui
- chat
- claude_code_plugins
- common_components
- IconActionButton/TableIconActionButtons
- key_team_helpers
- mcp_server_management
- mcp_tools
- model_dashboard
- molecules/logo
- organisms
- organization/org-settings
- permissions
- router_settings
- team
- templates
- ui
- view_logs
- AuditLogDrawer
- EvalViewer
- GuardrailViewer
- LogDetailsDrawer
- ToolsSection
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
| 25 | + | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| |||
Lines changed: 12 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| |||
588 | 588 | | |
589 | 589 | | |
590 | 590 | | |
591 | | - | |
| 591 | + | |
592 | 592 | | |
593 | 593 | | |
594 | 594 | | |
| |||
758 | 758 | | |
759 | 759 | | |
760 | 760 | | |
761 | | - | |
762 | | - | |
763 | | - | |
764 | | - | |
| 761 | + | |
765 | 762 | | |
766 | | - | |
| 763 | + | |
767 | 764 | | |
768 | 765 | | |
769 | | - | |
| 766 | + | |
770 | 767 | | |
771 | 768 | | |
772 | 769 | | |
773 | 770 | | |
774 | | - | |
| 771 | + | |
775 | 772 | | |
776 | 773 | | |
777 | 774 | | |
| |||
880 | 877 | | |
881 | 878 | | |
882 | 879 | | |
883 | | - | |
| 880 | + | |
884 | 881 | | |
885 | 882 | | |
886 | 883 | | |
| |||
909 | 906 | | |
910 | 907 | | |
911 | 908 | | |
912 | | - | |
| 909 | + | |
913 | 910 | | |
914 | 911 | | |
915 | 912 | | |
| |||
919 | 916 | | |
920 | 917 | | |
921 | 918 | | |
922 | | - | |
| 919 | + | |
923 | 920 | | |
924 | 921 | | |
925 | 922 | | |
| |||
946 | 943 | | |
947 | 944 | | |
948 | 945 | | |
949 | | - | |
| 946 | + | |
950 | 947 | | |
951 | 948 | | |
952 | 949 | | |
| |||
993 | 990 | | |
994 | 991 | | |
995 | 992 | | |
996 | | - | |
| 993 | + | |
997 | 994 | | |
998 | 995 | | |
999 | | - | |
| 996 | + | |
1000 | 997 | | |
1001 | 998 | | |
1002 | 999 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
337 | | - | |
| 337 | + | |
338 | 338 | | |
339 | 339 | | |
340 | 340 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
278 | 278 | | |
279 | 279 | | |
280 | 280 | | |
281 | | - | |
| 281 | + | |
282 | 282 | | |
283 | 283 | | |
284 | 284 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
| 19 | + | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
171 | | - | |
| 171 | + | |
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
176 | | - | |
| 176 | + | |
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
| |||
ui/litellm-dashboard/src/app/(dashboard)/caching/_components/coordination_redis_settings/index.tsx
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
| 110 | + | |
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
ui/litellm-dashboard/src/app/(dashboard)/cost-optimization/_components/AutoRouterBenchmarksTab.tsx
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| |||
0 commit comments