Repository navigation
App: signing out lands on the sign-in screen, not an error - #2003
Closed
davidmckayv wants to merge 3 commits into
Closed
davidmckayv wants to merge 3 commits into
davidmckayv wants to merge 3 commits into
Conversation
davidmckayv
requested review from
MikeRyanDev,
dustywusty,
guidovizoso,
mxmzb,
samjulien and
tylerslaton
as code owners
November 22, 2026 01:19
Signing out from an organization other than `default` landed on "Something went wrong! Couldn't find that organization." until a reload. The app still knew the organization the person had worked in, so the sign-in screen asked for the deployment there as somebody no longer signed in, and the server answered not found. A sign-out now forgets the organization and everything the app held for it. The sign-in screen asks at `default` as nobody, as it does on a fresh load, and the next person to sign in on the same browser sees nothing the last one was shown. The new test runs the real sign-in gate, sign-in screen and Sign out against a real HTTP server that answers as OpenBot does. It fails on main with that exact error and passes with the fix.
davidmckayv
force-pushed
the
sign-out-lands-on-sign-in
branch
from
November 22, 2026 01:25
b624807 to
fb34ba1
Compare
Forgetting the organization in Sign out itself happened while the app's pages were still on screen. Signing out from the account menu on the home page then drew those pages again in no organization, and they failed with "The organization is not known yet." until a reload. Sign out changes nothing about the organization now. The sign-in screen reads what it offers as nobody, whatever organization the app last knew, so it never asks for an organization somebody signed out isn't in. Once it is on screen, with nothing of the app left to draw, it forgets the organization and what the app held for it. What the sign-in screen offers is keyed as the deployment's, the same in every organization, so forgetting doesn't load it again under the screen. The new test signs out from the account menu's hook on a home page inside the app's own organization boundary. It fails on the previous commit with that exact error and passes now. The test that signs out to the sign-in screen still passes.
Contributor
Author
|
Superseded by #2004, which landed first and fixes the same sign-out error by reading the deployment at Checked before closing: this PR's own sign-out-to-sign-in test passes on main with #2004 and without this change. The only thing this PR added beyond that, forgetting the organization after sign-out, is not visible to anybody: every web sign-in leaves for the identity provider and loads the page fresh. Sign out from the account menu and from the Connect your AI step were both checked on a real OpenBot Cloud install. |
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.
Signing out (from the account menu, or from any other Sign out) landed on "Something went wrong! Couldn't find that organization." instead of the sign-in screen, until a reload. Found on OpenBot Cloud, where people work in an organization of their own rather than
default.Why
After sign-out the app still knew the organization the person had worked in. The sign-in screen reads the deployment (
readDeploymentinlib/deployment/queries.ts), which asks in the known organization. Asked as somebody no longer signed in, the server answers 404 for that organization, and the sign-in route'sbeforeLoadfailed. A reload knows no organization, so it asks atdefaultas nobody and works.The fix
readDeploymenttakesasNobody, and the sign-in options use it. They ask atdefaultas nobody whatever organization the app last knew, as on a fresh load.forgetOrganization()(query-client.ts). That forgets the organization, everything the app held for it, and the person's list of organizations. The next person to sign in on the same browser sees nothing the last one was shown. Sign out itself changes nothing about the organization: forgetting it there, while the app's pages were still on screen, redrew them in no organization, and they failed with "The organization is not known yet."["deployment", "sign-in"]), the same in every organization, so forgetting doesn't load them again under the screen.Test
app/tests/sign-out-lands-on-sign-in.test.tsxruns the real sign-in gate, sign-in screen and Sign out hook against a real HTTP server on this computer that answers as OpenBot does. It serves the person's organizations and their own person only while they are signed in, and the deployment in their organization only to members. Answers are checked against the generated schemas.ClientError: Couldn't find that organization.With the fix it passes.The organization is not known yet.It passes now.connect-your-ai.test.tsx) has a fake server that now signs out as the real one does.The sign-in, sign-out, organization, query-client and Desktop-connected tests pass, as do typecheck, lint and format.