diff --git a/web/src/app/home/components/home-sidebar/HomeSidebar.tsx b/web/src/app/home/components/home-sidebar/HomeSidebar.tsx index bd4d4af1..99dbc07d 100644 --- a/web/src/app/home/components/home-sidebar/HomeSidebar.tsx +++ b/web/src/app/home/components/home-sidebar/HomeSidebar.tsx @@ -204,6 +204,21 @@ function sortByRecent(items: SidebarEntityItem[]): SidebarEntityItem[] { }); } +// MCP status dot color: disabled → gray, error → red, connecting → yellow, connected → green +function mcpStatusColor(item: SidebarEntityItem): string { + if (item.enabled === false) return 'bg-muted-foreground/40'; + switch (item.runtimeStatus) { + case 'connected': + return 'bg-green-500'; + case 'connecting': + return 'bg-yellow-500'; + case 'error': + return 'bg-red-500'; + default: + return 'bg-muted-foreground/40'; + } +} + // Plugin operation type enum enum PluginOperationType { DELETE = 'DELETE', @@ -412,9 +427,11 @@ function NavItems({ )} @@ -423,9 +440,7 @@ function NavItems({ ) : null} @@ -468,9 +483,11 @@ function NavItems({ )} @@ -479,9 +496,7 @@ function NavItems({ ) : null} diff --git a/web/src/app/home/components/home-sidebar/SidebarDataContext.tsx b/web/src/app/home/components/home-sidebar/SidebarDataContext.tsx index 08eb2ebc..bf9345ae 100644 --- a/web/src/app/home/components/home-sidebar/SidebarDataContext.tsx +++ b/web/src/app/home/components/home-sidebar/SidebarDataContext.tsx @@ -21,6 +21,8 @@ export interface SidebarEntityItem { updatedAt?: string; // ISO timestamp for sorting by most recently edited // Bot-specific fields enabled?: boolean; + // MCP-specific fields + runtimeStatus?: 'connecting' | 'connected' | 'error'; // Plugin-specific fields installSource?: string; installInfo?: Record; @@ -169,6 +171,7 @@ export function SidebarDataProvider({ id: server.name, name: server.name, enabled: server.enable, + runtimeStatus: server.runtime_info?.status, })), ); } catch (error) {