Skip to content
This repository was archived by the owner on May 21, 2026. It is now read-only.

Commit 0c92d49

Browse files
committed
feat(inspector): integrate react-resizable-panels and enhance UI components
- Add react-resizable-panels dependency for improved layout management - Implement Discord button and deploy dialog in the Layout component - Enhance ToolsTab with search functionality and responsive design - Refactor badge and tab components for better styling and usability - Update package.json to include new dependencies and improve overall structure
1 parent 032499e commit 0c92d49

7 files changed

Lines changed: 508 additions & 242 deletions

File tree

packages/inspector/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
"motion": "^12.23.22",
5151
"react": "^19.2.0",
5252
"react-dom": "^19.2.0",
53+
"react-resizable-panels": "^3.0.6",
5354
"react-router-dom": "^7.9.3",
5455
"react-syntax-highlighter": "^15.6.6",
5556
"tailwind-merge": "^3.3.1"

packages/inspector/src/client/components/Layout.tsx

Lines changed: 99 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
11
import type { ReactNode } from 'react'
2-
import { FolderOpen, MessageSquare, Wrench } from 'lucide-react'
2+
import { FolderOpen, MessageSquare, Rocket, Wrench } from 'lucide-react'
33
import { useEffect, useState } from 'react'
44
import { useLocation, useNavigate } from 'react-router-dom'
55
import LogoAnimated from '@/components/LogoAnimated'
66
import { ShimmerButton } from '@/components/ui/shimmer-button'
77
import { Tabs, TabsList, TabsTrigger } from '@/components/ui/tabs'
88
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip'
99
import { cn } from '@/lib/utils'
10+
import { Button } from '../../components/ui/button'
11+
import {
12+
Dialog,
13+
DialogContent,
14+
DialogDescription,
15+
DialogHeader,
16+
DialogTitle,
17+
DialogTrigger,
18+
} from '../../components/ui/dialog'
1019
import {
1120
DropdownMenu,
1221
DropdownMenuContent,
@@ -23,6 +32,23 @@ interface LayoutProps {
2332
children: ReactNode
2433
}
2534

35+
// Discord Icon Component
36+
function DiscordIcon({ className }: { className?: string }) {
37+
return (
38+
<svg
39+
viewBox="0 -28.5 256 256"
40+
className={className}
41+
fill="currentColor"
42+
xmlns="http://www.w3.org/2000/svg"
43+
>
44+
<path
45+
d="M216.856339,16.5966031 C200.285002,8.84328665 182.566144,3.2084988 164.041564,0 C161.766523,4.11318106 159.108624,9.64549908 157.276099,14.0464379 C137.583995,11.0849896 118.072967,11.0849896 98.7430163,14.0464379 C96.9108417,9.64549908 94.1925838,4.11318106 91.8971895,0 C73.3526068,3.2084988 55.6133949,8.86399117 39.0420583,16.6376612 C5.61752293,67.146514 -3.4433191,116.400813 1.08711069,164.955721 C23.2560196,181.510915 44.7403634,191.567697 65.8621325,198.148576 C71.0772151,190.971126 75.7283628,183.341335 79.7352139,175.300261 C72.104019,172.400575 64.7949724,168.822202 57.8887866,164.667963 C59.7209612,163.310589 61.5131304,161.891452 63.2445898,160.431257 C105.36741,180.133187 151.134928,180.133187 192.754523,160.431257 C194.506336,161.891452 196.298154,163.310589 198.110326,164.667963 C191.183787,168.842556 183.854737,172.420929 176.223542,175.320965 C180.230393,183.341335 184.861538,190.991831 190.096624,198.16893 C211.238746,191.588051 232.743023,181.531619 254.911949,164.955721 C260.227747,108.668201 245.831087,59.8662432 216.856339,16.5966031 Z M85.4738752,135.09489 C72.8290281,135.09489 62.4592217,123.290155 62.4592217,108.914901 C62.4592217,94.5396472 72.607595,82.7145587 85.4738752,82.7145587 C98.3405064,82.7145587 108.709962,94.5189427 108.488529,108.914901 C108.508531,123.290155 98.3405064,135.09489 85.4738752,135.09489 Z M170.525237,135.09489 C157.88039,135.09489 147.510584,123.290155 147.510584,108.914901 C147.510584,94.5396472 157.658606,82.7145587 170.525237,82.7145587 C183.391518,82.7145587 193.761324,94.5189427 193.539891,108.914901 C193.539891,123.290155 183.391518,135.09489 170.525237,135.09489 Z"
46+
fillRule="nonzero"
47+
/>
48+
</svg>
49+
)
50+
}
51+
2652
// Pulsing emerald dot component
2753
function StatusDot({ status }: { status: string }) {
2854
const getStatusInfo = (status: string) => {
@@ -176,13 +202,82 @@ export function Layout({ children }: LayoutProps) {
176202
)}
177203
</div>
178204

179-
{/* Right side: Logo + Text */}
180-
<LogoAnimated state="expanded" />
205+
{/* Right side: Discord Button + Deploy Button + Logo */}
206+
<div className="flex items-center gap-4">
207+
<Button
208+
variant="ghost"
209+
className="hover:bg-zinc-200 dark:hover:bg-zinc-800 rounded-full"
210+
size="sm"
211+
asChild
212+
>
213+
<a
214+
href="https://discord.gg/XkNkSkMz3V"
215+
className="flex items-center gap-2"
216+
target="_blank"
217+
rel="noopener noreferrer"
218+
>
219+
<DiscordIcon className="h-4 w-4" />
220+
Discord
221+
</a>
222+
</Button>
223+
<Dialog>
224+
<DialogTrigger asChild>
225+
<Button variant="outline" size="sm" className="gap-2">
226+
<Rocket className="h-4 w-4" />
227+
Deploy
228+
</Button>
229+
</DialogTrigger>
230+
<DialogContent className="sm:max-w-md">
231+
<DialogHeader>
232+
<DialogTitle>Deploy Your MCP Server</DialogTitle>
233+
<DialogDescription>
234+
Choose how you'd like to deploy your MCP server
235+
</DialogDescription>
236+
</DialogHeader>
237+
<div className="grid gap-4 py-4">
238+
<Button
239+
variant="outline"
240+
className="h-auto p-4 flex flex-col items-start gap-2"
241+
onClick={() => {
242+
// Mock implementation for hosted deployment
243+
// TODO: Implement actual deployment logic
244+
}}
245+
>
246+
<div className="flex items-center gap-2">
247+
<Rocket className="h-4 w-4" />
248+
<span className="font-medium">Hosted on MCP Use</span>
249+
<span className="text-xs bg-green-100 text-green-800 px-2 py-1 rounded">Free</span>
250+
</div>
251+
<p className="text-sm text-muted-foreground text-left">
252+
Deploy your server to our managed infrastructure with zero configuration
253+
</p>
254+
</Button>
255+
<Button
256+
variant="outline"
257+
className="h-auto p-4 flex flex-col items-start gap-2"
258+
onClick={() => {
259+
// Mock implementation for Docker deployment
260+
// TODO: Implement actual deployment logic
261+
}}
262+
>
263+
<div className="flex items-center gap-2">
264+
<div className="h-4 w-4 bg-blue-500 rounded" />
265+
<span className="font-medium">Docker</span>
266+
</div>
267+
<p className="text-sm text-muted-foreground text-left">
268+
Get Docker configuration files to deploy on your own infrastructure
269+
</p>
270+
</Button>
271+
</div>
272+
</DialogContent>
273+
</Dialog>
274+
<LogoAnimated state="expanded" />
275+
</div>
181276
</div>
182277
</header>
183278

184279
{/* Main Content */}
185-
<main className="flex-1 max-w-screen-2xl w-full mx-auto bg-white rounded-2xl p-6 overflow-auto">
280+
<main className="flex-1 max-w-screen-2xl w-full mx-auto bg-white rounded-2xl p-0 overflow-auto">
186281
{selectedServer && activeTab === 'tools'
187282
? (
188283
<ToolsTab

0 commit comments

Comments
 (0)