Handle Connection Management and IntelliSense#304
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds end-to-end “Connection Management” support to the VS Code extension and LSP, enabling users to view/declare/bind/create connection references and to improve authoring-time feedback via IntelliSense and diagnostics, addressing issue #303.
Changes:
- Adds a Connections Manager UX (command + webview) and wiring across context menus / quick fixes.
- Introduces new LSP endpoints + Sync-layer APIs for listing connections/connectors, declaring/binding/removing references, and enabling/disabling workflows based on binding state.
- Adds IntelliSense + validation rules for
connectionReference:values and workflow “draft/not enabled” validation driven by a local connections cache.
Reviewed changes
Copilot reviewed 92 out of 92 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/vscode-extensions/microsoft-powerplatformlang-extension/package.json | Adds “Manage Connections” command + context/menu entries. |
| src/vscode-extensions/microsoft-powerplatformlang-extension/client/src/types.ts | Adds connection/workflow view models + request/response types for new LSP methods. |
| src/vscode-extensions/microsoft-powerplatformlang-extension/client/src/sync/workspaceSynchronizer.ts | Updates push flow to rely on server-side connection provisioning + optional workflow-issue suppression. |
| src/vscode-extensions/microsoft-powerplatformlang-extension/client/src/sync/workspaceScm.ts | Adjusts new-workspace push call signature. |
| src/vscode-extensions/microsoft-powerplatformlang-extension/client/src/knowledgeFiles/uploadKnowledgeFiles.ts | Delays showing progress notification to avoid UI noise for fast uploads. |
| src/vscode-extensions/microsoft-powerplatformlang-extension/client/src/extension.ts | Registers new connection-management commands and quick fixes. |
| src/vscode-extensions/microsoft-powerplatformlang-extension/client/src/constants.ts | Adds LSP method constants for connection/workflow management endpoints. |
| src/vscode-extensions/microsoft-powerplatformlang-extension/client/src/connections/connectorReadiness.ts | Polls connector catalog to wait for custom connector availability. |
| src/vscode-extensions/microsoft-powerplatformlang-extension/client/src/connections/connectorPicker.ts | QuickPick UI for selecting a connector from the catalog. |
| src/vscode-extensions/microsoft-powerplatformlang-extension/client/src/connections/connectionRepair.ts | Removes legacy client-side connection “repair/create” flow. |
| src/vscode-extensions/microsoft-powerplatformlang-extension/client/src/connections/connectionExistence.ts | Removes legacy direct connections-API probing utilities. |
| src/vscode-extensions/microsoft-powerplatformlang-extension/client/src/connections/connectionDiagnostics.ts | Adds quick fixes for connection-reference diagnostics. |
| src/vscode-extensions/microsoft-powerplatformlang-extension/client/src/connections/connectionCreation.ts | Adds helper to normalize created connection IDs; minor refactors. |
| src/vscode-extensions/microsoft-powerplatformlang-extension/client/src/connections/connectionCatalog.ts | Client wrappers for new LSP APIs (list/bind/declare/remove/connectors/workflows). |
| src/vscode-extensions/microsoft-powerplatformlang-extension/client/src/connections/addConnectionReferenceCommand.ts | Quick-fix command to create/declare/bind a connection reference and patch the document. |
| src/vscode-extensions/microsoft-powerplatformlang-extension/client/src/commands/syncWorkspace.ts | Removes pre-push connection preparation gate; routes users to connection manager. |
| src/vscode-extensions/microsoft-powerplatformlang-extension/client/src/commands/reattachAgent.ts | Reattach now provisions connections server-side and prompts connection manager as needed. |
| src/vscode-extensions/microsoft-powerplatformlang-extension/client/src/commands/manageConnections.ts | Adds manage-connections command and a “declare connection reference” command. |
| src/LanguageServers/PowerPlatformLS/UnitTests/PowerPlatformLS.UnitTests/Impl.PullAgent/Methods/SyncPushHandlerTests.cs | Updates workflow upsert signature to include activation mode. |
| src/LanguageServers/PowerPlatformLS/UnitTests/PowerPlatformLS.UnitTests/Impl.PullAgent/Methods/PreparePushHandlerTests.cs | Removes tests for deleted prepare-push handler. |
| src/LanguageServers/PowerPlatformLS/UnitTests/PowerPlatformLS.UnitTests/Impl.PullAgent/Methods/LspExceptionHandlerTests.cs | Adds tests for standardized exception→status mapping. |
| src/LanguageServers/PowerPlatformLS/UnitTests/PowerPlatformLS.UnitTests/Impl.PullAgent/Methods/ConnectionHelperTests.cs | Removes binding tests and updates request model usage. |
| src/LanguageServers/PowerPlatformLS/UnitTests/PowerPlatformLS.UnitTests/Impl.PullAgent/Methods/ApplyConnectionBindingsHandlerTests.cs | Adds tests for binding handler + diagnostics republish behavior. |
| src/LanguageServers/PowerPlatformLS/UnitTests/PowerPlatformLS.UnitTests/Impl.Language.CopilotStudio/ConnectionReferenceValidationRuleTests.cs | Adds tests for new connection reference validation rule. |
| src/LanguageServers/PowerPlatformLS/UnitTests/PowerPlatformLS.UnitTests/Impl.Language.CopilotStudio/ConnectionReferenceCompletionRuleTests.cs | Adds tests for new completion behavior + declare command emission. |
| src/LanguageServers/PowerPlatformLS/UnitTests/PowerPlatformLS.UnitTests/Impl.Language.CopilotStudio/CompletionIntegrationTests.cs | Updates DI expectations to select the intended completion rule implementation. |
| src/LanguageServers/PowerPlatformLS/Impl.PullAgent/SyncPushHandler.cs | Moves connection provisioning to sync helper and changes workflow activation behavior on push. |
| src/LanguageServers/PowerPlatformLS/Impl.PullAgent/SyncPullHandler.cs | Aligns handler signature with updated sync base class (no connectionBindings). |
| src/LanguageServers/PowerPlatformLS/Impl.PullAgent/SyncHandler.cs | Removes ConnectionBindings from request pipeline and execution signature. |
| src/LanguageServers/PowerPlatformLS/Impl.PullAgent/SyncAgentRequest.cs | Removes ConnectionBindings from request contract. |
| src/LanguageServers/PowerPlatformLS/Impl.PullAgent/Sync/HttpClientNames.cs | Adds ConnectionCatalog HttpClient name. |
| src/LanguageServers/PowerPlatformLS/Impl.PullAgent/SetWorkflowStatesResponse.cs | Adds response type for workflow state changes. |
| src/LanguageServers/PowerPlatformLS/Impl.PullAgent/SetWorkflowStatesRequest.cs | Adds request type for workflow state changes. |
| src/LanguageServers/PowerPlatformLS/Impl.PullAgent/SetWorkflowStatesHandler.cs | Implements workflow enable/disable endpoint. |
| src/LanguageServers/PowerPlatformLS/Impl.PullAgent/RemoveConnectionReferenceResponse.cs | Adds response type for connection reference removal. |
| src/LanguageServers/PowerPlatformLS/Impl.PullAgent/RemoveConnectionReferenceRequest.cs | Adds request type for connection reference removal. |
| src/LanguageServers/PowerPlatformLS/Impl.PullAgent/RemoveConnectionReferenceHandler.cs | Implements remove-connection-reference endpoint (replacing prior prepare-push handler file contents). |
| src/LanguageServers/PowerPlatformLS/Impl.PullAgent/ReattachAgentRequest.cs | Simplifies reattach request to only workspace + standard dataverse payload. |
| src/LanguageServers/PowerPlatformLS/Impl.PullAgent/ReattachAgentHandler.cs | Reattach now creates agent if needed, provisions connections, and activates workflows conditionally. |
| src/LanguageServers/PowerPlatformLS/Impl.PullAgent/PrepareReattachResponse.cs | Deletes obsolete prepare-reattach response model. |
| src/LanguageServers/PowerPlatformLS/Impl.PullAgent/PrepareReattachRequest.cs | Deletes obsolete prepare-reattach request model. |
| src/LanguageServers/PowerPlatformLS/Impl.PullAgent/PrepareReattachHandler.cs | Deletes obsolete prepare-reattach handler. |
| src/LanguageServers/PowerPlatformLS/Impl.PullAgent/PreparePushRequest.cs | Deletes obsolete prepare-push request model. |
| src/LanguageServers/PowerPlatformLS/Impl.PullAgent/LspExceptionHandler.cs | Removes binding-specific exception case to reflect new flow. |
| src/LanguageServers/PowerPlatformLS/Impl.PullAgent/ListWorkflowStatusResponse.cs | Adds response type for listing workflow status. |
| src/LanguageServers/PowerPlatformLS/Impl.PullAgent/ListWorkflowStatusRequest.cs | Adds request type for listing workflow status. |
| src/LanguageServers/PowerPlatformLS/Impl.PullAgent/ListWorkflowStatusHandler.cs | Implements workflow status endpoint leveraging local cache when possible. |
| src/LanguageServers/PowerPlatformLS/Impl.PullAgent/ListConnectorsResponse.cs | Renames response model to match file/purpose (connectors list). |
| src/LanguageServers/PowerPlatformLS/Impl.PullAgent/ListConnectorsRequest.cs | Adds request type for listing connectors. |
| src/LanguageServers/PowerPlatformLS/Impl.PullAgent/ListConnectorsHandler.cs | Implements connectors list endpoint (Power Apps catalog). |
| src/LanguageServers/PowerPlatformLS/Impl.PullAgent/ListAgentConnectionsResponse.cs | Adds response type for listing agent connections. |
| src/LanguageServers/PowerPlatformLS/Impl.PullAgent/ListAgentConnectionsRequest.cs | Adds request type for listing agent connections. |
| src/LanguageServers/PowerPlatformLS/Impl.PullAgent/ListAgentConnectionsHandler.cs | Implements agent connection views endpoint + cache writing. |
| src/LanguageServers/PowerPlatformLS/Impl.PullAgent/DependencyInjection/PullAgentLspModule.cs | Wires new handlers + registers ConnectionCatalog client. |
| src/LanguageServers/PowerPlatformLS/Impl.PullAgent/DeclareConnectionReferencesResponse.cs | Adds response model for declare references. |
| src/LanguageServers/PowerPlatformLS/Impl.PullAgent/DeclareConnectionReferencesRequest.cs | Adds request model for declare references. |
| src/LanguageServers/PowerPlatformLS/Impl.PullAgent/DeclareConnectionReferencesHandler.cs | Implements declare-connection-references endpoint + cache writing. |
| src/LanguageServers/PowerPlatformLS/Impl.PullAgent/CreateConnectionReferenceResponse.cs | Adds response model for create reference. |
| src/LanguageServers/PowerPlatformLS/Impl.PullAgent/CreateConnectionReferenceRequest.cs | Adds request model for create reference. |
| src/LanguageServers/PowerPlatformLS/Impl.PullAgent/CreateConnectionReferenceHandler.cs | Implements create-connection-reference endpoint + cache writing. |
| src/LanguageServers/PowerPlatformLS/Impl.PullAgent/ConnectionHelper.cs | Refactors helper to provisioning + catalog-context building. |
| src/LanguageServers/PowerPlatformLS/Impl.PullAgent/ApplyConnectionBindingsResponse.cs | Adds response model for binding application. |
| src/LanguageServers/PowerPlatformLS/Impl.PullAgent/ApplyConnectionBindingsRequest.cs | Adds request model for binding application. |
| src/LanguageServers/PowerPlatformLS/Impl.PullAgent/ApplyConnectionBindingsHandler.cs | Implements bind endpoint and triggers diagnostics republish. |
| src/LanguageServers/PowerPlatformLS/Impl.Language.Yaml/Validation/WorkflowStateValidationRule.cs | Adds YAML validation warning for draft workflows based on local cache. |
| src/LanguageServers/PowerPlatformLS/Impl.Language.Yaml/DependencyInjection/YamlLspModule.cs | Registers file accessor + adds new workflow-state validation rule. |
| src/LanguageServers/PowerPlatformLS/Impl.Language.CopilotStudio/Validation/ConnectionReferenceValidationRule.cs | Adds validation for unknown/undeclared/unbound connectionReference: values. |
| src/LanguageServers/PowerPlatformLS/Impl.Language.CopilotStudio/DependencyInjection/McsLspModule.cs | Registers file accessor + new validation + new completion rule. |
| src/LanguageServers/PowerPlatformLS/Impl.Language.CopilotStudio/Connections/ConnectionsCacheReader.cs | Reads .mcs/.connections-cache.json for intellisense/validation. |
| src/LanguageServers/PowerPlatformLS/Impl.Language.CopilotStudio/Completion/ConnectionReferenceCompletionRule.cs | Adds completion items for known connection references + optional declare command. |
| src/CopilotStudio.Sync/Models.cs | Adds connection/workflow management models + workflow activation mode concept. |
| src/CopilotStudio.Sync/IWorkspaceSynchronizer.cs | Adds APIs for connection catalog integration, caching, binding, and workflow activation. |
| src/CopilotStudio.Sync/Dataverse/SyncDataverseClient.cs | Adds workflow state setter, connection-reference id return, and binding optimization. |
| src/CopilotStudio.Sync/Dataverse/ISyncDataverseClient.cs | Updates connection reference APIs and adds workflow state API. |
| src/CopilotStudio.Sync/Dataverse/IConnectionCatalogClient.cs | Introduces abstraction for Power Apps connection/connector catalog. |
| src/CopilotStudio.Sync.UnitTests/PullConnectionReferencePruneTests.cs | Adds tests for defensive pruning behavior when workflows disappear or download fails. |
| src/CopilotStudio.Sync.UnitTests/PowerAppsClientTests.cs | Adds tests for catalog paging and timeout/cancellation behavior. |
| src/CopilotStudio.Sync.UnitTests/KnowledgeFileUnifyTests.cs | Adds tests to ensure knowledge uploads are skipped/retried based on content changes. |
| src/CopilotStudio.Sync.UnitTests/CustomConnectorPushTests.cs | Adds tests to skip/retry custom connector upserts based on normalized content changes. |
| src/CopilotStudio.Sync.UnitTests/ConnectionReferenceUsageScannerTests.cs | Adds tests for scanning usages across actions/topics/workflows/connectors. |
| src/CopilotStudio.Sync.UnitTests/CliAgentNodeS4HIntegrationTests.cs | Updates mocked EnsureConnectionReferenceExistsAsync return type. |
| src/CopilotStudio.Sync.UnitTests/AiPromptPushTests.cs | Adds tests to skip/retry AI prompt publishing based on content changes. |
| src/CopilotStudio.McsCore/CopilotStudio.McsCore.csproj | Adds InternalsVisibleTo for Yaml language implementation to access file accessor factory. |
# Conflicts: # src/CopilotStudio.Sync/WorkspaceSynchronizer.cs
SteveJSteiner-msft
approved these changes
Jun 22, 2026
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.
Handle Connection Management (allow user view, bind, create new connection - based on list of standard/custom connectors, allow group of connection binding).
Add connection IntelliSense (completion + dialogistic).
Fix: #303

Here are few pictures of this support: