From 705ae397463b5cc343335b66c4d18651ab106330 Mon Sep 17 00:00:00 2001 From: Haileyesus Date: Tue, 24 Feb 2026 14:32:52 +0300 Subject: [PATCH] fix(shell): simplify session disconnect logic in useEffect --- src/components/shell/hooks/useShellRuntime.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/components/shell/hooks/useShellRuntime.ts b/src/components/shell/hooks/useShellRuntime.ts index 7334329..0af6d2f 100644 --- a/src/components/shell/hooks/useShellRuntime.ts +++ b/src/components/shell/hooks/useShellRuntime.ts @@ -140,11 +140,7 @@ export function useShellRuntime({ useEffect(() => { const currentSessionId = selectedSession?.id ?? null; - if ( - lastSessionIdRef.current !== null && - lastSessionIdRef.current !== currentSessionId && - isInitialized - ) { + if (lastSessionIdRef.current !== currentSessionId && isInitialized) { disconnectFromShell(); }