fix(vscode): Use single source of truth for .vscode files generation#9399
fix(vscode): Use single source of truth for .vscode files generation#9399andrew-eldridge wants to merge 6 commits into
Conversation
🤖 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 | ✅ | No change needed |
| Commit Type | ✅ | No change needed |
| Risk Level | ✅ | Medium is correct |
| What & Why | ✅ | No change needed |
| Impact of Change | ✅ | No change needed |
| Test Plan | ✅ | Unit tests present |
| Contributors | ✅ | Credited |
| Screenshots/Videos | Optional — non-visual change |
All required checks pass. This PR is compliant and cleared to merge.
Powered by: Copilot CLI (claude-opus-4.8) | Last updated: Thu, 16 Jul 2026 04:17:36 GMT
📊 Coverage CheckThe following changed files need attention: ❌
Please add tests for the uncovered files before merging. |
There was a problem hiding this comment.
Pull request overview
This PR consolidates VS Code .vscode configuration generation (especially tasks.json) into a single generator implementation, and updates project-type modeling/detection so creation and regeneration paths share the same source of truth.
Changes:
- Introduces a canonical
generateTasksJson()implementation and migrates existingtasks.jsonwriters to use it. - Renames
WorkflowProjectType→ProjectPackageTypeand updates wizard context fields accordingly. - Adds/updates project detection helpers and adjusts unit/integration tests + VS Code mocks to support the new flows.
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| libs/vscode-extension/src/lib/models/workflow.ts | Renames workflow packaging model constant/type to ProjectPackageType. |
| libs/vscode-extension/src/lib/models/project.ts | Updates wizard context field to projectPackageType. |
| apps/vs-code-designer/test-setup.ts | Improves VS Code configuration mocking for tests. |
| apps/vs-code-designer/src/app/utils/vsCodeConfig/tasks.ts | Switches tasks regeneration to use the shared generator + adds best-effort target framework lookup. |
| apps/vs-code-designer/src/app/utils/vsCodeConfig/generators/types.ts | Adds types for generator inputs/outputs. |
| apps/vs-code-designer/src/app/utils/vsCodeConfig/generators/tasksGenerator.ts | Adds the canonical tasks.json generator. |
| apps/vs-code-designer/src/app/utils/vsCodeConfig/generators/index.ts | Exposes generator APIs. |
| apps/vs-code-designer/src/app/utils/vsCodeConfig/generators/test/tasksGenerator.test.ts | Adds unit tests for generateTasksJson(). |
| apps/vs-code-designer/src/app/utils/project.ts | Adds shared detection for ProjectType and ProjectPackageType. |
| apps/vs-code-designer/src/app/utils/codeless/validateProjectArtifacts.ts | Uses shared project-type detection during regeneration. |
| apps/vs-code-designer/src/app/utils/codeless/test/validateProjectArtifacts.test.ts | Updates tests to match new detection behavior. |
| apps/vs-code-designer/src/app/commands/initProjectForVSCode/initScriptProjectStep.ts | Removes older script-specific .vscode task generation path. |
| apps/vs-code-designer/src/app/commands/initProjectForVSCode/initProjectStepBase.ts | Updates task input merge logic to use the new package-type field. |
| apps/vs-code-designer/src/app/commands/initProjectForVSCode/initProjectStep.ts | Uses generateTasksJson() for bundle projects. |
| apps/vs-code-designer/src/app/commands/initProjectForVSCode/initProjectLanguageStep.ts | Sets context.projectPackageType based on language. |
| apps/vs-code-designer/src/app/commands/initProjectForVSCode/initDotnetProjectStep.ts | Uses generateTasksJson() for Nuget projects. |
| apps/vs-code-designer/src/app/commands/enableDevContainer/test/enableDevContainerIntegration.test.ts | Adjusts assertions + VS Code config mocks for new generated tasks structure. |
| apps/vs-code-designer/src/app/commands/createProject/createCustomCodeProjectSteps/initCustomCodeScriptProjectStep.ts | Removes older custom-code script-specific task generation path. |
| apps/vs-code-designer/src/app/commands/createProject/createCustomCodeProjectSteps/initCustomCodeProjectStepBase.ts | Uses generateTasksJson() for custom code project tasks overwrite. |
| apps/vs-code-designer/src/app/commands/createProject/createCustomCodeProjectSteps/initCustomCodeProjectStep.ts | Uses generateTasksJson() for custom code tasks. |
| apps/vs-code-designer/src/app/commands/createNewCodeProject/CodeProjectBase/CreateLogicAppVSCodeContents.ts | Writes tasks.json via generator instead of templates. |
| apps/vs-code-designer/src/app/commands/createNewCodeProject/CodeProjectBase/test/CreateLogicAppWorkspaceIntegration.test.ts | Mocks binaries detection to avoid VS Code API coupling in tests. |
| apps/vs-code-designer/src/app/commands/createNewCodeProject/CodeProjectBase/test/CreateLogicAppVSCodeContents.test.ts | Updates tests to validate generator-written tasks.json. |
…, extensions.json), simplify InitProject* classes and CreateLogicAppVSCodeContent
Commit Type
Risk Level
What & Why
Introduces new single source of truth for .vscode files (tasks.json, launch.json, settings.json, extensions.json). Previously there were multiple implementations of .vscode file generation and re-generation which mostly had the same behavior with some inconsistencies between implementations. Consolidating to simplify the code and prevent these from diverging again.
Impact of Change
Test Plan
Contributors
@andrew-eldridge