Skip to content

fix(ui): return to landing page on logout - #356

Merged
FlyM1ss merged 1 commit into
mainfrom
fix/logout-returns-to-landing
Aug 15, 2026
Merged

fix(ui): return to landing page on logout#356
FlyM1ss merged 1 commit into
mainfrom
fix/logout-returns-to-landing

Conversation

@FlyM1ss

@FlyM1ss FlyM1ss commented Aug 15, 2026

Copy link
Copy Markdown
Collaborator

Logging out left the user on /app, whose home re-renders as the "Guest Account" demo portfolio — the same screen a never-signed-in visitor gets. Only feedback that anything happened was the header swapping to "Sign in".

Not a stale-state bug: every module resets correctly post-logout. It was the correct guest render on the wrong surface.

index.html declares the rule ("Landing is for first-time / logged-out visitors only") and enforces only the signed-in half — / with a cached auth-user redirects to /app. The return trip was never built. syncHeaderBrand already repoints the brand to / on sign-out, so the app knew home had moved.

Redirect goes in logoutUser, not clearAuthState — the latter is also reached from refreshAuthUser's 401 branch on every guest page load, and /app supports guests on purpose (backtests work signed-out). A redirect there would evict first-time visitors. Guard test pins this.

Clears run before the redirect (else the landing bounces back to /app); replace not href so Back can't restore the shell.

Behavior note: logout now returns to / from any page, not just home.

Verified in headless Chromium (logout from home + account page, no bounce loop, guest /app unaffected). 6 new guards, red 3/6 in the right shape before the fix. Suite: 2885 passed, 78 skipped.

🤖 Generated with Claude Code

https://claude.ai/code/session_014K97GJdZ2yxAwQ3mhDaGBG

index.html enforces "logged-in users go straight to /app" but nothing
implemented the return trip, so logout left the user on the signed-in
shell, whose home re-renders as the "Guest Account" demo portfolio --
the same screen a never-signed-in visitor gets.

Redirect in logoutUser only, not clearAuthState: the latter is also
reached from refreshAuthUser's 401 branch on every guest page load, and
/app supports guests on purpose.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014K97GJdZ2yxAwQ3mhDaGBG
@vercel

vercel Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
agentic-trading-lab Ready Ready Preview Aug 15, 2026 7:11am

@FlyM1ss
FlyM1ss merged commit 73cfa32 into main Aug 15, 2026
7 checks passed
@FlyM1ss
FlyM1ss deleted the fix/logout-returns-to-landing branch August 15, 2026 07:39
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