litellm/ui/litellm-dashboard/tests
yuneng-jiang 93c1461074
fix(ui): restore hover feedback and dark-mode variants lost in the token migration (#37579)
* fix(ui): restore hover feedback and dark-mode variants lost in the token migration

PR #37576 mapped hardcoded Tailwind palette classes onto semantic tokens. Two-tone
hover pairs collapsed onto a single token, so 116 hover utilities across 49 files
became identical to their base class and produced no visible feedback, and in seven
files a dark: variant was dropped while its hardcoded light partner survived, leaving
those elements stuck light in dark mode.

Hover states now follow the alpha-step idiom the shadcn primitives already use
(hover:bg-primary/80, hover:bg-success/20): a duplicated hover:text-X or hover:bg-X
becomes /80, hover:border-border becomes hover:border-ring, and a duplicate is
dropped where another hover utility on the element already carries the change. One
transition-colors that no longer animated anything is removed.

For the dark-mode gaps, indigo maps onto info and amber onto warning. There is no
purple token in globals.css, so the purple sites keep their palette classes and get
their dark: partner back.

* fix(ui): add an eslint rule that fails a hover: utility identical to its base

The token migration collapsed two-tone hover pairs by hand, so nothing catches
the next one. `local/no-noop-hover-variant` reads every string literal and
template chunk and errors when a `hover:X` sits alongside a bare `X`, which is
exactly the shape that renders no hover feedback. It ships at error with no
suppression baseline, so the eleven sites that already carried a dead hover
before the migration are fixed here too.

The rule reads one class string at a time, so a base class supplied by a
different ternary branch than its hover partner is left alone: a selected row
whose resting colour already matches its hover colour is deliberate, not a bug.
2026-08-19 22:52:36 -07:00
..
eslint-rules fix(ui): restore hover feedback and dark-mode variants lost in the token migration (#37579) 2026-08-19 22:52:36 -07:00
mocks feat(ui): configure the auto router's heuristic scorer from the Admin UI (#37216) 2026-08-18 01:10:13 +00:00
CreateKeyPage.expiredToken.test.tsx fix(ui): navigate to /ui/login/ with trailing slash via hard navigation (#33561) 2026-07-16 12:18:55 -07:00
fetch-location-rule.test.ts refactor(ui): shared HTTP client + location-pinned fetch() lint rule (#29723) 2026-06-04 20:27:58 -07:00
jsdomFetchEnv.ts chore(build): move the Admin UI toolchain to Node 24 (#35801) 2026-08-04 12:36:07 -07:00
lint-budget-lib.test.ts chore(ui): remove eslint-metrics.json lint-count snapshot 2026-07-11 11:54:42 -07:00
mounted-form-host.tsx refactor(ui): port the add model form off antd Form onto react-hook-form (#37446) 2026-08-18 23:43:54 -07:00
setup.unit.ts test(ui): split the vitest suite into unit, component, integration and type projects (#37488) 2026-08-19 20:40:14 +00:00
setupTests.ts refactor(ui): migrate antd Modal onto the shared shadcn Dialog (#37540) 2026-08-19 23:16:42 +00:00
test-utils.tsx chore(ui): upgrade the dashboard to React 19 (#37411) 2026-08-19 21:18:08 +00:00
top_key_view.test.tsx rename 2025-12-11 16:33:23 -08:00