fix: clean up MCP server display and add CONCAT merge strategy for mcp allowed/excluded lists#2219
Conversation
…CAT merge strategy for mcp allowed/excluded lists
📋 Review SummaryThis PR makes two well-executed improvements to the MCP (Model Context Protocol) configuration: removing a redundant 🔍 General Feedback
🎯 Specific Feedback🟡 High
🔵 Low
✅ Highlights
|
TLDR
This PR makes two improvements to the MCP (Model Context Protocol) configuration:
Remove redundant
scopefield fromMCPServerDisplayInfo: Thescopefield ('user' | 'workspace' | 'extension') duplicated the intent of the existingsourcefield ('user' | 'project' | 'extension'). All usages ofscopeare replaced withsource, simplifying the data model.Add
CONCATmerge strategy formcp.allowedandmcp.excluded: These array settings now useMergeStrategy.CONCATso that allowed/excluded MCP server lists from different settings scopes (system, user, workspace) are concatenated rather than replaced. This enables administrators to build cumulative allow/exclude lists across configuration levels.Dive Deeper
Scope field removal
scope: 'user' | 'workspace' | 'extension'from theMCPServerDisplayInfointerface intypes.tsMCPManagementDialog.tsxto derive scope fromserver.sourcedirectly instead of a separatescopefieldServerDetailStep.tsxto useserver.sourcefor display logicMerge strategy change
mergeStrategy: MergeStrategy.CONCATto bothmcp.allowedandmcp.excludedin the settings schemasettings.test.tsto reflect the concatenation behaviorReviewer Test Plan
npx vitest run packages/cli/src/config/settings.test.ts— all 87 tests should passTesting Matrix
Linked issues / bugs