same-page-links - Apply to linked PR links#9195
Conversation
Fixes refined-github#9187 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
I tested this in Chrome without the extension installed. In that environment, the linked PR indicators on the issue list render as The selector I used targets Could you confirm whether the linked PR elements on the issue list actually render as |
|
I can't believe we didn't support this already. Changed to be an enhancement |
|
|
||
| function initIssueList(signal: AbortSignal): void { | ||
| observe( | ||
| '[data-testid="list-row-linked-pull-requests"] a[target="_blank"]', // Closing links on the issue list |
There was a problem hiding this comment.
I think this selector only works on issue lists. PR lists also have links pointing to issues. Can you verify whether the bug exists there and whether a new selector needs to be added here?
There was a problem hiding this comment.
In cases where an issue has multiple closing PRs, there's a popup. The selector should cover the links inside the popup as well (assuming they open in a new tab)
There was a problem hiding this comment.
(assuming they open in a new tab)
They don't
There was a problem hiding this comment.
PR lists also have links pointing to issues
No
same-page-links - Support closing links on issue listsame-page-links - Support linked issue/PR links
same-page-links - Support linked issue/PR linkssame-page-links - Support linked PR links
same-page-links - Support linked PR linkssame-page-links - Update feature
| function init(signal: AbortSignal): void { | ||
| observe([ | ||
| '[data-testid="state-reason-link"] + [target="_blank"]', // "Closing issue" link | ||
| '[data-testid="issue-metadata-fixed"] [target="_blank"]', // Reference PR link in issue header |
There was a problem hiding this comment.
Didn't handle links in sticky header
|
Off-topic suggestion: it would make sense to disable this feature on mobile, since it's harder to open links in a new tab there |
| "flat-zip": "^1.0.1", | ||
| "github-reserved-names": "^2.1.1", | ||
| "github-url-detection": "^11.1.3", | ||
| "github-url-detection": "^11.2.1", |
The feature follows the logic that it's up to the user to decide where links open and that it's "surprising behavior" to do otherwise. The only reasonable exception is to avoid loss of data (e.g. avoid navigation specifically when filling out a form) Mobile doesn't change this |
same-page-links - Update featuresame-page-links - Extend feature to more links
same-page-links - Extend feature to more linkssame-page-links - Apply to linked PR links

Fixes #9187
Updates the feature to cover:
Test URLs
clear-pr-merge-commit-message: Feature doesn't work at all #8346same-page-links- Issue with a lot of linked PRs sandbox#130