Browser: prepare for background tabs#312258
Merged
Conversation
Contributor
There was a problem hiding this comment.
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.openOptionsto be omitted so views can be created without opening an editor, and adjust workbench handling accordingly. - Refactor browser view group creation APIs from
windowId: numbertoowner: IBrowserViewOwneracross 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
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: @jrualesMatched files:
|
dmitrivMS
approved these changes
Apr 23, 2026
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.
No description provided.