From 5e18a7f3c2817648126e8b795aa2db35e373eed6 Mon Sep 17 00:00:00 2001 From: DCCONSTRUCTIONS Date: Thu, 14 May 2026 14:52:06 +0300 Subject: [PATCH] FIX - HUB PERMISSIONS: poll visible runtime session --- src/app/LauncherApp.tsx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/app/LauncherApp.tsx b/src/app/LauncherApp.tsx index 979fead..84aeb82 100644 --- a/src/app/LauncherApp.tsx +++ b/src/app/LauncherApp.tsx @@ -456,6 +456,20 @@ export function LauncherApp() { }; }, [authSession?.authenticated, refreshRuntimeState]); + useEffect(() => { + if (!authSession?.authenticated) return; + + const intervalId = window.setInterval(() => { + if (document.visibilityState === "visible") { + void refreshRuntimeState(); + } + }, 5000); + + return () => { + window.clearInterval(intervalId); + }; + }, [authSession?.authenticated, refreshRuntimeState]); + function handleProfileChange(userId: string) { const profile = profileOptions.find((option) => option.userId === userId); setActiveProfileId(userId);