Add tooltip for URL field

A quick way to see the full URL if it's cut off

Inspired by @cliffhall's
[comment](https://github.com/modelcontextprotocol/inspector/pull/459#issuecomment-2932277785)
This commit is contained in:
Marc Abramowitz 2025-06-03 22:54:19 -07:00
commit 5da1dc3256

View file

@ -285,13 +285,20 @@ const Sidebar = ({
<label className="text-sm font-medium" htmlFor="sse-url-input"> <label className="text-sm font-medium" htmlFor="sse-url-input">
URL URL
</label> </label>
<Input <Tooltip>
id="sse-url-input" <TooltipTrigger asChild>
placeholder="URL" <Input
value={sseUrl} id="sse-url-input"
onChange={(e) => setSseUrl(e.target.value)} placeholder="URL"
className="font-mono" value={sseUrl}
/> onChange={(e) => setSseUrl(e.target.value)}
className="font-mono"
/>
</TooltipTrigger>
<TooltipContent>
{sseUrl || `Enter URL to MCP server`}
</TooltipContent>
</Tooltip>
</div> </div>
<div className="space-y-2"> <div className="space-y-2">
<Button <Button