Repository navigation
chat: Show slow organization settings in chat instead of stacked toasts - #342937
Merged
Ross Wollman (rwoll) merged 2 commits intoOct 20, 2026
Merged
Conversation
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]>
Contributor
There was a problem hiding this comment.
🟡 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]>
Dmitriy Vasyura (dmitrivMS)
approved these changes
Oct 20, 2026
| this._responseParts.push(progress); | ||
| if (progress.remove) { | ||
| if (idx !== -1) { | ||
| this._responseParts.splice(idx, 1); |
roblourens
approved these changes
Oct 20, 2026
Ross Wollman (rwoll)
deleted the
agents/vscode-chat-message-delay-feature
branch
October 20, 2026 18:05
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.

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
How to test
npm run mock-policy-serverand route the client to it.8000for Managed Settings.🤖 Authored with GitHub Copilot on behalf of Ross Wollman (@rwoll).