Skip to content

fix(api): follow the live view to the 2FA page during connect sign-in - #3516

Merged
tofikwest merged 2 commits into
mainfrom
fix/browser-automation-liveview-2fa
Jul 28, 2026
Merged

fix(api): follow the live view to the 2FA page during connect sign-in#3516
tofikwest merged 2 commits into
mainfrom
fix/browser-automation-liveview-2fa

Conversation

@tofikwest

@tofikwest tofikwest commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Makes the connect flow's 2FA take-over actually usable. Two related fixes:

1. The live view didn't follow to the 2FA page

After the AI signs in and the vendor shows a 2FA prompt, the panel says "Your turn — enter the code", but the iframe stayed on the pre-submit login tab (empty fields). streamActiveLiveView was called before the sign-in but never again after it, so the iframe never followed to where the 2FA field is. Fix: re-emit the live view right after signInAndClassify, at the same tab the classifier judged.

2. The session died after ~2 min ("Debugging connection was closed")

The connect session was created without a timeout, so it used the project's short default and Browserbase auto-ended it (~2 min) — killing the live view while the user was still fetching their authenticator / typing the code. Fix: give human-facing sessions an explicit 15-minute timeout; headless capture runs keep the short default (no human waiting).

Verification

  • +tests: live view re-emitted on the needs_2fa path; session timeout forwarded only for interactive sessions.
  • 179 browserbase tests pass, typecheck clean.

Note

Backend fixes (emit the right live-view URL + keep the session alive). Worth a quick confirm on stage that the iframe visibly follows to the 2FA page and stays connected through a slow take-over — Browserbase can't be reproduced locally.

The connect flow only re-pointed the live view before the sign-in (after finding
the form). Once the AI submitted and the vendor showed a 2FA prompt, the iframe
stayed on the pre-submit login tab — so a user asked to enter their 2FA code was
looking at an empty login form and couldn't. Re-emit the live view right after
the sign-in attempt, at the same tab the classifier judged, so the take-over
happens on the page the user actually sees. +test.
@vercel

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
comp-framework-editor Ready Ready Preview, Comment Jul 28, 2026 3:50pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
app Skipped Skipped Jul 28, 2026 3:50pm
portal Skipped Skipped Jul 28, 2026 3:50pm

Request Review

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

The connect session was created without a timeout, so it used the project's
short default and Browserbase auto-ended it (~2 min) — killing the live view
while a user was still fetching their authenticator / entering a 2FA code (the
'Debugging connection was closed' notice). Give human-facing sessions an explicit
15-minute timeout; headless capture runs keep the short default. +tests.
@vercel
vercel Bot temporarily deployed to Preview – portal July 28, 2026 15:49 Inactive
@vercel
vercel Bot temporarily deployed to Preview – app July 28, 2026 15:49 Inactive
@tofikwest
tofikwest merged commit e61243f into main Jul 28, 2026
11 checks passed
@tofikwest
tofikwest deleted the fix/browser-automation-liveview-2fa branch July 28, 2026 16:07
claudfuen pushed a commit that referenced this pull request Jul 28, 2026
## [3.110.1](v3.110.0...v3.110.1) (2026-07-28)

### Bug Fixes

* **api:** follow the live view to the 2FA page during connect sign-in ([#3516](#3516)) ([e61243f](e61243f))
* **app:** prompt to connect when creating an automation with no connection ([2b1dcad](2b1dcad))
@claudfuen

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 3.110.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants