Restore copy link button to PR overview header for improved discoverability#7806
Closed
Restore copy link button to PR overview header for improved discoverability#7806
Conversation
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] The old button bar was more discoverable
Restore copy link button to PR overview header for improved discoverability
Sep 12, 2025
alexr00
requested changes
Sep 12, 2025
| <div className="button-group"> | ||
| <CheckoutButton {...{ isCurrentlyCheckedOut, isIssue, repositoryDefaultBranch, owner, repo, number }} /> | ||
| {!isIssue ? ( | ||
| <button title="Copy link" onClick={copyPrLink} className="secondary"> |
Member
There was a problem hiding this comment.
@copilot Also show for issues. Place the button after the rename button and style it like the rename button.
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.
Fixes the discoverability issue where the copy link functionality was moved from the button bar to a right-click context menu in commit 078592a. This change restores the copy link button to the PR overview header button bar while maintaining the existing context menu functionality.
Changes Made
webviews/components/header.tsxcopyPrLink()method which triggers thepr.copyPrLinkVS Code command!isIssuecheck)Before vs After
Before: Only a "Refresh" button was visible in the header
After: Both "Copy Link" (with copy icon) and "Refresh" buttons are visible
Implementation Details
The implementation is minimal and surgical:
copyIconfrom existing icon libraryonClick={copyPrLink}before the Refresh button{!isIssue ? ... : null}to match CheckoutButton behaviorThis restores the discoverability that users had before while keeping all existing functionality intact. Users can now easily copy the PR link without needing to discover the right-click context menu option.
Additional instructions:
Fixes #7781
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.