Skip to content

Disable editing pending steering messages - #336895

Draft
Joaquín Ruales (jruales) wants to merge 2 commits into
mainfrom
jruales-fix-pending-steering-edits
Draft

Joaquín Ruales (jruales) wants to merge 2 commits into
mainfrom
jruales-fix-pending-steering-edits

Conversation

@jruales

@jruales Joaquín Ruales (jruales) commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Fixes #325884.

Disable editing of pending steering messages to prevent multiple revisions from being sent to the agent. Queued and sent messages remain editable; provider send, cancellation, and model-switch behavior is unchanged.

Apply the restriction to toolbar, mouse, keyboard, and programmatic edit entry points. Add regression coverage and update accessibility help.

Fixes #325884

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings September 19, 2026 22:11

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.

Copilot review overview

🟡 Changes recommended

Unresolved queue and abort races can still send superseded or cancelled work.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 2 High severity · 2 Medium severity

Open (4)
What changed in this PR

Synchronizes pending Copilot steering edits with the SDK queue.

Changes:

  • Serializes queue mutations and retracts superseded steering.
  • Handles consumption, cancellation, and unrelated queued work.
  • Adds regression coverage for editing and lifecycle races.
File Description
src/​vs/​platform/​agentHost/​test/​node/​copilotAgentSession.test.ts Adds steering queue regression tests.
src/​vs/​platform/​agentHost/​node/​copilot/​copilotAgentSession.ts Implements steering queue reconciliation and serialization.
src/​vs/​platform/​agentHost/​node/​copilot/​copilotAgent.ts Routes pending steering state to the session.

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

Comment thread src/vs/platform/agentHost/node/copilot/copilotAgentSession.ts Outdated
Comment thread src/vs/platform/agentHost/node/copilot/copilotAgentSession.ts Outdated
Comment thread src/vs/platform/agentHost/node/copilot/copilotAgentSession.ts Outdated
Comment thread src/vs/platform/agentHost/node/copilot/copilotAgentSession.ts Outdated
Replace SDK queue reconciliation with shared UI editing guards. Preserve queued and sent request editing and restore the provider's existing send, cancel, and model-switch behavior.

Fixes #325884

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@jruales Joaquín Ruales (jruales) changed the title Fix pending Copilot steering message edits Disable editing pending steering messages Sep 20, 2026

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.

Copilot review overview

🟡 Changes recommended

Pending-kind transitions can retain stale row state and leave steering messages editable.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
Resolved since last review (4)

}

templateData.currentElement = element;
ChatContextKeys.isEditableRequest.bindTo(templateData.contextKeyService).set(isEditableRequestVM(element));
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.

Agent Host: editing a steering message when it's in a pending state causes all versions to be sent

2 participants