From 366be211c1e64bc84951908f1fd48196355b62f8 Mon Sep 17 00:00:00 2001 From: mateo-berri <277851410+mateo-berri@users.noreply.github.com> Date: Tue, 19 May 2026 06:50:52 +0000 Subject: [PATCH] fix(mcp_servers): only consume openUserFields deep-link param once target is matched Previously the param was stripped from the URL on the first effect run even when the target server was not yet present in serversWithHealth, so a later re-render with the populated list could not re-open the modal. Move the URL cleanup back inside the matched-target branch so the deep link is consumed exactly when the modal is opened. --- .../src/components/mcp_tools/mcp_servers.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ui/litellm-dashboard/src/components/mcp_tools/mcp_servers.tsx b/ui/litellm-dashboard/src/components/mcp_tools/mcp_servers.tsx index 14e4cf3501b..0b6bcbd9079 100644 --- a/ui/litellm-dashboard/src/components/mcp_tools/mcp_servers.tsx +++ b/ui/litellm-dashboard/src/components/mcp_tools/mcp_servers.tsx @@ -99,9 +99,8 @@ const MCPServers: React.FC = ({ accessToken, userRole, userID }) const targetId = params.get("openUserFields"); if (!targetId) return; const target = serversWithHealth.find((s) => s.server_id === targetId); - if (target) { - setUserFieldsServer(target); - } + if (!target) return; + setUserFieldsServer(target); params.delete("openUserFields"); const remaining = params.toString(); const newUrl =