fix(navigation): land on workspaces from the app entry, not settings - #7692
Merged
Conversation
The signed-in front door sent organization members whose organization has not been rolled out to workspace settings, so opening the app dropped them on the General settings form instead of their workspace. Send them to the workspace picker, which is where the entry pointed before the organization surface existed. The default landing never opens settings; the /o guards still fall back to settings for viewers who explicitly asked for the organization surface. Also stop the entry from bouncing a stale session cookie to /login. The proxy treats /home as an app surface and redirects cookie-less requests to /login before the route renders, and auth-disabled deployments always resolve an anonymous session, so a null session here always means a present-but-invalid cookie. Redirecting that to /login was bounced straight back by the proxy's presence-only cookie check, looping until the browser gave up and leaving the viewer unable to reach the login page at all. Hand off to the workspace loader instead, the one identity-recovery surface, which clears the stale cookies before navigating. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CGkraEeFNiPCU4jb784FE4
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Greptile SummaryThis PR corrects signed-in application entry routing and stale-session recovery.
Confidence Score: 5/5The PR appears safe to merge; both routing changes preserve existing access boundaries while correcting their destinations. No actionable failure remains: stale-cookie requests can reach the workspace recovery flow, and the app-entry destination change retains the existing workspace selection and creation behavior without altering explicit organization-route guards.
|
| Filename | Overview |
|---|---|
| apps/sim/app/home/page.tsx | Redirects missing sessions to the workspace recovery surface instead of entering the stale-cookie login loop. |
| apps/sim/lib/navigation/resolve-app-entry.ts | Routes members without organization-surface access to the workspace picker rather than workspace settings. |
| apps/sim/app/home/page.test.tsx | Updates the stale-session regression test to require workspace recovery and reject direct login redirection. |
| apps/sim/lib/navigation/resolve-app-entry.test.ts | Verifies the new workspace-picker destination for organization members without rollout access. |
| apps/sim/lib/navigation/organization-rollout.test.ts | Preserves impersonation coverage while updating the non-rolled-out destination. |
Reviews (1): Last reviewed commit: "fix(navigation): land on workspaces from..." | Re-trigger Greptile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/oguards still fall back to settings for viewers who explicitly asked for the organization surface — that case is unchanged./home↔/loginredirect loop on a stale session cookie. The proxy treats/homeas an app surface and redirects cookie-less requests to/loginbefore the route renders, and auth-disabled deployments always resolve an anonymous session — so a null session inside/homealways means a present-but-invalid cookie. Redirecting that to/loginwas bounced straight back by the proxy's presence-only cookie check, looping until the browser gave up and leaving the viewer unable to reach the login page at all. It now hands off to the workspace loader, the one identity-recovery surface, which clears the stale cookies before navigating.Type of Change
Testing
app/homeandlib/navigation. Both fixes verified to fail when reverted.bun run lint, block-registry audit, all 46 audits (check:audits),docs-manifest:check, andtype-checkpass.Checklist