Files
yaoweiprcandClaude Sonnet 5 aa5cf57a55 fix(INS-3850): re-check the Konnect organization's visibility before restoring it on cold start (#10518)
`getInitialEntry()` restores `lastVisitedOrganizationId` on startup and
resolves an initial pathname for it, entirely independent of the
Konnect visibility state that `refreshKonnectAccess()` (called right
before it in entry.client.tsx) just recomputed. When the Konnect
organization has no projects, `getInitialRouteForOrganization` falls
back straight to `/organization/<id>/project` — a leaf route whose own
loader was never wired up with the `getKonnectOrganizationEscapeRoute`
check (only the org-index loader and the project-delete action were).
So an account that loses Konnect access (or synced projects) while the
app is closed reopens with the URL still pointing at Control Planes,
even though the organization has already disappeared from the
dropdown.

Reuse `getKonnectOrganizationEscapeRoute` here too: when the resolved
organizationId is the Konnect organization, re-validate it before
computing a route inside it, and land on the account's first real
organization instead if it just went dark.

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-17 17:37:20 +08:00
..