Repository navigation
After connecting an app from a Bot's card, the sign-in's tab closes and you're back with the Bot - #2071
Open
davidmckayv wants to merge 1 commit into
Open
After connecting an app from a Bot's card, the sign-in's tab closes and you're back with the Bot#2071davidmckayv wants to merge 1 commit into
davidmckayv wants to merge 1 commit into
Conversation
…nd you're back with the Bot Connect on a Bot's card (or an app row on a Bot's page) opens the sign-in in a new tab, and the connect route brings a browser back to the app's page under Connections. So after connecting Gmail from a conversation the person was left on Gmail's page in that tab, while the Bot was already carrying on in the first one. The tab the card claims is now told, before it leaves OpenBot, where Connect was pressed: written into that tab's own session storage. The app's page reads and drops the note on arrival, and once the account is listed as connected it closes the tab, or, where the browser won't close it, goes back to where Connect was pressed. A sign-in that came back failed leaves the person where the failure is said. Two real-browser cases in consent-handoff.test.tsx (Chromium and WebKit): the tab closes once Gmail is connected, and goes back to the card where closing is refused. Both fail on main.
davidmckayv
requested review from
MikeRyanDev,
dustywusty,
guidovizoso,
mxmzb,
samjulien and
tylerslaton
as code owners
November 23, 2026 19:25
This branch has not been deployed
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 this changes
Connect on a Bot's card in a conversation, or on an app row on a Bot's page, opens the sign-in in a new tab. The connect route brings a browser back to the app's page under Connections, so after connecting Gmail from a conversation the person was left on Gmail's page in the new tab. They expected to be back with the Bot, which by then was already carrying on in the first tab.
app/src/lib/plugins/connect-return.ts, written fromuseConnectInNewTab).?status=failed,?connected=failed) leaves the person on the app's page, where the failure is said. With no note (Settings' own Connect, which navigates its own tab, or storage refused), nothing changes.Where it runs
Browser only. Nothing on the server changes.
Boundary and audit
/and not//).API and database
api/, no app's requests, no database change and norelease-policy.json.Changelog
CHANGELOG.mdunderUnreleased, Smaller changes.Proof
app/tests/consent-handoff.test.tsx, which drive the real card, the real/connectingstep and the real app page: the tab a Bot's card opened closes once Gmail is connected, and, withwindow.closerefused, the tab goes back to the card. Both fail on main (run against main's two source files) and pass with this change.OPENBOT_APP_BROWSER=1 OPENBOT_APP_ENGINES=chromium,webkit bun test app/tests/consent-handoff.test.tsx: 24 pass, 0 fail.bun run typecheckinapp/andbiome checkon the changed files are clean.