fix(vscode): preserve platform so .NET Framework shows in custom-code dropdown#9367
Merged
lambrianmsft merged 1 commit intoJul 3, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes a VS Code webview wizard regression where the Windows-only .NET Framework (net472) option disappeared from the custom-code .NET Version dropdown because createWorkspace.platform was being reset to null (or never captured in the createProject flow).
Changes:
- Preserve host-environment fields (
platform,separator) acrossresetState()so mount-time resets don’t wipe Windows platform detection. - Capture
platform/separatorininitializeProject()for the createProject (createLogicApp) flow. - Add/strengthen reducer + UI tests to lock in the per-platform framework option behavior.
Reviewed changes
Copilot reviewed 9 out of 19 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| libs/vscode-extension/src/graphify-out/GRAPH_REPORT.md | Regenerated Graphify report metadata/content (freshness, nodes/communities). |
| libs/logic-apps-shared/src/graphify-out/GRAPH_REPORT.md | Regenerated Graphify report metadata/content (freshness, nodes/communities). |
| libs/data-mapper-v2/src/graphify-out/GRAPH_REPORT.md | Regenerated Graphify report metadata/content (freshness, nodes/communities). |
| libs/chatbot/src/graphify-out/graph.json | Regenerated Graphify graph JSON output. |
| libs/chatbot/src/graphify-out/GRAPH_REPORT.md | Regenerated Graphify report metadata/content (freshness, nodes/communities). |
| libs/a2a-core/src/graphify-out/GRAPH_REPORT.md | Regenerated Graphify report metadata/content (freshness, nodes/communities). |
| apps/vs-code-react/src/state/createWorkspaceSlice.ts | Preserve platform/separator on resets; capture them in initializeProject(). |
| apps/vs-code-react/src/state/test/createWorkspaceSlice.test.ts | New reducer tests validating preservation + init/reset sequences for both flows. |
| apps/vs-code-react/src/app/createWorkspace/steps/test/dotNetFrameworkStep.test.tsx | Strengthened dropdown option assertions for Windows vs non-Windows (incl. null platform). |
… dropdown The custom-code ".NET Version" dropdown (DotNetFrameworkStep) hid the Windows-only .NET Framework (net472) option because redux createWorkspace.platform ended up null in both the createWorkspace and createProject webview wizards. Two bugs, both in createWorkspaceSlice.ts: - createWorkspace flow: initializeWorkspace set platform, but the flow wrappers' mount-time resetState(undefined) wiped it back to null. Fix: resetState now always preserves the host-environment values platform and separator, regardless of preserveLogicAppData. - createProject flow: the webview dispatches only initializeProject, which never read platform/separator from its payload, so platform stayed null. Fix: initializeProject now also captures platform and separator (the host already sends them in initialize_frame). Adds reducer-level tests (createWorkspaceSlice.test.ts) locking the preservation behavior and positive Windows sequences for both flows, and strengthens dotNetFrameworkStep.test.tsx to assert the exact per-platform option set (win32 -> Framework/8/10; others -> 8/10). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
823fe71 to
77b7710
Compare
Contributor
🤖 AI PR Validation ReportPR Review ResultsThank you for your submission! Here's detailed feedback on your PR title and body compliance:✅ PR Title
✅ Commit Type
✅ Risk Level
✅ What & Why
✅ Impact of Change
✅ Test Plan
✅ Contributors
|
| Section | Status | Recommendation |
|---|---|---|
| Title | ✅ | None |
| Commit Type | ✅ | None |
| Risk Level | ✅ | None |
| What & Why | ✅ | None |
| Impact of Change | ✅ | None |
| Test Plan | ✅ | None |
| Contributors | ✅ | None |
| Screenshots/Videos | Optional: add a screenshot/video for the UI dropdown change |
This PR passes review for title/body compliance. The advised risk level is low, which matches the submitter’s assessment.
Last updated: Thu, 02 Jul 2026 23:05:44 GMT
rllyy97
approved these changes
Jul 3, 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.
Commit Type
Risk Level
What & Why
TL;DR: On Windows, the custom-code .NET Version dropdown stopped offering the Windows-only .NET Framework (
net472) option in both the createWorkspace and createProject VS Code webview wizards. Only .NET 8 and .NET 10 showed.The option is gated on redux
createWorkspace.platform === 'win32', butplatformended upnull, so the option was hidden. The extension host was already correct — it always sendsplatform: os.platform()andseparatorin theinitialize_framepayload for every create flow. Two reducer bugs dropped that value:initializeWorkspacesetplatform, but the flow wrappers' mount-timeresetState(undefined)wiped it back tonull.initializeProject, which never readplatform/separatorfrom its payload, soplatformstayednull.Fix (both in
createWorkspaceSlice.ts):resetStatenow always preserves the host-environment valuesplatformandseparator(regardless ofpreserveLogicAppData), via a single-mergeObject.assign(state, initialState, preserved).initializeProjectnow also capturesplatformandseparatorfrom its payload.No changes to
webviewCommunication.tsx, the flow wrappers, or the host handler — the createProject and createWorkspace flows are kept separate.Impact of Change
resetStateno longer wipes host-environment fields (platform,separator);initializeProjectnow reads them from its payload. Redux reducer contract clarified and locked by new tests.Test Plan
New
state/__test__/createWorkspaceSlice.test.tslocks the preservation behavior and positive Windows sequences for both flows. StrengtheneddotNetFrameworkStep.test.tsxasserts the exact per-platform option set (win32-> Framework/8/10; darwin/linux/null -> 8/10). All tests pass locally; biome clean.Contributors
Screenshots/Videos
The only user-visible change is the .NET Framework entry reappearing in the .NET Version dropdown on Windows; behavior is covered by the per-platform option-set unit assertions in
dotNetFrameworkStep.test.tsx.