Skip to content

[codex] Open external links in existing window tabs - #65

Merged
Andresshamis merged 1 commit into
Andresshamis:mainfrom
Avesceb:codex/open-external-links-in-tabs
Jul 24, 2026
Merged

[codex] Open external links in existing window tabs#65
Andresshamis merged 1 commit into
Andresshamis:mainfrom
Avesceb:codex/open-external-links-in-tabs

Conversation

@Avesceb

@Avesceb Avesceb commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Problem

When Lumen is registered for http and https URLs, clicking a link in another app routes the event to Lumen. The existing WindowGroup did not declare that an open scene should handle external events and did not consume the incoming URL. SwiftUI therefore created another browser window, while the requested page never reached the browser store.

For users, this made links from apps such as Excel and Numbers effectively impossible to open in Lumen.

Root cause

The generated application bundle did not consistently declare the web URL schemes, and the main browser view had neither an external-event preference nor an onOpenURL handler. With a multi-window WindowGroup, an unclaimed event is routed to a newly created scene.

Fix

The generated Info.plist now declares Lumen as a viewer for the http and https URL schemes.

The main browser view now:

  • prefers its already-open scene for every incoming external URL;
  • passes the URL to BrowserStore.open, which creates and selects a new tab using the existing navigation and URL security policies.

If Lumen has no open scene, SwiftUI can still create the browser scene and deliver the URL to the same handler.

Validation

  • swift test — 425 tests passed with 0 failures.
  • bash -n script/build_and_run.sh
  • git diff --check

@Avesceb
Avesceb marked this pull request as ready for review July 24, 2026 20:03
@Andresshamis
Andresshamis merged commit 48b02c7 into Andresshamis:main Jul 24, 2026
1 check passed
Andresshamis pushed a commit that referenced this pull request Jul 28, 2026
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.

2 participants