You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Webview reload appears to log out the Pro user (signed-in state not re-hydrated on reload) #1647
Reloading the webview (right-click → Reload) makes a signed-in Pro user appear signed out — the pill drops to "Sign in". The session is not actually lost (the daemon still holds it; a full app restart auto-resumes), so this is a UI state-hydration bug on reload, not a real sign-out.
Repro
Sign in (Pro) — pill shows signed-in / Synced.
Right-click in the window → Reload (or any webview reload).
Pill flips to signed-out ("Sign in"), even though the daemon session is intact.
Cause
packages/desktop-app/src/lib/stores/pro-sync.svelte.ts — on (re)initialization the store starts at state='auth-required', userEmail=''. The signed-in state is only populated from initial_status.user_email delivered on the pro:tier-detected event. Per the in-code comment, the first pro_subscribe_sync_status invoke races the backend's async init, so on a reload initial_status can be null/empty. When it is, userEmail stays '' and the derived state resolves to auth-required → the UI shows signed-out. The subsequent sync:status stream only pushes on change, so if the daemon doesn't re-emit the current signed-in status on (re)subscribe, the UI never re-hydrates.
Fix
On (re)load, request/deliver a current status snapshot (incl. user_email) from the daemon on subscribe — so the signed-in state re-hydrates deterministically instead of depending on a raced initial_status or a future change event. (Alternatively, have the daemon always emit the current status immediately on pro_subscribe_sync_status.)
Impact
Any accidental or intentional reload looks like a logout — confusing, and makes the app feel like it loses the session when it hasn't.
Activity
Fix a status-attribution race, an incomplete local-only override, and…
Split proSync store into per-database sync/auth status (ADR-053) (#2322)