Add "Open in Browser" button to Active Pull Request view #1
+41
−3
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.
问题描述 (Problem Description)
现在状态栏的 Active PR 按钮点击之后会进入 Webview 的 PR 页面,我想加一个在浏览器里面打开 PR 的支持。
Currently, when viewing an active PR in the Activity Bar, users could only interact with it through the webview. There was no quick way to open the PR directly in a browser from the Activity Bar view.
解决方案 (Solution)
Added a new "Open in Browser" button to the Active Pull Request webview in the Activity Bar. This button allows users to quickly open the current PR on GitHub in their default browser with a single click.
实现细节 (Implementation Details)
Changes made to
/webviews/activityBarView/overview.tsx:Created a new
OpenInBrowserSectioncomponent that:openOnGitHub()method fromPullRequestContextIntegrated the button into the Overview layout between the Status Checks and Exit sections
Technical Flow:
openOnGitHub()method from context'pr.openOnGitHub'command to backendactivityBarViewProvider.ts) opens PR URL in browserUI 位置 (UI Placement)
The button is strategically placed in the review workflow:
This positioning makes sense because after reviewing status and adding comments, users may want to view the full PR on GitHub for additional actions.
优势 (Benefits)
Fixes the issue by providing a convenient way to open PRs in browser directly from the Activity Bar view.
Original prompt
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.