Repository navigation
Open new-window links as tabs and ask before opening other apps - #253
Merged
Merged
Conversation
…ple platforms Links with target=_blank and window.open() without size now open a selected tab in the opener's window and partition. Opens that ask for window geometry keep the native pop-up. Links to other apps (slack:, mailto:) are cancelled and confirmed with a sheet or alert naming the requesting site; a page may ask once per document without a click. Covers macOS WebKit and Chromium and iOS. Chromium replays tab-like opens from their URL because CEF cannot hand its context to a tab. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…droid onCreateWindow without isDialog hands the WebView of a new selected tab to WebViewTransport, so the engine keeps its opener relationship. App links are cancelled in shouldOverrideUrlLoading and confirmed with a dialog; intent: URLs are rebuilt as a clean VIEW intent with only data, package and the BROWSABLE category. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ndows and Linux The desktop CEF engine replays non-pop-up opens with an http(s) URL as a selected tab in the source tab's partition, failing closed when that tab or partition is gone. App links are cancelled in OnBeforeBrowse and handed to the shell, which confirms with a native dialog naming the requesting site and the registered app. Schemes Chrome denies are never handed to the OS. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
WebKit reports only link clicks as activation, so a launch page's scripted retry button could not ask after the first prompt. macOS and iOS now record the person's last input; input within 2 s that the page has not used yet counts once. Input on the prompt itself is ignored. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
macOS 0.2.24 (52), iOS 0.2.16 (38), Android 0.2.20 (40), Windows 0.2.17, Linux 0.2.19. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9e17b8448c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The ignore rules matched only a directory, so a symlink to a shared CEF download was committed. Ignore the path whatever it is. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
target="_blank"links andwindow.open(url)without a size now open a selected tab in the same browser window and storage partition, instead of the pop-up window or sheet added in Open sign-in pop-ups across Kelpie platforms #251. Opens that ask for a window size (sign-in providers) keep the native pop-up. Links opened from inside a pop-up become tabs in the main window and survive the pop-up closing.WebKitWindowPolicy.placement(for:)treats anyx,y,widthorheightinWKWindowFeaturesas a pop-up. The tab hosts WebKit's own context, sowindow.openerworks where WebKit keeps it (noopenerand plain_blanklinks drop it), andwindow.close()closes a script-opened tab.onCreateWindow(isDialog = false)hands a new tab'sWebViewtoWebViewTransport.OnBeforePopupcancels non-NEW_POPUPopens with an http(s) URL and replays them as a tab. Blank windows a page fills later stay pop-ups. Replay has nowindow.opener, and a form POST to a new window becomes a GET. Desktop partition lookup fails closed. macOS Chromium pop-ups keep opening pop-ups, as before.slack:,zoommtg:,mailto:,tel:, Androidintent:) are cancelled and confirmed with a native prompt naming the requesting origin, and on desktop the app the OS resolved. Only the main frame or a same-origin frame may ask. Without a click a document may ask once, so launch pages work and loops do not; WebKit counts a click, tap or key press from the last 2 s once, because it reports only link clicks as activation.ExternalAppPromptsheet, opens the named app withNSWorkspace.UIApplication.open.intent:URLs are rebuilt as a cleanACTION_VIEWintent (data, package,CATEGORY_BROWSABLE; no component, selector, extras or flags);file:/content:data is refused;browser_fallback_urlloads when no app matches.DesktopCefClient::OnBeforeBrowseposts to a shell prompt (MessageBoxW+ShellExecuteW, GTK dialog +GAppInfo). Chrome's denied schemes (shell:,vbscript:,ms-msdt:…) never reach the OS.docs/functionality.md,docs/api/partitions.md, design note with the Codex cross-provider review indocs/plans/2026-11-23-new-window-tabs-and-external-apps.md.Screenshots
target="_blank"workspace link opened the launch page in a pop-up sheet and the page'sslack:link did nothing.macOS shows the same change: the tab opens in the main window and a sheet reads "Open “Slack”?" with "Open Slack" / "Cancel". This environment cannot capture macOS windows, so the sheet's text is checked by
ExternalAppPromptTestsinstead of a screenshot.Testing
Fixture: a workspace page with a
_blanklink,window.open()with and without a size, a launch page that redirects to an app link on load, and a "Launch app" button.window.openkeepsopener, sized open → pop-up window, a pop-up's link → tab in the main window that survives the pop-up closing, sign-in result returned, app-link sheet shown once per document. New tests pass:WebKitNewWindowTests(6),ExternalAppPromptTests,WebKitPopupTests. The full suite ran 295 tests with one failing case,BrowserControlGatewayTests.testAuthenticatedRoutesUseCanonicalEnvelopeAndCompactMCP, which fails identically onorigin/main.WebKitPopupTests(3) pass. Tapped through the fixture: tab, prompt, in-tab "use Slack in your browser", the second automatic request suppressed, and a tapped "Launch app" button asking again.ExternalAppLinksTest(3) andWebPopupFlowTest(2) pass. Driven through the API: tab, dialog, Open launched the dialer, once-per-document rule, and anintent:link for a missing app loaded its fallback page.close_tab_control_surface_testrun in the desktop session (it cannot start under SSH while another Kelpie holds the single-instance mutex). Driven through the API: tab,Open "Settings"?dialog for anms-settings:link, cancel kept the page, sized pop-up as a native window, a pop-up'swindow.openbecame a tab, sign-in result returned.test_new_window_policy) and app tests 56/56. Not verified by hand: http(s) pages never load in this VM for either this build or the installed 2026.11.22 release (data:URLs do), so the GTK prompt and tab replay were not exercised in a running app.pnpm lint.🤖 Generated with Claude Code