expand-hidden-linked-comment - New feature - #9848
Conversation
Following a permalink to a hidden comment (spam, off-topic, resolved, outdated, etc.) left it collapsed behind a "Show comment" toggle in both the legacy timeline UI and the new React-based Issues UI. Now the targeted comment is expanded and scrolled into view automatically.
The generic \`details\` selector also matched unrelated dropdowns (the "..." menu, reactions popover) on regular comments, opening them by mistake when linking directly to a normal comment. Scope the lookup to the minimized-comment header instead, matching the selector already used by preview-hidden-comments.
|
This looks like an AI-generated PR, so we're preemptively closing it. If you're human and tested it, include a screenshot/video/gif of the working PR and we can reopen the PR. Don't open more PRs until this one is resolved. |
|
Hi, I'm human and did test this manually against the sandbox test URLs listed in the PR description before opening it:
I loaded the built extension unpacked in Chrome and verified the hidden comment expands automatically on each, and that it doesn't affect regular (non-hidden) comments. Screenshots are in the PR description, and I've added a screen recording above showing it working live. Screen recordingScreen.Recording.2026-07-17.at.3.11.23.PM.mov |
| return; | ||
| } | ||
|
|
||
| // TODO [2027-01-01]: Old timeline UI, drop |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
There was a problem hiding this comment.
Would be nice to support minimized PR comments on the Files changed tab
https://github.com/refined-github/refined-github/pull/9848/changes#r3611109458
Co-authored-by: Grigory <grigory.orlov.set@gmail.com>
Co-authored-by: Grigory <grigory.orlov.set@gmail.com>
|
|
||
| void features.add(import.meta.url, { | ||
| include: [ | ||
| pageDetect.hasComments, |
There was a problem hiding this comment.
We should probably limit this to the specific views we test and explicitly support. Commits also have comments but I don't want to support them, for example.
There are still a number of unresolved comments suggested by Grigory, I'm turning this into a draft PR until ready
expand-hidden-linked-comment - New feature
Co-authored-by: Grigory <grigory.orlov.set@gmail.com>
elementReady resolves at dom-ready, before comments are loaded, so target often came back undefined. waitForElement keeps observing past dom-ready, with a 5s timeout combined with the feature's abort signal.
fregante
left a comment
There was a problem hiding this comment.
Untested but the code looks good so far
|
The only issue I see is that opening the menu will make the comment lose the focus ring, so it does auto-open, but then you're lost again. You can see this in the screenshot above actually. Maybe we can just restore it via As expected, PR comments are not affected because we do not use |
|
By the way, I also opened this issue to address the header overlap GitHub bug regardless of |
fregante
left a comment
There was a problem hiding this comment.
Having used a feature a bit, I think losing the focus is worse than having to click to expand a hidden comment, so we can only add this feature if that can be fixed

Following a permalink to a hidden/minimized comment (marked as spam, off-topic, resolved, outdated, or abuse) leaves it collapsed behind a "Show comment" toggle instead of revealing it — the linked-to content stays invisible even though the page scrolls to it.
This adds a feature that detects when the URL hash targets a hidden comment and automatically expands it, in both:
Details
')Closes #9243
Test URLs
preview-hidden-commentstest PR sandbox#47 (comment) — hidden PR comment expands automaticallypreview-hidden-commentstest PR sandbox#47 (comment) — hidden review comment expands and is scrolled into viewScreenshot
Result test 1:
Result test 2:
Result test 3: