diff --git a/src/services/mcp/McpHub.ts b/src/services/mcp/McpHub.ts index cd874c987b..dbf2baeac2 100644 --- a/src/services/mcp/McpHub.ts +++ b/src/services/mcp/McpHub.ts @@ -809,6 +809,11 @@ export class McpHub { } else if (this.configsRequireRestart(JSON.parse(currentConnection.server.config), config)) { // Existing server with changed connection config (excludes Cline-specific settings) try { + // Set status to "connecting" and notify webview before restart (same pattern as restartConnection) + currentConnection.server.status = "connecting" + currentConnection.server.error = "" + await this.notifyWebviewOfServerChanges() + if (config.type === "stdio") { this.setupFileWatcher(name, config) } @@ -1027,6 +1032,11 @@ export class McpHub { const connection = this.connections.find((conn) => conn.server.name === serverName) if (connection) { connection.server.disabled = disabled + // When enabling a server, set status to "connecting" so UI shows yellow indicator + if (!disabled) { + connection.server.status = "connecting" + connection.server.error = "" + } } const serverOrder = Object.keys(config.mcpServers || {}) diff --git a/webview-ui/src/components/chat/chat-view/components/layout/ActionButtons.tsx b/webview-ui/src/components/chat/chat-view/components/layout/ActionButtons.tsx index a10eaf40c3..cc0e64cd8f 100644 --- a/webview-ui/src/components/chat/chat-view/components/layout/ActionButtons.tsx +++ b/webview-ui/src/components/chat/chat-view/components/layout/ActionButtons.tsx @@ -120,6 +120,14 @@ export const ActionButtons: React.FC = ({ behavior: "smooth", }) disableAutoScrollRef.current = true + // Virtual rendering may not have all items rendered when at bottom, + // so scroll again after a delay to ensure we reach the true top + setTimeout(() => { + scrollBehavior.virtuosoRef.current?.scrollTo({ + top: 0, + behavior: "smooth", + }) + }, 300) } return ( diff --git a/webview-ui/src/components/history/HistoryPreview.tsx b/webview-ui/src/components/history/HistoryPreview.tsx index 50e67bdbfa..2a2645ee2a 100644 --- a/webview-ui/src/components/history/HistoryPreview.tsx +++ b/webview-ui/src/components/history/HistoryPreview.tsx @@ -146,7 +146,7 @@ const HistoryPreview = ({ showHistoryView }: HistoryPreviewProps) => { style={{ display: "flex", alignItems: "center", - justifyContent: "flex-start", + justifyContent: "center", }}> void - icon: string - label: string -} - -const CustomFilterRadio = ({ checked, onChange, icon, label }: CustomFilterRadioProps) => { - return ( -
-
- {checked &&
} -
- -
- {label} - -
- ) -} - const HistoryView = ({ onDone }: HistoryViewProps) => { const extensionStateContext = useExtensionState() const { taskHistory, onRelinquishControl, environment } = extensionStateContext @@ -363,24 +334,21 @@ const HistoryView = ({ onDone }: HistoryViewProps) => { Most Relevant - setShowCurrentWorkspaceOnly(!showCurrentWorkspaceOnly)} - /> - setShowFavoritesOnly(!showFavoritesOnly)} - /> + onClick={() => setShowCurrentWorkspaceOnly(!showCurrentWorkspaceOnly)}> + + + Workspace + + + setShowFavoritesOnly(!showFavoritesOnly)}> + + + Favorites + + - -
- handleBatchHistorySelect(true)}>Select All - handleBatchHistorySelect(false)}>Select None -
@@ -676,6 +644,14 @@ const HistoryView = ({ onDone }: HistoryViewProps) => { padding: "10px 10px", borderTop: "1px solid var(--vscode-panel-border)", }}> +
+ handleBatchHistorySelect(true)} style={{ flex: 1 }}> + Select All + + handleBatchHistorySelect(false)} style={{ flex: 1 }}> + Select None + +
{selectedItems.length > 0 ? ( -
+
{!server.error && isExpandable && ( )} {/* Toggle Switch */} - + { + e.stopPropagation() + handleToggleMcpServer() + }} + />