Skip to content

Commit ab04be5

Browse files
author
colinmcneil
committed
Remove placeholder MCP client data to fix flashing alert
1 parent 75e6845 commit ab04be5

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/extension/ui/src/components/CatalogGrid.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ export const CatalogGrid: React.FC<CatalogGridProps> = ({
109109
return <CircularProgress />
110110
}
111111

112-
const hasMCPConfigured = mcpLoading || Object.values(mcpClientStates || {}).some(state => state.exists && state.configured);
112+
const noConfiguredClients = !mcpLoading && !Object.values(mcpClientStates || {}).some(state => state.exists && state.configured);
113113

114114
return (
115115
<Stack spacing={2} justifyContent='center' alignItems='center'>
@@ -136,7 +136,7 @@ export const CatalogGrid: React.FC<CatalogGridProps> = ({
136136
}}>registry.yaml</Button>} severity="info">
137137
<Typography sx={{ width: '100%' }}>You have some prompts registered which are not available in the catalog.</Typography>
138138
</Alert>}
139-
{!hasMCPConfigured &&
139+
{noConfiguredClients &&
140140
<Alert
141141
severity="error"
142142
sx={{ fontSize: '1.2em', width: '90vw', maxWidth: '1000px', mt: 2 }}>
@@ -155,7 +155,7 @@ export const CatalogGrid: React.FC<CatalogGridProps> = ({
155155
<Tab sx={{ fontSize: '1.5em' }} label="Environment" />
156156
</Tooltip>
157157
<Tooltip title="These are clients which you have configured to use your tools.">
158-
<Tab sx={{ ...{ fontSize: '1.5em' }, ...(!hasMCPConfigured ? { color: 'docker.amber.400' } : {}) }} label="Clients" />
158+
<Tab sx={{ ...{ fontSize: '1.5em' }, ...(noConfiguredClients ? { color: 'docker.amber.400' } : {}) }} label="Clients" />
159159
</Tooltip>
160160
</Tabs>
161161
{tab < 2 && <Stack direction="row" spacing={1} alignItems='center' sx={{ mt: 1, py: 1 }}>

src/extension/ui/src/context/MCPClientContext.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ export function MCPClientProvider({ children, client }: MCPClientProviderProps)
8282
initialData: undefined,
8383
// Add eager loading settings
8484
staleTime: 30000, // Data remains fresh for 30 seconds
85-
placeholderData: {},
8685
gcTime: 300000 // Cache data for 5 minutes even if unused
8786
});
8887

0 commit comments

Comments
 (0)