From 77812f9452bb0b5938f2b7f22ace553f6e0d5351 Mon Sep 17 00:00:00 2001 From: asepharyana Date: Thu, 2 Jul 2026 07:06:33 +0700 Subject: [PATCH] =?UTF-8?q?fix(auth):=20force=20activeTab=20to=20messages?= =?UTF-8?q?=20if=20not=20authenticated=20=E2=80=94=20prevent=20localStorag?= =?UTF-8?q?e=20carryover?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When a user visited the Live tab in a previous session, localStorage stored activeTab: 'live'. On page reload, even with the new auth guard, the app would try to render the Live tab and show the auth overlay. Now if not authenticated, activeTab is always forced to 'messages'. --- services/frontend/src/App.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/frontend/src/App.tsx b/services/frontend/src/App.tsx index 13cce25..2946938 100644 --- a/services/frontend/src/App.tsx +++ b/services/frontend/src/App.tsx @@ -40,8 +40,8 @@ export default function App() { const [monitorGuildId, setMonitorGuildId] = useState(""); const audio = useAudioPlayback(); - const activeTab = uiState.activeTab || "messages"; const isPublicDashboard = import.meta.env.VITE_DASHBOARD_IS_PUBLIC === "true"; + const activeTab = !authenticated && !isPublicDashboard ? "messages" : uiState.activeTab || "messages"; const selectedVoiceGuild = uiState.selectedVoiceGuild || uiState.selectedGuild || "";