Skip to content

fix(navigation): land on workspaces from the app entry, not settings - #7692

Merged
waleedlatif1 merged 1 commit into
stagingfrom
fix/root-redirect-home
Sep 9, 2026
Merged

fix(navigation): land on workspaces from the app entry, not settings#7692
waleedlatif1 merged 1 commit into
stagingfrom
fix/root-redirect-home

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Opening the app as an organization member whose organization has not been rolled out landed on the General settings form instead of a 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 — that case is unchanged.
  • Fixed an infinite /home/login redirect loop on a stale session cookie. 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 inside /home 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. It now hands off to the workspace loader, the one identity-recovery surface, which clears the stale cookies before navigating.

Type of Change

  • Bug fix

Testing

  • 22 tests pass across app/home and lib/navigation. Both fixes verified to fail when reverted.
  • bun run lint, block-registry audit, all 46 audits (check:audits), docs-manifest:check, and type-check pass.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

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
@vercel

vercel Bot commented Sep 9, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Sep 9, 2026 10:33pm UTC

Request Review

@greptile-apps

greptile-apps Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR corrects signed-in application entry routing and stale-session recovery.

  • Organization members without the organization surface enabled now enter through the workspace picker instead of workspace settings.
  • A stale session reaching /home is handed to the workspace loader, where stale cookies can be cleared before login.
  • Existing explicit organization-route fallbacks to workspace settings remain unchanged.

Confidence Score: 5/5

The 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.

Important Files Changed

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

@waleedlatif1
waleedlatif1 merged commit a2f1ac7 into staging Sep 9, 2026
34 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/root-redirect-home branch September 9, 2026 22:37
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