Skip to content

fix(sidebar): surface Settings + Sign out for guests#3

Merged
omkarbhad merged 1 commit into
mainfrom
fix/guest-settings-access
May 9, 2026
Merged

fix(sidebar): surface Settings + Sign out for guests#3
omkarbhad merged 1 commit into
mainfrom
fix/guest-settings-access

Conversation

@omkarbhad
Copy link
Copy Markdown
Collaborator

Summary

Guests couldn't open Settings — the gear icon and account dropdown were inside {#if authStore.isLoggedIn} (which excludes guests by design), so the only thing a guest saw in the footer was a "Sign in" button. Their localStorage-backed API keys live in Settings, so this made the local-keys design unusable for guests.

Mirror the signed-in dropdown shape for guests:

  • Settings (gear icon + dropdown item)
  • Sign in (existing primary affordance)
  • Sign out — only when authStore.isGuest is true (an active guest with a graphini_guest_id cookie). True logged-out state with no cookie has nothing to sign out of.

Header reads "Guest User / Sign in to save your work" so the secondary CTA is discoverable without burying the primary action.

Test plan

  • Incognito → app → click footer "Guest User" → dropdown shows Settings + Sign in + Sign out (since the guest cookie is set on first visit)
  • Click Settings → modal opens, can paste OpenRouter key, key persists
  • Click Sign out → both cookies cleared (PR fix(auth): logout clears guest cookie #2 behavior), footer state refreshes
  • Click Sign in → OAuth flow as before

The sidebar footer's Settings gear and account dropdown lived inside
{#if authStore.isLoggedIn}, which excludes guests by design — so guests
literally couldn't open Settings even though their localStorage-backed
API keys live there. The "Guest User" branch only rendered a sign-in
button.

Mirror the signed-in dropdown shape for guests:
  - Settings (gear icon + dropdown item)
  - Sign in (the existing primary affordance)
  - Sign out (only when authStore.isGuest is true — a guest with an
    active graphini_guest_id cookie can clear it; a true logged-out
    state with no guest cookie has nothing to sign out of)

Avatar uses a UserCircle placeholder. The dropdown header reads
"Guest User / Sign in to save your work" so the secondary CTA is
discoverable without burying the primary action.
@omkarbhad omkarbhad merged commit a095fea into main May 9, 2026
1 of 2 checks passed
@vercel
Copy link
Copy Markdown

vercel Bot commented May 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
graphini Building Building Preview, Comment May 9, 2026 1:49pm

@omkarbhad omkarbhad deleted the fix/guest-settings-access branch May 9, 2026 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant