Why
Quartz currently presents itself to WebExtension APIs as a single window with a single active tab. openNewTabUsing loads URLs into the current browser surface and the WKWebExtensionWindow / WKWebExtensionTab implementations return self. That keeps the first extension bridge small, but many extensions expect real tab/window behavior.
Where to start
Sources/Quartz/QuartzApp.swift
Sources/Quartz/QuartzWebExtensionSupport.swift
webExtensionController(_:openNewTabUsing:for:completionHandler:)
WKWebExtensionWindow and WKWebExtensionTab conformance
Suggested approach
Design the smallest native tab/window model that improves extension compatibility. This could be a tab strip, separate browser windows, or an internal tab representation that can grow into visible tabs later. The important part is that WebExtension APIs can reason about distinct tabs instead of a single self tab.
Acceptance criteria
- Opening a new tab from an extension does not overwrite the current page unexpectedly.
- Quartz can report multiple tabs/windows to WebExtension APIs when more than one exists.
- The active tab and tab URL returned to extensions match the visible browser state.
- Existing single-window browsing still works.
swift build succeeds.
Testing
- Use an extension that opens a new tab/window.
- Confirm the current page remains available.
- Confirm extension popups/actions still target the active visible page.
Why
Quartz currently presents itself to WebExtension APIs as a single window with a single active tab.
openNewTabUsingloads URLs into the current browser surface and theWKWebExtensionWindow/WKWebExtensionTabimplementations returnself. That keeps the first extension bridge small, but many extensions expect real tab/window behavior.Where to start
Sources/Quartz/QuartzApp.swiftSources/Quartz/QuartzWebExtensionSupport.swiftwebExtensionController(_:openNewTabUsing:for:completionHandler:)WKWebExtensionWindowandWKWebExtensionTabconformanceSuggested approach
Design the smallest native tab/window model that improves extension compatibility. This could be a tab strip, separate browser windows, or an internal tab representation that can grow into visible tabs later. The important part is that WebExtension APIs can reason about distinct tabs instead of a single
selftab.Acceptance criteria
swift buildsucceeds.Testing