Repository navigation
fix(desktop): keep sign-in popups working in the agent browser - #9506
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
[Medium impact] The PR appears safe to merge. SummaryKeeps blank sign-in popups inside the agent browser while preserving their opener.
No actionable issues were found. Tests were inspected, not run.
|
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 5 files
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
- Adopt window.open('') / about:blank popups as tabs that keep window.opener (MSAL-style sign-in and payment flows got null)
- Read an adopted popup's session from its contents, not its URL
- Refuse a form POST into a new tab rather than resending it as a GET; forward the referrer on reissued links
- Closing a popup returns to its opener unless the user switched tabs since (Chrome's rule)
- mailto: links in the app window open the mail client, with attach/extra headers refused
- A background-tab popup with no Chromium-supplied contents now opens in the opener's session rather than the agent partition - Driver tests expect the referrer options loadURL now receives
waleedlatif1
force-pushed
the
fix/desktop-browser-popups
branch
from
October 31, 2026 08:13
a40f60a to
245d363
Compare
This branch was previously 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.
Summary
window.open('')/about:blankpopups returnednullin agent browser tabs, breaking blank-then-navigate sign-in and payment flows (e.g. MSAL's default popup). They are now adopted as tabs that keepwindow.opener, matching Electron's docs and Min; their first real navigation still passes the http-only and network guardstarget=_blankform POST that we would have to reissue (cross-session or background) is refused instead of silently resent as a GET with no body; reissued links keep their referrermailto:links in the app window (chat links, the offline page's Contact support) open the mail client;attach=, unknown headers, and malformed addresses are refusedType of Change
Testing
apps/desktop/e2e/browser-tools.spec.ts: blank popup keeps opener + postMessage round-trip + close returns to opener; opener forgotten after a manual tab switch;data:popup still denied; same-session form POST arrives as POST, cross-session POST opens nothing; Sim-origin blank popup keeps its openernavigation.test.ts+session.test.ts(90 pass), desktoptsc --noEmit, biome on changed files; full gate in CIChecklist
test-auditauthoring gate)