Skip to content

feat(panel): links to a pull request's own comments on GitHub open in its tab - #3887

Merged
luke-agent[bot] merged 7 commits into
mainfrom
feat/pr-anchors-open-in-tab
Oct 19, 2026
Merged

luke-agent[bot] merged 7 commits into
mainfrom
feat/pr-anchors-open-in-tab

Conversation

@dastratakos

@dastratakos dastratakos commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #3884, which adds the thread link and the jumps. This is item 4 of the deep-links work: a link in a PR's description or comments that points at one of that PR's own comments on GitHub now opens in the Pull request tab instead of the browser.

What it does

pull-request-anchors.ts (anchorIn) reads a GitHub link against the conversation the tab already read:

Link Opens
…/pull/N#discussion_r<id>, …/pull/N/files#r<id> The thread that comment stands in, a reply included, through the thread's own Luke link route (LINK_PLACE.PULL_REQUEST_THREAD, Conversation) from #3884
…/pull/N#issuecomment-<id>, …/pull/N#pullrequestreview-<id> That entry in the Conversation: scrolled to its centre, ringed, and focused
Anything else: another PR, the page with no fragment, or a comment the read didn't reach (the earlier entries left on GitHub, say) GitHub, as before

The match uses the url each entry and thread comment already carries, so it needs no service change.

How

  • OpenHereFirst (use-open-link): asks the tab's opener first and any place's opener around it after, so the Inbox's own opener still works.
  • Anchored wraps only the PR's own words: the description, entries and thread comments, in either view. "N more replies on GitHub" and "N earlier comments on GitHub" still leave for GitHub on purpose.
  • Landing: the hook from feat(panel): deep links to review threads in the Pull request tab #3884 now lands any card, keyed by a thread's id or an entry's page (useLandedEntry).
  • Filters: Hide resolved and Hide bots now take a set of kept keys, so an entry brought into view stays visible even when a filter would hide it.

Tests

  • pull-request-anchors.test:
    • a line comment's link names its thread: on the page, under the Files tab, through a reply, and whatever the case of owner and repo
    • comment and review links name their entries
    • another PR, another repo, the page alone, an unread comment, a #diff-… anchor, or a non-GitHub host names nothing
  • agent-pull-request-tab.test: in the description, a #discussion_r link takes the thread's route; an #issuecomment link rings and focuses the note; an unread #issuecomment-99 still opens GitHub.

Checks

  • panel tsc, the touched panel suites, oxlint, biome and knip pass.
  • Desktop/panel only, no service change, so no Preview run is needed.

Made with Luke

View guided diff Turn on auto-fix

dastratakos and others added 3 commits October 19, 2026 18:19
A review thread gets a Luke link of its own, LINK_PLACE.PULL_REQUEST_THREAD
(`…/agent/<id>/changes/<conversation|files>/thread/<threadId>`), routed by
openLink to the agent's Pull request tab on the view it names, which brings
the thread into view by GitHub's node id.

- Conversation → Files changed: a thread's file and lines, or its ⋯'s View
  in Files changed, opens the file (collapsed or folded as viewed), clears a
  filter hiding it, shows a minimized line's chip, opens the thread, scrolls
  Pierre's list to its line (or the file's above-the-diff list for a line
  no hunk shows or an outdated thread), lights its lines until its ring ends,
  and moves the focus to it. A thread whose file left the diff says so and
  is shown in the Conversation instead.
- Files changed → Conversation: View in Conversation scrolls to, opens, rings
  and focuses the card there, standing through Hide resolved and Hide bots.
- Copy link in a thread's ⋯ copies its link in the view it is drawn in.

Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
… its tab

In a Pull request tab's description and comments, a link to one of that
pull request's own comments on GitHub opens the comment in the tab rather
than the browser: `#discussion_r<id>` (or `/files#r<id>`) through its
thread's Luke link route into the Conversation, and `#issuecomment-<id>` or
`#pullrequestreview-<id>` brought into view in the Conversation, ringed and
focused, standing through its filters. A link to a comment the conversation
read did not reach, or to anything else, still opens on GitHub.

Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
@vercel

vercel Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
luke-web Ready Ready Preview Oct 19, 2026 8:02pm UTC

Request Review

Base automatically changed from feat/pr-thread-deep-links to main October 19, 2026 19:04
Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
@luke-agent
luke-agent Bot marked this pull request as ready for review October 19, 2026 19:35
@luke-agent
luke-agent Bot added this pull request to the merge queue Oct 19, 2026
devin-ai-integration[bot]

This comment was marked as resolved.

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Oct 19, 2026
…tanding

Each press of a link to one of the pull request's own comments is a new ask
from a counter the landing does not reset, and the anchors module and its
test lead with their `name.ts -- purpose` headers.

Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
@luke-agent
luke-agent Bot added this pull request to the merge queue Oct 19, 2026
@dastratakos dastratakos added the enhancement New feature or request label Oct 19, 2026 — with Luke Agent
@dastratakos dastratakos removed the enhancement New feature or request label Oct 19, 2026
Merged via the queue into main with commit 3a87b73 Oct 19, 2026
11 checks passed
@luke-agent
luke-agent Bot deleted the feat/pr-anchors-open-in-tab branch October 19, 2026 20:14

This branch was successfully deployed

1 active deployment
Preview — 914ca176 Deployed Oct 19, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant