fix: broadcast MCP settings changes to all open tabs #8635
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.
This PR addresses Issue #8634 by ensuring MCP settings changes are broadcast to all open tabs.
Problem
When MCP tool permissions or server settings are changed from a second Roo tab, the changes were not persisting and appeared to be applied to the original tab instead.
Solution
Modified
McpHub.notifyWebviewOfServerChanges()
to useMcpServerManager.notifyProviders()
instead of notifying only the current provider. This ensures all open tabs receive updates when MCP settings change.Changes
src/services/mcp/McpHub.ts
to broadcast changes to all providerssrc/services/mcp/__tests__/McpHub.spec.ts
to mock McpServerManagerTesting
Note
This fix addresses the notification aspect of the issue. I have posted questions to the issue for clarification on whether additional changes are needed for:
Fixes #8634
Important
Broadcast MCP settings changes to all open tabs using
McpServerManager.notifyProviders()
inMcpHub
.McpHub.notifyWebviewOfServerChanges()
now usesMcpServerManager.notifyProviders()
to broadcast MCP settings changes to all open tabs.McpHub.spec.ts
to mockMcpServerManager
and verify broadcasting behavior.This description was created by
for afc8e07. You can customize this summary. It will automatically update as commits are pushed.