From d5529467e4225d4dd6ac62f1e34b82543a623708 Mon Sep 17 00:00:00 2001 From: mateo-berri <277851410+mateo-berri@users.noreply.github.com> Date: Tue, 19 May 2026 07:09:10 +0000 Subject: [PATCH] fix(UserFieldsModal): distinguish 'all configured' from 'no defs' in preview --- .../src/components/mcp_tools/UserFieldsModal.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ui/litellm-dashboard/src/components/mcp_tools/UserFieldsModal.tsx b/ui/litellm-dashboard/src/components/mcp_tools/UserFieldsModal.tsx index 616f1a6a3bd..dd4b3768386 100644 --- a/ui/litellm-dashboard/src/components/mcp_tools/UserFieldsModal.tsx +++ b/ui/litellm-dashboard/src/components/mcp_tools/UserFieldsModal.tsx @@ -75,9 +75,16 @@ const UserFieldsModal: React.FC = ({ return `${window.location.origin}${window.location.pathname}?${params.toString()}`; }; + const previewStatusLine = + defs.length === 0 + ? "No fields defined." + : missing.length === 0 + ? "All fields configured." + : `Missing field${missing.length === 1 ? "" : "s"}:`; + const errorPreview = `Error: MCP server "${serverDisplayName}" requires user configuration before use. -${missing.length > 0 ? `Missing field${missing.length === 1 ? "" : "s"}:` : "No fields defined."} +${previewStatusLine} ${missing.map((f) => ` • ${f.label || f.name}${f.description ? ` — ${f.description}` : ""}`).join("\n")} Please configure your fields at: