Skip to content

App: show the sign-in screen after signing out of a hosted OpenBot - #2004

Merged
davidmckayv merged 1 commit into
mainfrom
sign-in-after-sign-out
Nov 22, 2026
Merged

davidmckayv merged 1 commit into
mainfrom
sign-in-after-sign-out

Conversation

@davidmckayv

Copy link
Copy Markdown
Contributor

What

On a hosted OpenBot with many organizations, Sign out (from the account menu, or from any screen that offers it) showed the router's "Something went wrong! Couldn't find that organization." in place of the sign-in screen.

Why. The tab keeps the organization it worked in after signing out. The sign-in screen reads the deployment (what sign-in it offers) through readDeployment, which asks in the organization the tab knows. Signed out, that request goes as nobody, and a hosted OpenBot tells anybody who isn't a member that an organization doesn't exist: 404 ORGANIZATION_NOT_FOUND, which the sign-in route's beforeLoad threw. A self-hosted OpenBot's organization is default, which answers anybody, so it never showed there.

Fix. In readDeployment: told "not found" in the organization the tab knows (signed out since, or no longer in it), the deployment is read the way it is before signing in: at default, as nobody. The same fallback the function already has for somebody in no organization. On the OpenBot on this computer inside OpenBot Desktop, which needs the page's cookies, the refusal stands as before.

Tests

app/tests/sign-in-after-sign-out.test.tsx: a real HTTP server as a hosted OpenBot whose person works in org_acme, answering an organization's deployment only to its members and default's to anybody as nobody, with answers checked against the generated schemas. Through the app's real sign-in gate, sign-in screen and error screen, Sign out as the account menu has it: the sign-in screen shows with Continue with OpenBot by CopilotKit, no "Something went wrong", and the deployment was asked at default as nobody.

Fails on main with exactly the reported error ("Couldn't find that organization."), passes with the fix. Locally: the whole app/ suite, lint, format check and typecheck.

On a hosted OpenBot with many organizations, Sign out showed the
router's "Something went wrong! Couldn't find that organization." in
place of the sign-in screen. The tab keeps the organization it worked
in after signing out, so the sign-in screen read the deployment there,
as nobody, and the server tells anybody who isn't a member that an
organization doesn't exist. A self-hosted OpenBot's organization is
`default`, which answers anybody, so it never showed there.

The deployment, told "not found" in the organization the tab knows, is
now read the way it is before signing in: at `default`, as nobody.
@davidmckayv
davidmckayv force-pushed the sign-in-after-sign-out branch from f89c54e to 8ebd018 Compare November 22, 2026 02:03
@davidmckayv
davidmckayv merged commit fb05751 into main Nov 22, 2026
33 checks passed
@davidmckayv
davidmckayv deleted the sign-in-after-sign-out branch November 22, 2026 02:08
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