Skip to content

Improve agent feedback workflows and persistence - #331079

Merged
Benjamin Christopher Simmonds (benibenj) merged 19 commits into
mainfrom
benibenj/particular-hedgehog
Aug 16, 2026
Merged

Improve agent feedback workflows and persistence#331079
Benjamin Christopher Simmonds (benibenj) merged 19 commits into
mainfrom
benibenj/particular-hedgehog

Conversation

@benibenj

Copy link
Copy Markdown
Contributor

Improves the agent feedback workflow across the Agents Window and agent host.

Summary

  • persist feedback annotations and replay pending annotation actions across reconnects
  • show feedback comments in a context view and reveal resolved feedback from chat attachments
  • filter resolved comments from agent feedback tools by default and add a reply-to-comment tool
  • add explicit Add and Add and Submit actions to the feedback input
  • wait for session chat models before running banner actions
  • fix feedback scope, delayed reveals, and overlay behavior

Issues

Fixes #328752
Fixes #328385
Fixes #328360
Fixes #328359
Fixes #328222
Fixes #327858
Fixes #326680
Fixes #322694

Testing

Not run at PR creation, per request. The branch includes targeted unit test updates for the changed behavior.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings August 16, 2026 14:05
…edgehog

# Conflicts:
#	src/vs/platform/agentHost/test/node/agentService.test.ts

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Improves agent-feedback persistence, presentation, submission, and agent-host tooling.

Changes:

  • Persists and reconnects annotation state.
  • Adds resolved-comment reveal, context views, and split feedback actions.
  • Adds model-readiness handling, reply tooling, and targeted tests.
Show a summary per file
File Description
src/vs/workbench/test/browser/componentFixtures/fixtureUtils.ts Updates feedback service fixture.
src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatAgentFeedbackReviewConfirmationSubPart.ts Repositions comment expansion control.
src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatAgentFeedbackReviewConfirmation.css Styles revised expansion layout.
src/vs/sessions/SINGLE_PANE_SCENARIOS.md Documents overlay behavior.
src/vs/sessions/LAYOUT.md Documents banner readiness behavior.
src/vs/sessions/contrib/sessionInputBanners/test/browser/sessionInputBannerWidget.test.ts Tests readiness and progress state.
src/vs/sessions/contrib/sessionInputBanners/test/browser/sessionInputBanners.fixture.ts Adds loading fixture.
src/vs/sessions/contrib/sessionInputBanners/browser/sessionInputBannerWidget.ts Waits before primary actions.
src/vs/sessions/contrib/sessionInputBanners/browser/sessionInputBanners.ts Connects banners to chat readiness.
src/vs/sessions/contrib/sessionInputBanners/browser/media/sessionInputBanners.css Updates progress-state documentation.
src/vs/sessions/contrib/chat/browser/sessionsChatAccessibilityHelp.ts Documents feedback attachment navigation.
src/vs/sessions/contrib/changes/browser/checksActions.ts Waits for the session widget.
src/vs/sessions/contrib/agentFeedback/test/browser/sessionEditorComments.test.ts Tests explicit resolved visibility.
src/vs/sessions/contrib/agentFeedback/test/browser/feedbackInputWidget.test.ts Tests split feedback actions.
src/vs/sessions/contrib/agentFeedback/test/browser/agentFeedbackService.test.ts Tests visibility, scope, and widget loading.
src/vs/sessions/contrib/agentFeedback/test/browser/agentFeedbackInputWidget.fixture.ts Instantiates the widget through DI.
src/vs/sessions/contrib/agentFeedback/test/browser/agentFeedbackEditorWidget.test.ts Tests resolved-comment hiding.
src/vs/sessions/contrib/agentFeedback/test/browser/agentFeedbackEditorOverlay.test.ts Tests empty-editor overlay suppression.
src/vs/sessions/contrib/agentFeedback/test/browser/agentFeedbackAttachment.test.ts Tests attachment activation and context view.
src/vs/sessions/contrib/agentFeedback/test/browser/agentEditorCommentsProvider.test.ts Tests delayed reveal and resolved hiding.
src/vs/sessions/contrib/agentFeedback/browser/sessionEditorComments.ts Optionally exposes resolved comments.
src/vs/sessions/contrib/agentFeedback/browser/nullAgentFeedbackService.contribution.ts Implements new no-op service APIs.
src/vs/sessions/contrib/agentFeedback/browser/media/agentFeedbackAttachment.css Styles the new context view.
src/vs/sessions/contrib/agentFeedback/browser/feedbackInputWidget.ts Adds dropdown action support.
src/vs/sessions/contrib/agentFeedback/browser/agentFeedbackService.ts Tracks visible resolved feedback.
src/vs/sessions/contrib/agentFeedback/browser/agentFeedbackOverviewRulerContribution.ts Includes explicitly revealed feedback.
src/vs/sessions/contrib/agentFeedback/browser/agentFeedbackEditorWidgetContribution.ts Reacts to visibility changes.
src/vs/sessions/contrib/agentFeedback/browser/agentFeedbackEditorWidget.ts Adds resolved-comment Hide action.
src/vs/sessions/contrib/agentFeedback/browser/agentFeedbackEditorOverlay.ts Hides overlays for empty Files.
src/vs/sessions/contrib/agentFeedback/browser/agentFeedbackEditorInputContribution.ts Adds split Add/Submit actions.
src/vs/sessions/contrib/agentFeedback/browser/agentFeedbackEditorActions.ts Navigates visible resolved comments.
src/vs/sessions/contrib/agentFeedback/browser/agentFeedbackContextView.ts Implements the comments context view.
src/vs/sessions/contrib/agentFeedback/browser/agentFeedbackAttachmentWidget.ts Activates single or grouped comments.
src/vs/sessions/contrib/agentFeedback/browser/agentEditorCommentsProvider.ts Delays reveals until comments exist.
src/vs/sessions/browser/chatWidgetUtils.ts Adds shared widget-loading helper.
src/vs/platform/agentHost/test/node/serverToolGroups.test.ts Tests reply-tool display.
src/vs/platform/agentHost/test/node/e2e/suites/serverToolsSuite.ts Includes reply tool in E2E coverage.
src/vs/platform/agentHost/test/node/copilotToolDisplay.test.ts Tests friendly reply-tool naming.
src/vs/platform/agentHost/test/node/copilotAgentSession.test.ts Updates feedback attachment prompt.
src/vs/platform/agentHost/test/node/claudeAgent.test.ts Updates Claude attachment expectations.
src/vs/platform/agentHost/test/node/agentService.test.ts Tests annotation persistence.
src/vs/platform/agentHost/test/node/agentHostStateManager.test.ts Tests annotation cleanup.
src/vs/platform/agentHost/test/node/agentFeedbackServerTools.test.ts Tests filtering and replies.
src/vs/platform/agentHost/test/electron-browser/remoteAgentHostProtocolClient.test.ts Tests reconnect replay.
src/vs/platform/agentHost/test/common/agentSubscription.test.ts Tests pending annotation preservation.
src/vs/platform/agentHost/node/shared/agentFeedbackServerTools.ts Adds reply and resolved filtering.
src/vs/platform/agentHost/node/agentService.ts Persists and restores annotations.
src/vs/platform/agentHost/node/agentHostStateManager.ts Restores and cleans annotation state.
src/vs/platform/agentHost/common/state/agentSubscription.ts Replays pending annotation actions.
src/vs/platform/agentHost/common/meta/agentFeedbackAttachments.ts Mentions selective replies.
src/vs/platform/agentHost/browser/remoteAgentHostProtocolClient.ts Replays generalized pending actions.
src/vs/base/browser/ui/dropdown/dropdownActionViewItem.ts Supports menu keybinding labels.

Review details

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 52/52 changed files
  • Comments generated: 2
  • Review effort level: Balanced

Comment thread src/vs/platform/agentHost/node/agentService.ts Outdated
Comment thread src/vs/sessions/contrib/agentFeedback/browser/media/agentFeedbackAttachment.css Outdated
Gate annotations subscribe on the annotations channel rather than session
state, so a subscribe racing session restore no longer serves the synthetic
empty snapshot. Show feedback row actions for keyboard-focused tree rows.

Fix the implicit-any 'ref' compile error and align custom-tool permission
'args' test helpers with the tightened SDK type. Register the workbench
services the feedback input widget now needs, and add the feedback events
and visible-resolved-ids the comments provider reads to fixture mocks.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The previous commit changed custom-tool permission 'args' to
Record<string, unknown> based on a typecheck run against a stale
node_modules; @github/copilot-sdk 1.0.11 expects JsonValue, so restore it.

Add the feedback visibility/reveal events and getVisibleResolvedFeedbackIds
to the remaining IAgentFeedbackService mocks, so editor contributions that
subscribe to them no longer throw in component fixtures.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Screenshot Changes

Base: 30ad9a50 Current: 5cc4baa4

Changed (22)

sessions/agentFeedback/agentFeedbackInputWidget/Empty/Dark
Before After
before after
sessions/agentFeedback/agentFeedbackInputWidget/Empty/Light
Before After
before after
sessions/agentFeedback/agentFeedbackInputWidget/AddComment/Dark
Before After
before after
sessions/agentFeedback/agentFeedbackInputWidget/AddComment/Light
Before After
before after
sessions/agentFeedback/agentFeedbackInputWidget/WithText/Dark
Before After
before after
sessions/agentFeedback/agentFeedbackInputWidget/WithText/Light
Before After
before after
sessions/agentFeedback/agentFeedbackInputWidget/MultilineText/Dark
Before After
before after
sessions/agentFeedback/agentFeedbackInputWidget/MultilineText/Light
Before After
before after
sessions/agentFeedback/agentFeedbackInputWidget/InEditor/Dark
Before After
before after
sessions/agentFeedback/agentFeedbackInputWidget/InEditor/Light
Before After
before after
sessions/inputBanners/sessionInputBanners/CIFailuresLoading/Dark
Before After
before after
sessions/inputBanners/sessionInputBanners/CIFailuresLoading/Light
Before After
before after
chat/chatAgentFeedbackReviewConfirmation/SingleComment/Dark
Before After
before after
chat/chatAgentFeedbackReviewConfirmation/SingleComment/Light
Before After
before after
chat/chatAgentFeedbackReviewConfirmation/MixedKinds/Dark
Before After
before after
chat/chatAgentFeedbackReviewConfirmation/MixedKinds/Light
Before After
before after
chat/chatAgentFeedbackReviewConfirmation/ManyComments/Dark
Before After
before after
chat/chatAgentFeedbackReviewConfirmation/ManyComments/Light
Before After
before after
chat/chatAgentFeedbackReviewConfirmation/LongComment/Dark
Before After
before after
chat/chatAgentFeedbackReviewConfirmation/LongComment/Light
Before After
before after
chat/chatAgentFeedbackReviewConfirmation/Carousel/Dark
Before After
before after
chat/chatAgentFeedbackReviewConfirmation/Carousel/Light
Before After
before after

Added (2)

sessions/inputBanners/sessionInputBanners/CommentsLoading/Dark

current

sessions/inputBanners/sessionInputBanners/CommentsLoading/Light

current

roblourens
roblourens previously approved these changes Aug 16, 2026
The prompts now advertise the new replyToComment tool and the listComments
includeResolved input, so refresh the committed baselines to match.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Feedback threads mix voices: the user, an agent's code review, and PR
reviewers. Comments already carried a kind, but it was never explained to
the model and replies carried no author at all, so an agent could not tell
its own replyToComment text from an instruction the user typed.

Record an author on each annotation entry, carry it through the client
model so a client write no longer erases it, and surface it in listComments
alongside the comment's own author. Document the vocabulary in the tool
description (the only part of the contract the prompt carries) and stop
defaulting unknown provenance to the user. The attachment hint now says the
user selected these comments rather than wrote them, and agent replies are
labelled in the editor widget.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
roblourens
roblourens previously approved these changes Aug 16, 2026
Read the entry _meta leaf into a local before indexing the namespaced slot,
matching the sibling annotation reader, so the untyped-meta rule is satisfied.
Give the feedback input's Add button its own nls key instead of colliding with
the line-number hover's 'Add Feedback'.

Move chatWidgetUtils into the chat contrib: it reaches into
vs/workbench/contrib, which vs/sessions/~ may not import but
vs/sessions/contrib/*/~ may, and all three callers are contribs.

Update the Claude and Copilot expectations for the reworded attachment hint.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The shared server-tools suite seeds annotation entries without an author, so
the comment falls back to its codeReview origin and the reply to the user.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The prompt snapshot header carries a tool count, which the hand-edited
baselines did not update when replyToComment was added; re-derive it from the
tool sections each file contains.

Guard the banner's primary action after its readiness await: the widget can be
disposed while waiting, and running then would submit against state the banner
no longer represents.

Clear the feedback service's per-session bookkeeping from a single
onDidDeleteSession listener. Deleting a session released its annotations
channel without clearing the recency, navigation and visible-resolved maps, so
they were retained for the lifetime of the window; the backend is left
untouched because its store is already gone.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@benibenj
Benjamin Christopher Simmonds (benibenj) merged commit 38220ea into main Aug 16, 2026
27 checks passed
@benibenj
Benjamin Christopher Simmonds (benibenj) deleted the benibenj/particular-hedgehog branch August 16, 2026 22:28
@vs-code-engineering vs-code-engineering Bot added this to the 1.134.0 milestone Aug 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

6 participants