Skip to content

Browser: prepare for background tabs#312258

Merged
kycutler merged 2 commits intomainfrom
kycutler/bgbrowsers
Apr 24, 2026
Merged

Browser: prepare for background tabs#312258
kycutler merged 2 commits intomainfrom
kycutler/bgbrowsers

Conversation

@kycutler
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings April 23, 2026 23:17
@kycutler kycutler self-assigned this Apr 23, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the integrated browser plumbing to support “background tabs” by allowing browser views to exist without necessarily opening an editor, and by surfacing those background views in the tab quick pick.

Changes:

  • Update the browser tab quick pick to include a “Background” section backed by IBrowserViewWorkbenchService.getKnownBrowserViews().
  • Allow IBrowserViewCreatedEvent.openOptions to be omitted so views can be created without opening an editor, and adjust workbench handling accordingly.
  • Refactor browser view group creation APIs from windowId: number to owner: IBrowserViewOwner across workbench/shared/main services.
Show a summary per file
File Description
src/vs/workbench/contrib/browserView/electron-browser/features/browserTabManagementFeatures.ts Adds background section in tab quick pick and switches close/close-all to disposing known browser views.
src/vs/workbench/contrib/browserView/electron-browser/browserViewWorkbenchService.ts Only opens editors when openOptions exist; avoids opening child views if the parent isn’t open.
src/vs/workbench/contrib/browserView/electron-browser/browserViewCDPService.ts Creates CDP groups using an IBrowserViewOwner derived from the current window.
src/vs/platform/browserView/node/playwrightService.ts Updates to new browser view group creation signature (owner instead of windowId).
src/vs/platform/browserView/node/browserViewGroupRemoteService.ts Updates remote service API/docs for owner-based group creation.
src/vs/platform/browserView/electron-main/browserViewMainService.ts Updates createTarget signature and allows openOptions to be optional in openNew.
src/vs/platform/browserView/electron-main/browserViewGroupMainService.ts Updates main service group creation to pass IBrowserViewOwner.
src/vs/platform/browserView/electron-main/browserViewGroup.ts Stores owner instead of windowId and uses it for CDP window/bounds reporting.
src/vs/platform/browserView/common/browserViewGroup.ts Updates shared group service contract to accept IBrowserViewOwner.
src/vs/platform/browserView/common/browserView.ts Makes IBrowserViewCreatedEvent.openOptions optional (view can be created without opening an editor).

Copilot's findings

  • Files reviewed: 10/10 changed files
  • Comments generated: 1

Comment thread src/vs/platform/browserView/electron-main/browserViewGroup.ts
@kycutler kycutler marked this pull request as ready for review April 23, 2026 23:31
@vs-code-engineering
Copy link
Copy Markdown
Contributor

vs-code-engineering Bot commented Apr 23, 2026

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

@jruales

Matched files:

  • src/vs/platform/browserView/common/browserView.ts
  • src/vs/platform/browserView/common/browserViewGroup.ts
  • src/vs/platform/browserView/electron-main/browserView.ts
  • src/vs/platform/browserView/electron-main/browserViewGroup.ts
  • src/vs/platform/browserView/electron-main/browserViewGroupMainService.ts
  • src/vs/platform/browserView/electron-main/browserViewMainService.ts
  • src/vs/platform/browserView/node/browserViewGroupRemoteService.ts
  • src/vs/platform/browserView/node/playwrightService.ts
  • src/vs/workbench/contrib/browserView/electron-browser/browserViewCDPService.ts
  • src/vs/workbench/contrib/browserView/electron-browser/browserViewWorkbenchService.ts
  • src/vs/workbench/contrib/browserView/electron-browser/features/browserTabManagementFeatures.ts

@kycutler kycutler enabled auto-merge (squash) April 23, 2026 23:36
@kycutler kycutler merged commit f32a933 into main Apr 24, 2026
26 checks passed
@kycutler kycutler deleted the kycutler/bgbrowsers branch April 24, 2026 00:05
@vs-code-engineering vs-code-engineering Bot added this to the 1.118.0 milestone Apr 24, 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.

3 participants