Skip to content

Fix child-chat feedback submission in the Agents window - #347192

Open
Rory Primrose (roryprimrose) wants to merge 2 commits into
microsoft:mainfrom
roryprimrose:issue-346885-child-feedback
Open

Rory Primrose (roryprimrose) wants to merge 2 commits into
microsoft:mainfrom
roryprimrose:issue-346885-child-feedback

Conversation

@roryprimrose

@roryprimrose Rory Primrose (roryprimrose) commented Nov 9, 2026 •

Copy link
Copy Markdown

Fixes #346885.

Summary

  • Preserve the chat where feedback was authored using the existing annotation origin.chat, including across navigation and reload. Legacy comments without chat ownership remain scoped to the owning main chat (annotation backend).
  • Submit comments to their authored chats without waiting for a chat widget. Queue feedback without interrupting the current turn, report acceptance or failure, and reject unavailable targets instead of falling back to the parent (feedback service).
  • Preserve the target chat's draft when submitting queued feedback (provider).

The split-button enhancement in #346884 is out of scope.

Validation

Local Windows validation of commit 796bc55dee304f34fa4f0b7f9d72c29909627f50:

  • pnpm run typecheck-client — passed, exit code 0.

  • pnpm run build-fast --client-only — passed, exit code 0.

  • ESLint checked all 11 changed TypeScript files; the corrected PR-review fixture was linted again successfully. Command scope:

    pnpm run eslint `
      src\vs\sessions\contrib\agentFeedback\browser\agentFeedbackEditorActions.ts `
      src\vs\sessions\contrib\agentFeedback\browser\agentFeedbackItemsBackend.ts `
      src\vs\sessions\contrib\agentFeedback\browser\agentFeedbackService.ts `
      src\vs\sessions\contrib\agentFeedback\test\browser\agentFeedbackEditorActions.test.ts `
      src\vs\sessions\contrib\agentFeedback\test\browser\agentFeedbackItemsBackend.test.ts `
      src\vs\sessions\contrib\agentFeedback\test\browser\agentFeedbackService.test.ts `
      src\vs\sessions\contrib\providers\agentHost\test\browser\localAgentHostSessionsProvider.test.ts `
      src\vs\workbench\contrib\sessions\browser\agentFeedback.ts `
      src\vs\workbench\contrib\sessions\browser\agentFeedbackModel.ts `
      src\vs\workbench\contrib\sessions\common\sessionsProvider.ts `
      src\vs\workbench\contrib\sessions\providers\agentHost\browser\baseAgentHostSessionsProvider.ts
  • Targeted browser regression tests — passed, exit code 0; 84 executed cases, no failures, errors, or skipped cases:

    node test\unit\browser\index.js --browser chromium-msedge `
      --run src\vs\sessions\contrib\agentFeedback\test\browser\agentFeedbackEditorActions.test.ts `
      --run src\vs\sessions\contrib\agentFeedback\test\browser\agentFeedbackService.test.ts `
      --run src\vs\sessions\contrib\agentFeedback\test\browser\agentFeedbackItemsBackend.test.ts `
      --run src\vs\sessions\contrib\providers\agentHost\test\browser\localAgentHostSessionsProvider.test.ts `
      --grep "Agent Feedback|AgentFeedbackService|AnnotationsAgentFeedbackItemsBackend|feedback queue" `
      --tfs feedback-routing
  • git diff --check — passed, exit code 0.

  • The reporter confirmed successful manual testing in the local Agents build.

Full integration and smoke suites were not run.

Review follow-up

Commit 0e329d8 waits for the queued request's matching host acknowledgement before reporting submission success, propagates host rejection without waiting for execution, and retains annotation backend origins while replacement snapshots load. Regression tests cover early acknowledgements, rejection, provider disposal, and editing/replying to cached deleted-child feedback during snapshot reload.

Validation of this follow-up:

pnpm.cmd run typecheck-client
# Passed, exit code 0.

pnpm.cmd run build-fast --client-only
# Passed, exit code 0.

$files = @(git diff --name-only -- '*.ts' | ForEach-Object { $_.Replace('/', '\') })
pnpm.cmd run eslint @files
# Passed: 12 changed TypeScript files, exit code 0 (run before committing).

git diff --check
# Passed, exit code 0 (run before committing).

node test\unit\browser\index.js --browser chromium-msedge `
  --run src\vs\sessions\contrib\agentFeedback\test\browser\agentFeedbackEditorActions.test.ts `
  --run src\vs\sessions\contrib\agentFeedback\test\browser\agentFeedbackService.test.ts `
  --run src\vs\sessions\contrib\agentFeedback\test\browser\agentFeedbackItemsBackend.test.ts `
  --run src\vs\sessions\contrib\providers\agentHost\test\browser\localAgentHostSessionsProvider.test.ts `
  --run src\vs\workbench\contrib\chat\test\common\chatService\chatService.test.ts `
  --run src\vs\sessions\contrib\inboxOne\test\browser\inboxNotificationsView.test.ts `
  --run src\vs\workbench\contrib\chat\test\browser\widget\chatWidget.test.ts `
  --run src\vs\workbench\contrib\chat\test\browser\voiceClient\voiceSessionController.test.ts `
  --run src\vs\workbench\contrib\chat\test\browser\voiceClient\voiceToolDispatchService.test.ts `
  --run src\vs\workbench\contrib\sessions\test\browser\chat\newChatUserInteraction.test.ts `
  --grep 'Agent Feedback|AgentFeedbackService|AnnotationsAgentFeedbackItemsBackend|feedback queue|ChatService|queued|queueing|queuing' `
  --tfs feedback-review-final --reporter dot
# Passed: 400 tests, no failures, errors, or skipped cases; exit code 0.

The manual testing reported above preceded this follow-up. The follow-up was validated with the automated checks listed here, not another live Dev Tunnel run.

Manual verification

  1. Open a parent agent-host session and one of its child chats in the Agents window.
  2. Add a comment in the child's Changes view and submit without selecting the parent.
  3. Verify that submission is acknowledged and the child receives the feedback directly.
  4. Repeat while the child is busy: acceptance should be acknowledged while processing remains queued, without stopping or steering the current turn.
  5. Add child feedback, navigate to the parent, and submit; the recorded child target should be preserved. Repeat with parent-authored feedback and both the editor toolbar and Changes primary action.
  6. Reload before submitting to check persistence. If the authored child has been deleted, submission should report failure and retain unsubmitted comments rather than retargeting the parent.

Fixes microsoft#346885: microsoft#346885

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 9, 2026 21:55
@vs-code-engineering

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

Sandeep Somavarapu (@sandy081)

Matched files:

  • src/vs/workbench/contrib/sessions/common/sessionsProvider.ts

Ladislau Szomoru (@lszomoru)

Matched files:

  • src/vs/workbench/contrib/sessions/common/sessionsProvider.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.

🟡 Changes recommended

Feedback is marked Submitted before host acknowledgement and remains so after rejection, while reopening sessions can temporarily cause edits and replies to fail until annotations reload.

2 open issues
What changed in this PR

Fixes child-chat feedback routing in the Agents window by preserving where comments were authored and submitting directly to those chats without waiting for a chat widget. The split-button enhancement remains out of scope.

Changes:

  • Persist chat ownership in annotations and reject unavailable targets rather than falling back to the parent.
  • Queue feedback without interrupting the current turn, preserve drafts, and show submission notifications.
  • Add regression coverage for routing, persistence, queueing, and failure handling.
File Description
src/​vs/​workbench/​contrib/​sessions/​providers/​agentHost/​browser/​baseAgentHostSessionsProvider.ts Forward queue options and preserve queued-request drafts.
src/​vs/​workbench/​contrib/​sessions/​common/​sessionsProvider.ts Add queue options to the provider request contract.
src/​vs/​workbench/​contrib/​sessions/​browser/​agentFeedbackModel.ts Add feedback chat ownership.
src/​vs/​workbench/​contrib/​sessions/​browser/​agentFeedback.ts Clarify background submission documentation.
src/​vs/​sessions/​contrib/​providers/​agentHost/​test/​browser/​localAgentHostSessionsProvider.test.ts Test queue forwarding and draft preservation.
src/​vs/​sessions/​contrib/​agentFeedback/​test/​browser/​agentFeedbackService.test.ts Test authorship routing and unavailable targets.
src/​vs/​sessions/​contrib/​agentFeedback/​test/​browser/​agentFeedbackItemsBackend.test.ts Test persisted ownership and legacy feedback.
src/​vs/​sessions/​contrib/​agentFeedback/​test/​browser/​agentFeedbackEditorActions.test.ts Test action routing and submission notifications.
src/​vs/​sessions/​contrib/​agentFeedback/​browser/​agentFeedbackService.ts Capture authorship and queue submissions by target chat.
src/​vs/​sessions/​contrib/​agentFeedback/​browser/​agentFeedbackItemsBackend.ts Persist and restore annotation chat origins.
src/​vs/​sessions/​contrib/​agentFeedback/​browser/​agentFeedbackEditorActions.ts Resolve editor context and use notification-aware submission.

Review effort: Balanced

Address host enqueue acknowledgement and annotation-origin retention review findings:

microsoft#347192 (comment)
microsoft#347192 (comment)

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

This branch has not been deployed

No deployments
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.

Agents Window: Submit comments from a child chat targets the parent and waits for its chat widget

2 participants