fix(auth): auth pages reload when a session appears in another tab
Fixes #69 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA
This commit is contained in:
@@ -26,6 +26,7 @@ import { settingsAtom } from '../state/settings';
|
||||
import { isWithinTimeWindow } from '../utils/timeWindow';
|
||||
import { LotusToastContainer } from '../features/toast/LotusToastContainer';
|
||||
import { useTauriNotificationBadge } from '../hooks/useTauriNotificationBadge';
|
||||
import { useSessionAppeared } from '../hooks/useSessionAppeared';
|
||||
import { useTauriWindowChrome } from '../hooks/useTauriWindowChrome';
|
||||
import { isTauri } from '../hooks/useTauri';
|
||||
import { TitleBar } from '../features/desktop/TitleBar';
|
||||
@@ -165,6 +166,12 @@ const queryClient = new QueryClient();
|
||||
function App() {
|
||||
const screenSize = useScreenSize();
|
||||
useCompositionEndTracking();
|
||||
// #69 — cross-tab session sync (useSessionSync) only mounts inside the
|
||||
// authenticated ClientRoot shell, so a tab still on the unauthenticated
|
||||
// routes (login/register/OIDC callback) never learns that another tab just
|
||||
// signed in. This lighter watcher covers that gap by reloading once a
|
||||
// session appears where there was none.
|
||||
useSessionAppeared();
|
||||
|
||||
const portalContainer = document.getElementById('portalContainer') ?? undefined;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user