Skip to content

Preserve route after login - #708

Open
rahulsiiitm wants to merge 1 commit into
commaai:masterfrom
rahulsiiitm:agent/preserve-login-redirect
Open

Preserve route after login#708
rahulsiiitm wants to merge 1 commit into
commaai:masterfrom
rahulsiiitm:agent/preserve-login-redirect

Conversation

@rahulsiiitm

Copy link
Copy Markdown

Fix the post-login redirect so a route link remains stable across React renders.

redirectLink() previously consumed sessionStorage.redirectURL during render. If the auth route rendered again before <Redirect> completed navigation, the second call fell back to / and sent the user to the home page. Cache the consumed value on the App instance so every render in the same login flow uses the original route.

The regression test calls redirectLink() twice and verifies both calls return the route while the session-storage value is still consumed once.

Tested:

  • Login redirect regression test
  • 28 non-network Jest tests
  • oxlint src
  • Production Vite build

The existing live geocoding integration test timed out against its external service locally.

Fixes #702

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

Welcome to connect! Make sure to:

  • read the contributing guidelines
  • mark your PR as a draft until it's ready to review
  • post the preview on Discord; feedback from users will speedup the PR review

deployed preview: https://708.connect-d5y.pages.dev
gallery report: https://708.connect-d5y.pages.dev/connect-gallery

@rahulsiiitm
rahulsiiitm marked this pull request as ready for review August 7, 2026 07:15
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.

preserve route link after login

1 participant