Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Picker rejection handling, refresh account selection, and premature sync-guard release leave unresolved correctness issues.
Review effort: Balanced
Findings: 3
Open (3)
What changed in this PR
Improves Reattach/Retarget reliability across the VS Code extension and language server.
Changes:
- Refactors account/environment selection, rollback handling, and command outcomes.
- Adds remote-agent existence checks and awaited Refresh operations.
- Adds regression tests and updates notification handling.
| File | Description |
|---|---|
| src/vscode-extensions/microsoft-powerplatformlang-extension/client/src/types.ts | Adds remote-check protocol fields. |
| src/vscode-extensions/microsoft-powerplatformlang-extension/client/src/tests/host/reattachAgent.test.ts | Tests reattach flows and failure handling. |
| src/vscode-extensions/microsoft-powerplatformlang-extension/client/src/sync/workspaceSynchronizer.ts | Adds Pull error-notification suppression. |
| src/vscode-extensions/microsoft-powerplatformlang-extension/client/src/services/logger.ts | Categorizes reattach warnings. |
| src/vscode-extensions/microsoft-powerplatformlang-extension/client/src/constants.ts | Defines reattach warning telemetry. |
| src/vscode-extensions/microsoft-powerplatformlang-extension/client/src/commands/reattachAgent.ts | Refactors selection, refresh, rollback, and outcomes. |
| src/LanguageServers/PowerPlatformLS/UnitTests/PowerPlatformLS.UnitTests/Impl.PullAgent/Methods/ReattachAgentHandlerTests.cs | Tests non-mutating remote existence checks. |
| src/LanguageServers/PowerPlatformLS/Impl.PullAgent/ReattachAgentResponse.cs | Adds remote existence result. |
| src/LanguageServers/PowerPlatformLS/Impl.PullAgent/ReattachAgentRequest.cs | Adds remote-check request option. |
| src/LanguageServers/PowerPlatformLS/Impl.PullAgent/ReattachAgentHandler.cs | Checks whether the connected remote agent exists. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| workspaceUri: string, | ||
| accountInfo: AccountInfo | ||
| ): void => { | ||
| const connection = readConnectionFile(workspaceUri); |
| }); | ||
| } | ||
| ); | ||
| await logCommandOutcome(outcome); |
Comment on lines
+271
to
+272
| if (!requestSyncInfo.agentManagementEndpoint) { | ||
| await tryRepairAgentManagementEndpoint(requestSyncInfo, workspaceUri); |
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.


This PR fixes Reattach/Retarget failures caused by account switching, hidden environment pickers, concurrent sync operations, deleted remote agents, unawaited Pull operations, and incomplete rollback handling. It also prevents duplicate notifications and false success messages.