litellm/ui/litellm-dashboard/src/hooks
ryan-crabbe-berri eda81fff59 feat(ui): shared URL-state layer for tables and tabs
Add useUrlTableState (search, sort, page, page size and filter_<column>
in the query string via one nuqs useQueryStates call, with keyPrefix and
urlKeys for routes that host two tables or need legacy key names) and
useUrlTab (validated ?tab= param with a role-aware fallback). Migrate
the Virtual Keys table onto useUrlTableState with a byte-identical URL
contract and bind the Playground tab strip to ?tab=.

DataTable gains controlled columnVisibility/onColumnVisibilityChange
plus usePersistedColumnVisibility (localStorage per table id), and an
isError prop that keeps the server page clamp from rewriting a
deep-linked ?page= after a failed fetch. Virtual Keys uses both.

The expired-session redirect in handleError now keeps the query string
and hash so the return URL captured on re-login restores the filtered
view instead of the bare list.

Delete useTabRouting and tabRoutes, the pathname tab router left over
from the reverted path-per-tab attempt (#34327, reverted in #34629);
tab persistence has to be a query param on the static export.
2026-09-16 15:51:45 -07:00
..
policies refactor(ui): codemod every toast call site onto lib/toast and delete the antd-era facades (#37253) 2026-08-18 18:24:49 +00:00
mcpOAuthUtils.ts fix(mcp): let non-creator users OAuth into OBO-mode MCP servers from the Tools page (#29867) 2026-06-08 13:35:49 -07:00
use-safe-layout-effect.ts added and ran prettier autoformatter 2025-10-04 18:19:48 -07:00
useMcpOAuthFlow.test.tsx refactor(ui): codemod every toast call site onto lib/toast and delete the antd-era facades (#37253) 2026-08-18 18:24:49 +00:00
useMcpOAuthFlow.tsx refactor(ui): codemod every toast call site onto lib/toast and delete the antd-era facades (#37253) 2026-08-18 18:24:49 +00:00
useSyntaxTheme.test.tsx feat(ui): add a light/dark/system theme toggle to the top bar (#37669) 2026-08-20 12:58:29 -07:00
useSyntaxTheme.ts feat(ui): add a light/dark/system theme toggle to the top bar (#37669) 2026-08-20 12:58:29 -07:00
useTestMCPConnection.tsx refactor(ui): useTestMCPConnection uses the shared isClientForwardedTokenMode helper 2026-07-09 13:51:03 -07:00
useToolsOAuthFlow.test.tsx refactor(ui): codemod every toast call site onto lib/toast and delete the antd-era facades (#37253) 2026-08-18 18:24:49 +00:00
useToolsOAuthFlow.tsx refactor(ui): codemod every toast call site onto lib/toast and delete the antd-era facades (#37253) 2026-08-18 18:24:49 +00:00
useUrlTab.test.tsx feat(ui): shared URL-state layer for tables and tabs 2026-09-16 15:51:45 -07:00
useUrlTab.ts feat(ui): shared URL-state layer for tables and tabs 2026-09-16 15:51:45 -07:00
useUserMcpOAuthFlow.tsx refactor(ui): codemod every toast call site onto lib/toast and delete the antd-era facades (#37253) 2026-08-18 18:24:49 +00:00
useVisitedTabs.ts fix(ui): keep tab panel state across tab switches on the migrated routes 2026-07-23 23:16:34 -07:00
useWorker.ts style(ui): run prettier --write across the dashboard (#29622) 2026-06-04 11:37:54 -07:00