GPT-5 finding
Server connect/disconnect does not refresh statuses in parent, leaving UI badges stale and prevents polling from starting
- app/src/components/channels/mcp/InstalledServerDetail.tsx
- app/src/components/channels/mcp/InstalledServerDetail.tsx
- app/src/components/channels/mcp/McpServersTab.tsx
- app/src/components/channels/mcp/McpServersTab.tsx
InstalledServerDetail triggers connect/disconnect and updates only its local tool list. McpServersTab maintains the canonical list of connection statuses and only refreshes them on initial load, on install/uninstall success, or via a poller that runs only when a server is already marked connected in statuses. Because connect/disconnect do not notify the parent nor cause a status refresh, the UI badges in the list and detail remain stale, and the poller may never start (it is gated behind seeing a connected status).
Recommendation
Plumb a callback from McpServersTab to InstalledServerDetail (e.g., onConnectionChanged or onRequestStatusRefresh) and invoke it after successful connect/disconnect so the parent calls fetchStatuses(). Alternatively, have InstalledServerDetail call mcpClientsApi.status() and pass the result up, or lift status management to a shared store. Also consider optimistic local status update to immediately reflect the new state.