Skip to content

Allow the browser open command to reuse an existing tab#304914

Merged
kycutler merged 2 commits intomainfrom
kycutler/reuseopentab
Mar 26, 2026
Merged

Allow the browser open command to reuse an existing tab#304914
kycutler merged 2 commits intomainfrom
kycutler/reuseopentab

Conversation

@kycutler
Copy link
Contributor

Part of #295832

Copy link
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 extends the Integrated Browser “open” command to optionally reuse an existing browser tab (by matching its URL against a glob), which helps scenarios like Live Preview restoring state across reload/restart.

Changes:

  • Add reuseUrlFilter option to workbench.action.browser.open to focus/reuse an existing BrowserEditorInput whose URL matches a glob.
  • Add BrowserEditorInput.navigate(url) to update the target URL even when the browser model hasn’t been created yet.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/vs/workbench/contrib/browserView/electron-browser/features/browserTabManagementFeatures.ts Adds URL-glob-based reuse logic to the Integrated Browser open command.
src/vs/workbench/contrib/browserView/common/browserEditorInput.ts Adds a navigate() helper to retarget an existing Browser editor input prior to model creation.

jruales
jruales previously approved these changes Mar 25, 2026
@kycutler kycutler merged commit bc8f9ef into main Mar 26, 2026
52 of 62 checks passed
@kycutler kycutler deleted the kycutler/reuseopentab branch March 26, 2026 03:58
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