cli plan widget providing feedback improvements#313604
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the chat plan review (“plan widget”) feedback flow to make reviewing/editing the plan file and providing feedback a single cohesive experience, including support for inline editor-anchored comments and improved transcript rendering.
Changes:
- Replaces the legacy “Provide Feedback” footer entry with a single “Review / Edit or Provide Feedback” affordance that opens the plan file and enters feedback mode.
- Adds an inline-comments list (with per-item remove + “Clear All”) and includes inline-comment counts in the “Submit Feedback” action.
- Updates transcript/progress rendering to avoid collapsing feedback into an unreadable single-line wall of text.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/contrib/chat/test/browser/widget/chatContentParts/chatPlanReviewPart.test.ts | Updates/extends unit tests to cover new review/feedback behavior and inline-comments list behavior. |
| src/vs/workbench/contrib/chat/common/chatService/chatService.ts | Extends IChatPlanReviewResult with structured fields for overall vs inline feedback display. |
| src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.ts | Renders structured feedback fields in the plan review progress message (overall inline + inline-comments markdown). |
| src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatPlanReview.css | Adjusts scroll/geometry handling and adds styling for the inline-comments list + header actions. |
| src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPlanReviewPart.ts | Implements the new review/feedback mode, inline-comments list management, and structured feedback submission. |
| src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorContribution.ts | Removes editor-surface “submit” flow; keeps editor overlay focused on capturing inline comments and improves activation behavior. |
| src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorActions.ts | Removes the “Submit Feedback” editor action and adjusts menu grouping/labels accordingly. |
Copilot's findings
Comments suppressed due to low confidence (3)
src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPlanReviewPart.ts:742
exitFeedbackModeis markedasyncbut contains noawait. This adds an unnecessary Promise-returning API surface and can make call sites look asynchronous when they aren't. Consider removingasync/Promise<void>and keeping it synchronous.
private async exitFeedbackMode(): Promise<void> {
if (!this._isFeedbackMode) {
return;
}
// "Back" is non-destructive: inline comments and the draft textarea
// are preserved so the user can resume by clicking Review again.
// Per-row \u00d7 buttons and the Clear All button handle deletion
// explicitly.
this._isFeedbackMode = false;
if (this._feedbackSection) {
dom.hide(this._feedbackSection);
}
this.domNode.classList.remove('chat-plan-review-feedback-mode');
this.renderCurrentActionButtons();
this._messageScrollable.scanDomNode();
this._onDidChangeHeight.fire();
}
src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPlanReviewPart.ts:780
feedbackInlineMarkdownis built via string interpolation that insertsitem.textdirectly into a markdown bullet. If the comment text contains markdown control characters/newlines, it can break the formatting in both the transcript and the message sent to the agent. Escape user-provided text (and ideally the filename) withescapeMarkdownSyntaxTokens(or otherwise sanitize) before embedding it into markdown.
const heading = fileName
? localize('chat.planReview.inlineCommentsHeading', "Inline comments on `{0}`:", fileName)
: localize('chat.planReview.inlineCommentsHeadingNoFile', "Inline comments:");
const bullets = editorFeedbackItems.map(item => {
const location = item.column > 1
? localize('chat.planReview.inlineCommentLocation', "Line {0}, Column {1}", item.line, item.column)
: localize('chat.planReview.inlineCommentLocationLine', "Line {0}", item.line);
return `- **${location}:** ${item.text}`;
});
feedbackInlineMarkdown = [heading, ...bullets].join('\n');
src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPlanReviewPart.ts:451
- The confirmation prompt text uses the "comment(s)" pattern, which reads awkwardly and isn't localized for singular vs plural. Prefer separate singular/plural strings (e.g. conditional on
items.length) or rephrase to a neutral plural ("Clear {0} inline comments?") to avoid "(s)".
const result = await this._dialogService.confirm({
type: Severity.Warning,
message: localize('chat.planReview.clearAllConfirm', 'Clear {0} inline comment(s)?', items.length),
detail: localize('chat.planReview.clearAllDetail', 'These comments will be removed from the plan file and not sent to the agent.'),
primaryButton: localize('chat.planReview.clearAllConfirmPrimary', 'Clear All'),
});
- Files reviewed: 7/7 changed files
- Comments generated: 2
bpasero
approved these changes
May 1, 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.
new feedback providing flow for the plan widget: