@@ -11,6 +11,7 @@ import type {
1111} from "@/api/types" ;
1212import { StatusBadge } from "@/components/cards/StatusBadge" ;
1313import { formatDuration } from "@/lib/formatDuration" ;
14+ import { Eye , EyeOff } from "lucide-react" ;
1415
1516type Tab = "overview" | "explore" | "help" ;
1617
@@ -61,6 +62,11 @@ function OverviewTab() {
6162 const tools = toolsData ?. tools ?? [ ] ;
6263 const connections = connectionsData ?. connections ?? [ ] ;
6364
65+ const hiddenToolSet = useMemo (
66+ ( ) => new Set ( connections . flatMap ( ( c ) => c . hidden_tools ?? [ ] ) ) ,
67+ [ connections ] ,
68+ ) ;
69+
6470 return (
6571 < div className = "space-y-6" >
6672 { /* Connections grid */ }
@@ -109,16 +115,28 @@ function OverviewTab() {
109115 </ tr >
110116 </ thead >
111117 < tbody >
112- { tools . map ( ( tool , idx ) => (
113- < tr key = { `${ tool . name } -${ tool . connection } -${ idx } ` } className = "border-b" >
114- < td className = "px-3 py-2 font-mono text-xs" > { tool . name } </ td >
115- < td className = "px-3 py-2" >
116- < StatusBadge variant = "neutral" > { tool . kind } </ StatusBadge >
117- </ td >
118- < td className = "px-3 py-2 text-xs" > { tool . connection } </ td >
119- < td className = "px-3 py-2 text-xs" > { tool . toolkit } </ td >
120- </ tr >
121- ) ) }
118+ { tools . map ( ( tool , idx ) => {
119+ const isHidden = hiddenToolSet . has ( tool . name ) ;
120+ return (
121+ < tr key = { `${ tool . name } -${ tool . connection } -${ idx } ` } className = "border-b" >
122+ < td className = "px-3 py-2 font-mono text-xs" >
123+ < span className = "flex items-center gap-1.5" >
124+ { isHidden ? (
125+ < EyeOff className = "h-3 w-3 shrink-0 opacity-40" />
126+ ) : (
127+ < Eye className = "h-3 w-3 shrink-0 opacity-40" />
128+ ) }
129+ < span className = { isHidden ? "opacity-50" : "" } > { tool . name } </ span >
130+ </ span >
131+ </ td >
132+ < td className = "px-3 py-2" >
133+ < StatusBadge variant = "neutral" > { tool . kind } </ StatusBadge >
134+ </ td >
135+ < td className = "px-3 py-2 text-xs" > { tool . connection } </ td >
136+ < td className = "px-3 py-2 text-xs" > { tool . toolkit } </ td >
137+ </ tr >
138+ ) ;
139+ } ) }
122140 { tools . length === 0 && (
123141 < tr >
124142 < td
@@ -191,6 +209,12 @@ function ExploreTab() {
191209 . sort ( ) ;
192210 } , [ connections , schemas , search ] ) ;
193211
212+ // Set of tool names hidden by global visibility filter
213+ const hiddenToolSet = useMemo (
214+ ( ) => new Set ( connections . flatMap ( ( c ) => c . hidden_tools ?? [ ] ) ) ,
215+ [ connections ] ,
216+ ) ;
217+
194218 const selectTool = useCallback (
195219 ( toolName : string , connection : ConnectionInfo | null ) => {
196220 setSelectedTool ( toolName ) ;
@@ -313,20 +337,28 @@ function ExploreTab() {
313337 { conn . name }
314338 </ span >
315339 </ div >
316- { conn . tools . map ( ( toolName ) => (
317- < button
318- key = { `${ conn . connection } -${ toolName } ` }
319- onClick = { ( ) => selectTool ( toolName , conn ) }
320- className = { `flex w-full rounded-md px-3 py-1.5 text-left text-xs font-medium transition-colors ${
321- selectedTool === toolName &&
322- selectedConnection === conn . connection
323- ? "bg-primary/10 text-primary"
324- : "text-muted-foreground hover:bg-muted hover:text-foreground"
325- } `}
326- >
327- { toolName }
328- </ button >
329- ) ) }
340+ { conn . tools . map ( ( toolName ) => {
341+ const isHidden = hiddenToolSet . has ( toolName ) ;
342+ return (
343+ < button
344+ key = { `${ conn . connection } -${ toolName } ` }
345+ onClick = { ( ) => selectTool ( toolName , conn ) }
346+ className = { `flex w-full items-center gap-1.5 rounded-md px-3 py-1.5 text-left text-xs font-medium transition-colors ${
347+ selectedTool === toolName &&
348+ selectedConnection === conn . connection
349+ ? "bg-primary/10 text-primary"
350+ : "text-muted-foreground hover:bg-muted hover:text-foreground"
351+ } `}
352+ >
353+ { isHidden ? (
354+ < EyeOff className = "h-3 w-3 shrink-0 opacity-40" />
355+ ) : (
356+ < Eye className = "h-3 w-3 shrink-0 opacity-40" />
357+ ) }
358+ < span className = { isHidden ? "opacity-50" : "" } > { toolName } </ span >
359+ </ button >
360+ ) ;
361+ } ) }
330362 </ div >
331363 ) ) }
332364 { platformTools . length > 0 && (
@@ -341,12 +373,13 @@ function ExploreTab() {
341373 < button
342374 key = { `platform-${ toolName } ` }
343375 onClick = { ( ) => selectTool ( toolName , null ) }
344- className = { `flex w-full rounded-md px-3 py-1.5 text-left text-xs font-medium transition-colors ${
376+ className = { `flex w-full items-center gap-1.5 rounded-md px-3 py-1.5 text-left text-xs font-medium transition-colors ${
345377 selectedTool === toolName && selectedConnection === ""
346378 ? "bg-primary/10 text-primary"
347379 : "text-muted-foreground hover:bg-muted hover:text-foreground"
348380 } `}
349381 >
382+ < Eye className = "h-3 w-3 shrink-0 opacity-40" />
350383 { toolName }
351384 </ button >
352385 ) ) }
0 commit comments