Repository navigation
Fix deployment plan selection for the active session - #1999
Open
Nathan (nturinski) wants to merge 4 commits into
Open
Nathan (nturinski) wants to merge 4 commits into
Nathan (nturinski) wants to merge 4 commits into
Conversation
Resolve the active session before timestamp recovery and prevent inactive plans or delayed opens from replacing the selected plan. Preserve artifact-scoped approvals and document recovery behavior. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved watcher gaps and refresh races can leave stale plans available for approval or incorrectly close a newly opened valid plan view.
4 open issues
What changed in this PR
Addresses #1894 by making deployment-plan selection follow the active App Onboard session rather than modification time, with recovery when the session pointer is unavailable or stale.
Changes:
- Adds a shared resolver with session-path validation, verified root fallback, and deterministic recovery.
- Filters plan events and guards delayed opens, closing obsolete plans while the selected session is preparing.
- Adds resolver/view regression tests, user and security documentation, and a changelog entry.
Screenshot follow-up: Refresh 10-deployment-plan-view.png to illustrate active-session behavior; layout and controls are unchanged. No screenshot placeholders were added or removed.
| File | Description |
|---|---|
test/copilotOnRails/findAppOnboardArtifact.test.ts |
Tests session selection, recovery, validation, and multiple roots. |
test/copilotOnRails/deploymentPlanSessionSelection.test.ts |
Tests watcher behavior, delayed opens, and approval preservation. |
src/webviews/copilotOnRails/extension/utils/singletonViewHost.ts |
Adds explicit panel closure. |
src/webviews/copilotOnRails/extension/openDeploymentPlanView.ts |
Integrates session-aware selection and view refresh handling. |
src/tree/project/findAppOnboardArtifact.ts |
Adds the shared active-session artifact resolver. |
docs/copilot-create-project.md |
Documents selection, recovery, and pending-session behavior. |
docs/copilot-create-project-security.md |
Documents session-path and fallback-identity validation. |
CHANGELOG.md |
Adds an issue-linked Unreleased fix entry. |
Review effort: Balanced
…ithub.com/microsoft/vscode-azureresourcegroups into nturinski-pr-review-fixes
Watch every workspace root, reject stale selection results, reload reused root plans, and read completed artifacts after region discovery. Add regressions and update the deployment-plan guide. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.


Summary
Fix #1894
prepare-plan.jsonfrom the active-session pointer, with a session-identity-verified root fallback. Use deterministic mtime recovery only for absent, invalid, or stale pointers; do not substitute another plan while an active session is pending.This PR is based directly on
mainand is independent of documentation-only PR #1995. No agent instruction changes are included. Intended release: 0.13.3.Validation
npm run build— passed.npx --no-install eslint --max-warnings 0 src\tree\project\findAppOnboardArtifact.ts src\webviews\copilotOnRails\extension\openDeploymentPlanView.ts src\webviews\copilotOnRails\extension\utils\singletonViewHost.ts test\copilotOnRails\findAppOnboardArtifact.test.ts test\copilotOnRails\deploymentPlanSessionSelection.test.ts— passed.npm test -- --run test\copilotOnRails\findAppOnboardArtifact.test.ts test\copilotOnRails\deploymentPlanSessionSelection.test.ts test\copilotOnRails\parsePreparePlanJson.test.ts test\copilotOnRails\deployPrerequisites.test.ts --reporter dot— 71 passing in VS Code 1.144.0 on Windows.git diff --checkand staged whitespace/line-ending checks — passed; changed files use LF.No deployment approval or Azure resource operations were performed. macOS/Linux and signed-in deployments are not claimed verified. Screenshots remain local and are not published in this PR. No screen layout or controls changed; the existing deployment-plan screenshot layout remains applicable.