From 5b54ce1281bcaa9880b432bc00261d6c0c2a5b62 Mon Sep 17 00:00:00 2001 From: sumeetpardeshi Date: Mon, 12 May 2025 20:17:28 -0700 Subject: [PATCH] adding fixes as buttons were not visible for streamable-http transport type, as per PR review comment --- client/src/components/Sidebar.tsx | 106 ++++++------- .../src/components/__tests__/Sidebar.test.tsx | 145 +++++++++++++----- 2 files changed, 156 insertions(+), 95 deletions(-) diff --git a/client/src/components/Sidebar.tsx b/client/src/components/Sidebar.tsx index 5efa721..358aa9c 100644 --- a/client/src/components/Sidebar.tsx +++ b/client/src/components/Sidebar.tsx @@ -119,13 +119,22 @@ const Sidebar = ({ args: args.trim() ? args.split(/\s+/) : [], env: { ...env }, }; - } else { + } + if (transportType === "sse") { return { type: "sse", url: sseUrl, note: "For SSE connections, add this URL directly in Client", }; } + if (transportType === "streamable-http") { + return { + type: "streamable-http", + url: sseUrl, + note: "For Streamable HTTP connections, add this URL directly in Client", + }; + } + return {}; }, [transportType, command, args, env, sseUrl]); // Memoized config entry generator @@ -266,44 +275,6 @@ const Sidebar = ({ className="font-mono" /> -
- - - - - Copy Server Entry - - - - - - Copy Servers File - -
) : ( <> @@ -319,22 +290,6 @@ const Sidebar = ({ className="font-mono" /> -
- -
+ + Copy Server Entry + + + + + + Copy Servers File + +
+ {/* Configuration */}