Skip to content

From the Home Screen, an app's sign-in opens in OpenBot itself - #2902

Merged
davidmckayv merged 2 commits into
mainfrom
ios-standalone-connect
Dec 4, 2026
Merged

davidmckayv merged 2 commits into
mainfrom
ios-standalone-connect

Conversation

@davidmckayv

@davidmckayv davidmckayv commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

What this changes

From an iPhone's Home Screen (OpenBot added with Add to Home Screen, so it opens as an app of its own), connecting an app from a Bot's card was broken. Reported in dogfooding:

  • Connect opened a page that looked blank over the app. The sign-in only showed after pressing Open in Safari, and then it finished in Safari.
  • On Gusto, Open in Safari just went back to the app, and nothing connected.

Why. A card's Connect (and Browse apps, an app's access row, Connect another account) claims a new tab on the click with window.open(""), then points it at the sign-in once the server answers. A Home Screen web app has no tabs. iOS shows that window as a sheet over the app, and the blank page claimed on the click is what the person saw. From there the sign-in could only go on in Safari, whose cookies and storage the web app doesn't share, so the app's page the vendor returns to wasn't the web app's.

Gusto is a different failure that the blank page hid. Gusto comes through Composio, and this OpenBot has no OAuth client registered with Gusto, so turning it on is refused with "Gusto can't be connected on this OpenBot yet. Gusto allows a sign-in only once OpenBot is registered with Gusto, and it isn't yet." The press had already claimed the blank sheet, so the refusal sat behind it, and Open in Safari had nothing to open. This PR doesn't make Gusto connectable. It makes the refusal the first thing the person sees.

The fix, web app only. Opened from an iPhone's or iPad's Home Screen (navigator.standalone, or the standalone display mode, on Apple mobile), a connect press claims no tab:

  • OpenBot's step before a Composio sign-in shows as the dialog Connections already uses, instead of a page in the new tab.
  • Then this window goes to the sign-in, as Connections' own Connect does in any browser. The vendor brings the person back to the app's page in the same window, still signed in.
  • Where Connect was pressed is written into this window's session storage (the note connect-return.ts already writes into a new tab). Once the account is listed as connected, the app's page goes back there, so the person lands back in the conversation with the card reading the app as ready.
  • A press that ends with nothing to sign in to (refused, a key form, or connected at once) drops that note, and opens nothing.
  • Should iOS show the sign-in over the web app instead of going there, the connection is confirmed and the lists read again when the web app has the focus back (confirmOnReturn), as OpenBot Desktop's window does.

In a browser tab, embedded in another app's page and in OpenBot Desktop's window, nothing changes. No words change, and no screen's design changes: the dialog, the card and the app's page are the existing ones.

Where it runs

  • New state that outlives a request? None on the server. One note in the browser window's own session storage, as new tabs already get.
  • What happens on the second replica? Nothing new server-side. The connect, confirm and connections reads are the same calls.
  • Anything serialised? No.
  • Anything fanned out to a browser? No.
  • New listener, port, or schedule? No.

Boundary and audit

  • Every acting call still goes through the gateway: no acting call touched.
  • New refusals and new failures each write a row: none added.
  • Nothing new is trusted from the client.

API and database

  • This changes nothing under api/, no app's requests, no database change and no release-policy.json.

Changelog

Web app.

  • Fixed: connecting an app from OpenBot on an iPhone's Home Screen. Connect on a Bot's card opened a blank page over the app, and the sign-in only went on in Safari. Now the sign-in opens in OpenBot itself and comes back to the conversation once the app is connected. An app that can't be connected says why on the card, with nothing opened over it.

Proof

Red before, green after. app/tests/home-screen-connect-browser.test.tsx loads the real conversation view, card and app page under Connections as OpenBot opened from an iPhone's Home Screen (what Safari tells a page there: navigator.standalone, the standalone display mode, an iPhone's user agent, a 390px touch screen). window.open is the browser's own, so a tab claimed shows up as a page of its own. The server's state outlasts the trip to the vendor and back.

  • Slack, the whole round trip: Connect, OpenBot's step as a dialog that goes on by itself, this window at the vendor's sign-in, Allow, back at the app's page, and back at the conversation with Slack ready. Nothing opened beside the window.
  • Gusto, refused: the refusal is on the card, nothing opened, the conversation stays.
  • In a browser tab: Connect still opens the sign-in in a tab of its own, through OpenBot's step page.

On main, both Home Screen tests fail in Chromium and WebKit, each with a blank page opened (["about:blank"]), and the browser-tab test passes. With the fix, all 6 pass in Chromium and WebKit.

Screenshots, WebKit and Chromium at 390px, as a Home Screen web app. The Gusto card matches the one in the report, minus the blank page over it.

WebKit (iPhone) Chromium
The card WebKit: Slack's card with Connect Chromium: Slack's card with Connect
OpenBot's step, here WebKit: the Connecting Slack dialog Chromium: the Connecting Slack dialog
The vendor, in this window (a stand-in) WebKit: the stand-in vendor page Chromium: the stand-in vendor page
Back in the conversation WebKit: Slack ready to use Chromium: Slack ready to use
Gusto, refused WebKit: Gusto's card with the refusal Chromium: Gusto's card with the refusal

Back in the conversation the stand-in has no Bot to carry on with, so the card reads "Ready to use." In the app, a card that is the conversation's latest thing offers Continue for an app made ready while the person was away from it (carry-on.ts). That part isn't driven by this test.

Also run: the related app tests (connect cards, Browse apps, embedded sign-in, app access, consent step): 143 pass. one-press-connect-layout and consent-handoff in Chromium and WebKit: 52 pass. Format, lint and typecheck. The whole app suite: 6570 pass, 6 fail, none of them near this change: the 2 in task-thread.test.tsx pass when that file runs alone (26 of 26), and the other 4 are desktop workbench tests that need desktop/'s own install, which this worktree doesn't have.

Not proven: a real iPhone. Playwright's WebKit can't run as a Home Screen web app, and this Mac's iOS Simulator has no window to add one from. The test tells the page what Safari tells it there, and uses the browser's own window.open. What's left to see on a phone is that iOS keeps a sign-in on another site inside the web app when the web app itself goes there; the change confirms the account when the web app has the focus back in case iOS shows it over the app instead.

Ships in 1.2.11; main is frozen for the 1.2.10 cut.

Opened from an iPhone's or iPad's Home Screen, a card's Connect claimed a new tab on the click,
which a Home Screen web app doesn't have: iOS showed a blank page over the app, and the sign-in only
went on in Safari, whose cookies and storage the web app doesn't share. A refused press (Gusto, which
this OpenBot can't connect) left that blank page over the card saying why.

There, a connect press now claims no tab. OpenBot's step before a Composio sign-in is the dialog
Connections already uses, this window goes to the sign-in, and the vendor brings it back to the
app's page, which goes back to where Connect was pressed once the account is connected. A press with
nothing to sign in to opens nothing. In a browser tab, embedded, and in OpenBot Desktop's window,
nothing changes.

Test: home-screen-connect-browser, in Chromium and WebKit at a phone's width, red on main.
@davidmckayv
davidmckayv marked this pull request as ready for review December 3, 2026 22:55
@davidmckayv
davidmckayv added this pull request to the merge queue Dec 3, 2026
Merged via the queue into main with commit 045bf79 Dec 4, 2026
40 of 44 checks passed
@davidmckayv
davidmckayv deleted the ios-standalone-connect branch December 4, 2026 00:16
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