Mark PR review comments as converted when added to agent feedback#303168
Merged
Mark PR review comments as converted when added to agent feedback#303168
Conversation
When a PR review comment is converted to agent feedback in the editor widget, it is now locally marked as converted so it hides from the feedback widget. The converted state survives PR poll refreshes. Changes: - CodeReviewService: track converted PR comment IDs per session, filter them from the PR review observable state and poll rebuilds - AgentFeedbackService: add optional sourcePRReviewCommentId to IAgentFeedback and addFeedback() - IAgentFeedbackVariableEntry: carry sourcePRReviewCommentId through to the chat attachment - AgentFeedbackEditorWidget: on convert, call markPRReviewCommentConverted and pass the source thread ID - AgentFeedbackAttachment: include PR comment origin (thread ID) in the stringified value sent to the LLM Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Agent Sessions “PR review → agent feedback” conversion flow so that converted PR review threads are immediately hidden from the PR review/feedback UI and stay hidden across PR poll refreshes, while also threading the originating PR review thread id through feedback attachments so the LLM can reference/resolve it.
Changes:
- Track “converted” PR review thread ids per session in
CodeReviewServiceand filter them out of PR review observable state (including during poll refresh rebuilds). - Extend agent feedback data + chat variable entry payloads to optionally carry the source PR review thread id.
- Enrich the agent feedback attachment’s stringified value with PR-review origin metadata (thread id) for downstream resolution.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/contrib/chat/common/attachments/chatVariableEntries.ts | Extends the agent feedback variable entry contract to carry an optional PR review source id. |
| src/vs/sessions/contrib/codeReview/browser/codeReviewService.ts | Adds per-session tracking/filtering of converted PR review thread ids and cleans up on session disposal. |
| src/vs/sessions/contrib/agentFeedback/browser/agentFeedbackService.ts | Adds an optional sourcePRReviewCommentId field to feedback items and plumbs it through add APIs. |
| src/vs/sessions/contrib/agentFeedback/browser/agentFeedbackEditorWidgetContribution.ts | When converting from PR review, passes through the PR thread id and marks it converted in code review state. |
| src/vs/sessions/contrib/agentFeedback/browser/agentFeedbackAttachment.ts | Includes the source PR thread id in variable entries and adds PR-origin context to the LLM string value. |
You can also share your feedback on Copilot code review. Take the survey.
src/vs/sessions/contrib/agentFeedback/browser/agentFeedbackAttachment.ts
Show resolved
Hide resolved
lszomoru
approved these changes
Mar 19, 2026
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.
Summary
When a PR review comment is converted to agent feedback in the agent sessions editor widget, it now gets locally marked as "converted" and immediately hides from the feedback widget. This marking survives PR poll refreshes so the comment stays hidden.
Additionally, the attachment variable entry now carries the source PR review comment thread ID, and the stringified value sent to the LLM mentions that the feedback originated from a PR comment with its thread ID so it can be resolved when addressed.
Changes
codeReviewService.tsmarkPRReviewCommentConverted()— tracks converted IDs per session, filters from PR review observable state, and filters during poll rebuilds. Cleans up on session dispose.agentFeedbackService.tssourcePRReviewCommentIdtoIAgentFeedbackinterface andaddFeedback()/addFeedbackAndSubmit()methodschatVariableEntries.tsIAgentFeedbackVariableEntry.feedbackItemswith optionalsourcePRReviewCommentIdagentFeedbackEditorWidgetContribution.tsmarkPRReviewCommentConvertedand passes source thread ID toaddFeedbackagentFeedbackAttachment.tssourcePRReviewCommentIdthrough to variable entry; enriches stringified LLM value with PR comment origin and thread IDTesting
compile-check-ts-native)