From 294ca161a45a98f9122157dd61b3b641d8d62fe0 Mon Sep 17 00:00:00 2001 From: Neil <4138956+nwparker@users.noreply.github.com> Date: Fri, 29 May 2026 23:34:08 -0700 Subject: [PATCH] fix: clear mcp confirm reset timer (#3497) * fix: clear mcp confirm reset timer * fix: avoid mcp settings line-count growth --- .../src/components/settings/McpConfigSection.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/renderer/src/components/settings/McpConfigSection.tsx b/src/renderer/src/components/settings/McpConfigSection.tsx index d819da4ca..ab0d17adc 100644 --- a/src/renderer/src/components/settings/McpConfigSection.tsx +++ b/src/renderer/src/components/settings/McpConfigSection.tsx @@ -212,10 +212,6 @@ export function McpConfigSection({ repo }: McpConfigSectionProps): React.JSX.Ele } }, [connectionId, isWindows, missingInspections, sshConnectionStatus, targetRootPath]) - useEffect(() => { - void loadConfigs() - }, [loadConfigs]) - const clearCreateConfirmResetTimer = useCallback((): void => { if (createConfirmResetTimerRef.current !== null) { window.clearTimeout(createConfirmResetTimerRef.current) @@ -223,6 +219,11 @@ export function McpConfigSection({ repo }: McpConfigSectionProps): React.JSX.Ele } }, []) + useEffect(() => { + void loadConfigs() + return clearCreateConfirmResetTimer + }, [clearCreateConfirmResetTimer, loadConfigs]) + const handleOpen = (config: LoadedMcpConfigInspection): void => { setActiveWorktree(targetWorktreeId) const targetGroupId = ensureWorktreeRootGroup(targetWorktreeId)