Skip to content

feat(vscode): add copy link action to PR comments - #14126

Merged
marius-kilocode merged 2 commits into
mainfrom
add-comment-copy-link-button
Sep 15, 2026
Merged

marius-kilocode merged 2 commits into
mainfrom
add-comment-copy-link-button

Conversation

@marius-kilocode

@marius-kilocode marius-kilocode commented Sep 14, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

PR comment cards in the Agent Manager let you copy a comment body or open it on GitHub, but there is no way to copy a link to a specific comment. Sharing one comment means scrolling GitHub to find its permalink.

Why This Change Was Made

GitHub exposes a per-comment permalink (#discussion_r..., #issuecomment-..., #pullrequestreview-...) and it is already loaded on each comment as url, so the card can copy that value directly. The existing CopyButton already carries the copied/check feedback, so it gained an optional icon prop instead of a parallel implementation.

The action renders only when the comment URL is a valid HTTPS URL. Comments without one keep the current action row.

User Impact

  • An open review thread or conversation comment in the Agent Manager PR panel shows a chain-link "Copy comment link" action next to "Copy comment".
  • Clicking it puts the comment permalink on the clipboard and briefly shows a check.
  • The same action appears in the diff viewer comment card, which reuses the review-thread card.
  • The label is translated in all Agent Manager locales.

Screenshots

Comment card action row with the new chain-link action, between the copy button and the open-on-GitHub button:

PR comment action row with the Copy comment link chain-link action

After the click, the action shows the copied check:

Copy comment link action showing the copied check state

Evidence

  • bun test on pr-comments-render, pr-conversation-render, i18n-keys, i18n-unused-keys, agent-manager-i18n-split: 22 pass, 0 fail.
  • bun run lint: clean.
  • Self-test in isolated VS Code: on PR feat(vscode): add compact tool activity summaries #13312 the action row shows "Copy comment link"; clicking it changed the icon from link to check and put https://github.com/Kilo-Org/kilocode/pull/13312#issuecomment-5371162311 on the clipboard. No webview console errors.
  • Visual regression baselines for the pr-panel-comments story change, and the workflow regenerates them.

bun run check-types cannot run in a fresh worktree because generated SDK and local packages (@kilocode/kilo-indexing, @kilocode/kilo-memory) are stale. The touched files report no TypeScript errors.

Add a chain-link action to Agent Manager PR comment cards that copies the comment GitHub permalink. The action renders only when the comment has a valid URL and reuses the existing copy feedback. It covers review-thread and conversation cards, including the diff viewer comment card, and adds the copy comment link label to all locales.
@kilo-code-bot

kilo-code-bot Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Incremental review at 9ca5aab9095ddd903f0b81751a7427b387144308: the only change since the previous review (4fb9f383) is the pr-panel-comments visual-regression baseline (pr-panel-comments-chromium-linux.png, LFS pointer). No source or code changes were introduced, so the previous no-issue assessment stands. Visual baselines are regenerated by CI and are not reviewable here.

Files Reviewed (1 file)
  • packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/agentmanager/pr-panel-comments-chromium-linux.png - visual baseline only, no issues
Previous Review Summary (commit 4fb9f38)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 4fb9f38)

Status: No Issues Found | Recommendation: Merge

The change adds a Copy comment link action to the Agent Manager PR review-thread and conversation cards. The new button reuses CopyButton, is gated on githubUrl(comment.url) so only valid https:// permalinks render the action, and the icon prop is optional so existing callers are unaffected. The link icon resolves through the upstream icon registry, PRComment/PRConversationComment already expose the optional url field, and the new agentManager.pr.comment.copyLink key is present in all 21 locale dictionaries. No new timers, listeners, or subscriptions are introduced, so there is no new leak surface; the pre-existing 1500ms feedback timeout in CopyButton was not modified. A changeset is included and the fixture tests cover both card variants.

Files Reviewed (27 files)
  • .changeset/copy-comment-link.md
  • packages/kilo-vscode/tests/fixtures/pr-comments-render.tsx
  • packages/kilo-vscode/tests/fixtures/pr-conversation-render.tsx
  • packages/kilo-vscode/webview-ui/agent-manager/pr/CopyButton.tsx
  • packages/kilo-vscode/webview-ui/agent-manager/pr/PRCommentCard.tsx
  • packages/kilo-vscode/webview-ui/agent-manager/pr/PRConversation.tsx
  • packages/kilo-vscode/webview-ui/agent-manager/i18n/ar.ts
  • packages/kilo-vscode/webview-ui/agent-manager/i18n/br.ts
  • packages/kilo-vscode/webview-ui/agent-manager/i18n/bs.ts
  • packages/kilo-vscode/webview-ui/agent-manager/i18n/da.ts
  • packages/kilo-vscode/webview-ui/agent-manager/i18n/de.ts
  • packages/kilo-vscode/webview-ui/agent-manager/i18n/en.ts
  • packages/kilo-vscode/webview-ui/agent-manager/i18n/es.ts
  • packages/kilo-vscode/webview-ui/agent-manager/i18n/fa.ts
  • packages/kilo-vscode/webview-ui/agent-manager/i18n/fr.ts
  • packages/kilo-vscode/webview-ui/agent-manager/i18n/it.ts
  • packages/kilo-vscode/webview-ui/agent-manager/i18n/ja.ts
  • packages/kilo-vscode/webview-ui/agent-manager/i18n/ko.ts
  • packages/kilo-vscode/webview-ui/agent-manager/i18n/nl.ts
  • packages/kilo-vscode/webview-ui/agent-manager/i18n/no.ts
  • packages/kilo-vscode/webview-ui/agent-manager/i18n/pl.ts
  • packages/kilo-vscode/webview-ui/agent-manager/i18n/ru.ts
  • packages/kilo-vscode/webview-ui/agent-manager/i18n/th.ts
  • packages/kilo-vscode/webview-ui/agent-manager/i18n/tr.ts
  • packages/kilo-vscode/webview-ui/agent-manager/i18n/uk.ts
  • packages/kilo-vscode/webview-ui/agent-manager/i18n/zh.ts
  • packages/kilo-vscode/webview-ui/agent-manager/i18n/zht.ts

Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0

Review guidance: REVIEW.md from base branch main

@marius-kilocode
marius-kilocode merged commit 9c7736f into main Sep 15, 2026
27 checks passed
@marius-kilocode
marius-kilocode deleted the add-comment-copy-link-button branch September 15, 2026 07:33
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.

2 participants