Repository navigation
App: connect your own AI before using OpenBot Cloud - #1997
Merged
Merged
Conversation
davidmckayv
requested review from
MikeRyanDev,
dustywusty,
guidovizoso,
mxmzb,
samjulien and
tylerslaton
as code owners
November 21, 2026 23:09
OpenBot Cloud provides no AI, so each person connects their own, personal to them and never shared with their organization. Until now a new person went from Welcome into chat, and their first message failed with a sentence telling an admin to add a key. - Onboarding: a Connect your AI step right after Welcome, only where the server says one is required and the person's runs have none. Its button stays disabled until they connect, and there is no way past it. Where the organization already has an AI there is no step. - The signed-in gate sends anybody in that state to the step from anywhere, including people who finished onboarding before it existed, for whom it is the only step and its button takes them into the app. - Settings: a Your AI section with their own connection, or that Bots use the organization's, to add, change or remove theirs. The admin's section reads Organization's AI beside it. - Chat: a run refused with the Cloud sentence gets a Connect your AI button that opens the step. - The chooser from Settings' AI connection dialog is now shared, with a personal mode: a key or an address for every provider, and a provider sign-in only where the server runs it itself, polled until approved and connected with the key the server kept. Never a plan or a sign-in held by OpenBot Desktop, even inside Desktop. The organization dialog behaves as before. - A real-browser test drives the gate, the step, Settings and the Desktop case against the spec's own examples, and runs in CI.
Found end to end on a real OpenBot Cloud install.
- A switch from an organization with an AI to one without landed on a
usable home screen, and only the next click went to Connect your AI.
A switch takes the person home while the app still works in the
organization they are leaving, so the gate decided on that one's
answer. Once the app has changed over, the routes on screen now load
again and their gates ask the new organization.
- Somebody whose organization has no AI could not leave the step. It now
lists their other organizations, when they have more than one, to work
in one of those instead with the account menu's own switch, and it
always offers Sign out. Beside the words on a desktop, under the
chooser on a phone.
- On OpenBot Cloud the organization's AI read as the admin's own ("Uses
your Anthropic API key") and its dialog said "Change AI connection"
with nothing set. It now says the key is the organization's, and sets
one up when there is none. Self-hosted wording is unchanged.
Each has a real-browser regression test that fails before and passes
after.
davidmckayv
force-pushed
the
cloud-connect-your-ai-screens
branch
from
November 22, 2026 01:09
61dd693 to
58b2e89
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.
OpenBot Cloud provides no AI, so each person connects their own, personal to them and never shared with their organization. Today a new person goes from Welcome straight into chat, and their first message fails with a sentence telling an admin to add a key. This puts the screens in front of that, on the API from #1996.
What a person sees
required && uses === "none"). The step's button stays disabled until they connect, and there is no Not now. If the organization already has an AI, there is no step, and they can add their own later in Settings._authedsends anybody in that state to/onboarding?step=aifrom any page. That includes people who finished onboarding before the step existed. For them it is the only step, and its button takes them into the app without finishing onboarding again.Connect your AI to use Bots. An admin can also set one up for everyone in your organization.(matched word for word, exported besideNO_AI_CONNECTION) gets a Connect your AI button that opens the step. The self-hostedNO_AI_CONNECTIONpath is unchanged.The chooser
Settings' AI connection chooser (the app's port of Desktop's setup window) moves to
components/settings/ai-connection-chooser.tsx, and Settings' organization dialog and the new personal mode both use it. Organization mode works as it did before. In personal mode:signIns, and it comes first. The server runs it: start, show the code and "Open the sign-in page", poll everyintervalseconds, then connect withuseSavedKeyand the preset address and model.On a page, the chooser sits in a card where the other steps put their picture: a real control, so it has the card's fill, like the booking calendar.
Reads and writes go through
lib/ai-connectionfactories:personalAiConnectionQueryOptions,connectPersonalAiMutationOptions,removePersonalAiMutationOptions, and plain functions for the sign-in. An error or a 404 from an older server reads as "not required".Tests
app/tests/connect-your-ai.test.tsx(real browser, added to CI's app-browser job) drives the app's own gate, onboarding route and Settings against the spec's own examples. Every request body is checked with the generated zod schemas. It covers:add-model-key-link.test.tsx: the Cloud sentence gives everybody Connect your AI.Screenshots of the step and Settings in light and dark, at 1440px and 390px, were compared side by side with onboarding's Welcome and Settings' AI connection dialog.