Skip to content

chat: Show slow organization settings in chat instead of stacked toasts - #342937

Merged
Ross Wollman (rwoll) merged 2 commits into
mainfrom
agents/vscode-chat-message-delay-feature
Oct 20, 2026
Merged

Ross Wollman (rwoll) merged 2 commits into
mainfrom
agents/vscode-chat-message-delay-feature

Conversation

@rwoll

@rwoll Ross Wollman (rwoll) commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Follow-up to #342167.

When an organization's managed settings load slowly, users saw several identical "Loading your organization's managed settings" toasts stacked up. Most were for background work they weren't waiting on.

The message now appears only in the chat that is waiting for these settings, inline in its progress row like "Working…". It disappears when the settings load. Background loading no longer interrupts the user.

Known gap (follow-up): the first send in a new chat can still pause before the message moves into the chat while settings load, now without a toast.

The mock policy server also gets a Response delay (ms) setting (delayMs, default 0) to reproduce slow delivery.

Screenshot

Screenshot 2026-10-20 at 9 26 54 AM

How to test

  1. Run npm run mock-policy-server and route the client to it.
  2. Clear the policy cache in the GUI, then set Response delay (ms) to 8000 for Managed Settings.
  3. Send a message in a new chat. After about 3.5 seconds the loading message appears inline in the chat, and no toasts appear.

🤖 Authored with GitHub Copilot on behalf of Ross Wollman (@rwoll).

When Copilot managed settings loaded slowly, every pending lookup showed its own "Loading your organization's managed settings" toast, so users saw several identical toasts, mostly for background work. Report the wait only to the chat waiting to start its session, inline in its progress row, and show nothing for background lookups.

Add a per-endpoint response delay to the mock policy server to reproduce slow policy delivery.

🤖 Authored with GitHub Copilot on behalf of @rwoll.

Co-authored-by: Copilot <[email protected]>
Copilot AI balanced review requested due to automatic review settings October 20, 2026 17:15

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

Clearing managed-settings activity leaves the inline loading message visible after settings resolve.

1 open issue
What changed in this PR

Moves slow managed-settings feedback from global toasts into the waiting chat, following #342167.

Changes:

  • Adds per-caller activity reporting and routes launch waits to chat progress.
  • Updates resolver and launcher tests.
  • Adds configurable response delays to the mock policy server.
File Description
src/​vs/​platform/​agentHost/​test/​node/​copilotSessionLauncher.test.ts Checks launch activity reporting.
src/​vs/​platform/​agentHost/​test/​node/​copilotManagedSettings.test.ts Checks activity timing and cleanup.
src/​vs/​platform/​agentHost/​node/​copilot/​copilotSessionLauncher.ts Forwards the activity reporter.
src/​vs/​platform/​agentHost/​node/​copilot/​copilotManagedSettings.ts Replaces global progress with per-waiter activity.
src/​vs/​platform/​agentHost/​node/​copilot/​copilotAgentSession.ts Publishes launch waits as chat activity.
src/​vs/​platform/​agentHost/​node/​copilot/​copilotAgent.ts Removes global managed-settings progress forwarding.
scripts/​mock-policy-server/​server.ts Validates, persists, and applies response delays.
scripts/​mock-policy-server/​README.md Documents slow-response testing.
scripts/​mock-policy-server/​public/​style.css Styles delay hints and log indicators.
scripts/​mock-policy-server/​public/​index.html Adds the response-delay input.
scripts/​mock-policy-server/​public/​app.ts Saves delays and displays them in logs.

Review effort: Balanced

The client adapter only ever added or replaced its chat activity progress row, so when the host cleared the activity before any response content arrived (for example after slow organization settings finished loading), the stale "Loading your organization's managed settings" row stayed until other content took over. Remove the row when the activity ends so the generic working placeholder returns, using a new removal flag on id-based progress messages.

🤖 Authored with GitHub Copilot on behalf of @rwoll.

Co-authored-by: Copilot <[email protected]>

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

Removing progress rows can invalidate pending task positions, causing completion errors or overwriting later response content.

1 open issue
1 resolved since last review

Review effort: Balanced

this._responseParts.push(progress);
if (progress.remove) {
if (idx !== -1) {
this._responseParts.splice(idx, 1);
@rwoll
Ross Wollman (rwoll) merged commit 9b25398 into main Oct 20, 2026
50 checks passed
@rwoll
Ross Wollman (rwoll) deleted the agents/vscode-chat-message-delay-feature branch October 20, 2026 18:05
@vs-code-engineering vs-code-engineering Bot added this to the 1.144.0 milestone Oct 20, 2026
@rwoll Ross Wollman (rwoll) added bug Issue identified by VS Code Team member as probable bug chat labels Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Issue identified by VS Code Team member as probable bug chat

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants