litellm/ui/litellm-dashboard/src
yuneng-jiang 658f50663d
fix(ui): keep Virtual Keys list state in the URL so it survives leaving the page (#39481)
* fix(ui): keep Virtual Keys list state in the URL so it survives leaving the page

The search term, sort, pagination and drawer filters lived in component
state, so navigating away from Virtual Keys and back reset the table to an
unfiltered first page. Move them into query state alongside the existing
?key= deep link, which also makes a filtered view shareable.

* fix(ui): namespace the Virtual Keys filter params and bound page inputs

The unprefixed team_id filter hijacked the /api-keys create-key deep link,
which already takes team_id as a prefill, so ?create=true&team_id=X silently
filtered the list underneath the modal. Prefix the four drawer filters.

Now that page and page_size come from the address bar, clamp them to what
/key/list accepts instead of forwarding 0, negatives or an int64-overflowing
page straight through, and trim filter values arriving from a URL the same
way the drawer already trims them.

* fix(ui): fall back to a sortable column when the URL names an unknown one

A hand-edited or stale sort_by reached /key/list, which 400s it, leaving the
Virtual Keys page on its loading skeleton with no error. Validate it against
the fields the table's own headers can produce, and clear sort_by rather than
blanking it when a sort is reset so the URL stays clean.

Also replaces a default-state URL assertion that ran before any query-state
write could land, so it could not fail for the regression it named.

* fix(ui): use TanStack's functionalUpdate instead of a hand-rolled updater resolver

The local helper narrowed typeof updater === "function" against an
unconstrained T, which TypeScript cannot do because T itself may be a function
type, so next build failed to type check. table-core already exports the same
helper.
2026-09-03 00:35:32 -07:00
..
app fix(guardrail): hide-secrets playground redaction and guardrail telemetry (#39398) 2026-09-03 00:01:03 -07:00
components fix(ui): keep Virtual Keys list state in the URL so it survives leaving the page (#39481) 2026-09-03 00:35:32 -07:00
contexts feat(ui): let admins supply a dark-mode variant of their custom logo (#37662) 2026-08-20 12:48:55 -07:00
data feat(ui): shadcn migration foundation: Tailwind v4, shadcn init, antd cascade fix (#31995) 2026-07-02 19:02:27 -07:00
hooks feat(ui): add a light/dark/system theme toggle to the top bar (#37669) 2026-08-20 12:58:29 -07:00
lib Merge pull request #39478 from BerriAI/litellm_ui_presets_mock_build_ctx 2026-09-02 22:38:59 -07:00
utils Merge pull request #38872 from BerriAI/litellm_fix_viewer_add_model_tab 2026-09-01 14:52:54 -07:00
types.ts added and ran prettier autoformatter 2025-10-04 18:19:48 -07:00