Repository navigation
App: show the sign-in screen after signing out of a hosted OpenBot - #2004
Merged
Merged
Conversation
davidmckayv
requested review from
MikeRyanDev,
dustywusty,
guidovizoso,
mxmzb,
samjulien and
tylerslaton
as code owners
November 22, 2026 01:48
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
force-pushed
the
sign-in-after-sign-out
branch
from
November 22, 2026 02:03
f89c54e to
8ebd018
Compare
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.
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: 404ORGANIZATION_NOT_FOUND, which the sign-in route'sbeforeLoadthrew. A self-hosted OpenBot's organization isdefault, 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: atdefault, 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 inorg_acme, answering an organization's deployment only to its members anddefault'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 atdefaultas 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.