Skip to content

Connect another account at an app from the conversation - #2213

Merged
davidmckayv merged 3 commits into
mainfrom
fix/connect-another-account-in-chat
Nov 25, 2026
Merged

davidmckayv merged 3 commits into
mainfrom
fix/connect-another-account-in-chat

Conversation

@davidmckayv

Copy link
Copy Markdown
Contributor

What a person saw

Somebody whose work Gmail was connected asked their Bot "Can I connect you to my personal email as well?". The Bot showed:

  • Gmail's own card, reading "Gmail is ready now". That was the account already connected, so the job looked done.
  • A how-to card with three guides: connecting a second account on Connections, connecting another AI, and making an app use one shared account. Only the first one was about the question.

OpenBot can already hold more than one account per app (Connections, the app, Connect another account). From the conversation, though, the Bot could only describe how to do it.

What changes

  • A card for one more account at an app. It uses the app card's layout and the same press as Connections' Connect another account (connectAnotherAccountMutationOptions), with the sign-in opening in a new tab claimed on the click (useConnectInNewTab({ another: true })). Once the new account is listed, the card says which account Bots use. Where the new account isn't the default, it offers Make default, the same press as on the app's page. After a reload it says the same thing and doesn't offer a second sign-in.
  • The card has a marker of its own (ANOTHER_ACCOUNT_MARKER in shared/connect-prompt.ts) and is not a new ConnectReason. An older front end reads an unknown reason as connect and would draw "Gmail is ready now" over the question. A marker it doesn't know gets only the step's line.
  • "is ready now" only for an app that wasn't ready. An app card says it only when the app was out of reach when the Bot asked, or when the card saw it out of reach. A card about an app that was ready all along says "Ready to use."

There's no API change: the press uses connectApp's existing anotherAccount.

Tests

  • app/tests/app-access-card.test.tsx: new regression test, "show_app_access about an app ready all along never says it is ready now". It fails on main with Received: "GmailGmail is ready now." and passes with this change.
  • app/tests/another-account-card.test.tsx: drawn from the transcript, one card, never the app's own card. The press sends { returnTo: "connections", anotherAccount: true } and opens the sign-in. Once the second account is listed the card says which account Bots use, and Make default makes the new one the default. Drawn again later, it offers no second sign-in. An older reader doesn't read the answer as an app card.
  • app/tests/another-account-layout.test.tsx: drives the card in a real browser (Chromium and WebKit, light and dark, 1000 px and 390 px) using the app's stylesheet. It checks that the tab is claimed on the click, the press, the connected sentence and Make default, and that the button fits inside the card.

Asked "Can I connect you to my personal email as well?" by somebody whose
work Gmail was connected, a Bot could only show Gmail's own card, which
read "Gmail is ready now", and how-to steps. The job looked done, and the
steps sent them to Connections.

- A card for one more account at an app: the same card and the same
  press as Connections' Connect another account, in a new tab. Once the
  new account is listed it says which account Bots use and offers Make
  default. Drawn from show_app_access's answer behind a marker of its own
  (shared/connect-prompt.ts), so a front end that doesn't know it draws
  only the step's line, never "ready now".
- An app card says "is ready now" only for an app that wasn't ready when
  the Bot asked, or that the card saw out of reach. A card about an app
  ready all along says what is true of it.
@davidmckayv
davidmckayv merged commit d7ec72f into main Nov 25, 2026
18 checks passed
@davidmckayv
davidmckayv deleted the fix/connect-another-account-in-chat branch November 25, 2026 22:35
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