mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-28 00:00:38 +00:00
* feat(ui): persist mcp state in the URL The MCP Servers page keeps its tab, team, access group, search and sort filters, the open server and its tab, the selected tool and tool search, the toolsets table sort and page, the Connect client tab and the submissions filters in the query string, so reloads, shared links and back/forward restore the same view. The open server is resolved from the full server list, so a deep link opens it even when the current filters hide it and an unknown id shows the list instead of an "Unnamed Server" placeholder. The fill_env_vars deep link and the tools/edit OAuth return now go through nuqs instead of window.history, and the OAuth return writes server and server_tab. MCPConnect now defines its code block and step card at module level and renders the tab bodies as plain elements, so switching the URL-backed client tab (or copying a snippet) no longer remounts them and resets the x-mcp-servers toggle. * fix(ui): address review on mcp url state A stale edit OAuth state no longer overrides the server in the URL and is dropped when its server is gone. The empty state now says no server matches when filters hide every server. Admin tab gates share one flag. Tests cover every page tab value, clearing detail keys on Back, the tool result tag, malformed stored OAuth state and the http client tab. * chore(ui): prune stale eslint suppressions for mcp servers * fix(ui): keep mcp tab links while the user role loads Every page and server tab is now a valid URL value. Visibility is resolved at render against the role, the same way the Models page does it, so a link to an admin-only tab is no longer stripped while /management/v1/users/me is still loading. A role that cannot see a tab gets All Servers or Overview and the link stays in the URL. Renames the network tab slug to network-settings to match the tab value, and adds connections and user-credentials for the Live Connections and User Credentials tabs. * test(ui): cover mcp url state for role loading, gated tabs and edge links Adds hook tests for the tab resolver, role gates, OAuth restore and the fill_env_vars link, plus page-level tests for unknown servers, literal search text, a bare URL that writes nothing and an internal user who never loads the semantic filter settings. * test(ui): make the mcp url state absence checks able to fail The non-admin settings link test read URL writes before nuqs flushed them, so it passed on code that stripped the param. It now rerenders as an admin and expects Settings. The bare URL test gains a follow-up write so an unwired listener cannot pass it. * test(ui): add an e2e spec for mcp servers url state Covers the role matrix for gated page and server tab links, links that arrive before the role, a logged-out link through login, a failed role request, and Back and Forward for an open server and a picked tool. * test(ui): match the mcp e2e liveness requests by suffix so the spec runs under a root path * fix(ui): skip the history entry when the selected mcp tool is picked again * test(ui): pin replace history for mcp server filters, tool search and submission search * refactor(ui): keep the mcp servers component under the complexity limit The null-guarded role checks pushed MCPServers to a complexity of 21, one over the lint limit, which took the dashboard complexity budget to 141 of 140. Moving them into a module-level roleAccess helper keeps the same results. * test(ui): pin the live connections tab fallback for an org admin An org admin passes the admin check but not the proxy admin tier check, so a connections link must show All Servers, keep the param and never request live sessions. Kills the mutants that open the gate to any role or to every admin. * test(ui): move the mcp url state cases into integration test files The URL state cases render MCPServers and MCPToolsViewer with their real child components and stub only the network, so they belong in the integration tier per the dashboard testing guide. The unit files keep the existing cases. --------- Co-authored-by: Yuneng Jiang <yuneng@berri.ai> |
||
|---|---|---|
| .. | ||
| a2a | ||
| access_control | ||
| batches | ||
| claude_code | ||
| cli_harness | ||
| codex | ||
| coverage_registry | ||
| gateway | ||
| guardrails | ||
| llm_translation | ||
| logging | ||
| management | ||
| mcp | ||
| migrations | ||
| other | ||
| perf | ||
| quota_management | ||
| router | ||
| ui | ||
| AGENTS.md | ||
| conftest.py | ||
| CONTRIBUTING.md | ||
| e2e_config.py | ||
| e2e_db.py | ||
| e2e_http.py | ||
| e2e_metadata.py | ||
| fixture_bundle.py | ||
| fixture_canonical.py | ||
| fixture_mode.py | ||
| fixture_profile.py | ||
| idp.py | ||
| idp_realm.json | ||
| junit_properties.py | ||
| lifecycle.py | ||
| memory_readings.py | ||
| models.py | ||
| otel_client.py | ||
| PROVIDER_CACHE.md | ||
| provider_cache.py | ||
| provider_cache_redis.py | ||
| provider_cache_routing.py | ||
| provider_edge.py | ||
| provider_edge_bedrock.py | ||
| proxy_client.py | ||
| pytest.ini | ||
| transport.py | ||