KEMBAR78
Honor workbench.externalBrowser setting for GitHub issue creation by Copilot · Pull Request #263481 · microsoft/vscode · GitHub
Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Aug 26, 2025

The "Create bug on GitHub" button was not respecting the workbench.externalBrowser setting, always opening URLs in the system default browser instead of the user's configured preference.

Problem

When users clicked the "Create bug on GitHub" button in the issue reporter, the implementation used direct window opening methods:

  • dom.windowOpenNoOpener() in the browser version
  • mainWindow.open() for dynamically created GitHub issues

These methods bypassed VS Code's external browser configuration, forcing users to use their system default browser even when they had configured a different browser via workbench.externalBrowser.

Solution

Replaced direct window opening with IOpenerService, which properly respects the external browser setting:

Before:

dom.windowOpenNoOpener(uri);
mainWindow.open(result.html_url, '_blank');

After:

this.openerService.open(uri, { openExternal: true });
this.openerService.open(result.html_url, { openExternal: true });

Changes

  • BrowserIssueService: Added IOpenerService injection and replaced dom.windowOpenNoOpener() calls
  • BaseIssueReporterService: Added IOpenerService injection and replaced mainWindow.open() calls
  • IssueWebReporter & IssueReporter: Updated constructors to pass IOpenerService to base class
  • All implementations now use openerService.open(url, { openExternal: true }) for consistent behavior

Testing

Added unit tests to verify IOpenerService is called with the correct parameters and options.

This change ensures that both the legacy GitHub issue reporter (when issueReporter.experimental.webReporter is false) and the new web-based issue reporter honor the user's browser preference configured via workbench.externalBrowser.

Fixes #260950.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • electronjs.org
    • Triggering command: node-gyp (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits August 26, 2025 22:14
Co-authored-by: Yoyokrazy <12552271+Yoyokrazy@users.noreply.github.com>
Co-authored-by: Yoyokrazy <12552271+Yoyokrazy@users.noreply.github.com>
Copilot AI changed the title [WIP] Create bug on github button should allow us to use different browsers Honor workbench.externalBrowser setting for GitHub issue creation Aug 26, 2025
Copilot AI requested a review from Yoyokrazy August 26, 2025 22:19
Copilot finished work on behalf of Yoyokrazy August 26, 2025 22:19
@Yoyokrazy Yoyokrazy marked this pull request as ready for review August 28, 2025 04:20
Copy link
Collaborator

@Yoyokrazy Yoyokrazy left a comment

Choose a reason for hiding this comment

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

tested browser implementation as well. all links within issueReporter now respect the workbench setting then system default.

@vs-code-engineering vs-code-engineering bot added this to the August 2025 milestone Aug 28, 2025
@Yoyokrazy Yoyokrazy enabled auto-merge (squash) August 28, 2025 04:27
@Yoyokrazy Yoyokrazy merged commit 7a1d7c4 into main Aug 28, 2025
18 checks passed
@Yoyokrazy Yoyokrazy deleted the copilot/fix-260950 branch August 28, 2025 04:27
@Yoyokrazy Yoyokrazy linked an issue Aug 29, 2025 that may be closed by this pull request
3 tasks
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Oct 12, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create bug on github button should allow us to use different browsers Issue Reporter -- Add Create/Preview option + repo routing choices

3 participants