Skip to content

fix(vscode): Use single source of truth for project file consistency checks (.vscode, local.settings.json, host.json) - #9399

Merged
andrew-eldridge merged 31 commits into
mainfrom
aeldridge/vscodeFilesRefresh
Jul 28, 2026
Merged

fix(vscode): Use single source of truth for project file consistency checks (.vscode, local.settings.json, host.json)#9399
andrew-eldridge merged 31 commits into
mainfrom
aeldridge/vscodeFilesRefresh

Conversation

@andrew-eldridge

@andrew-eldridge andrew-eldridge commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Commit Type

  • feature - New functionality
  • fix - Bug fix
  • refactor - Code restructuring without behavior change
  • perf - Performance improvement
  • docs - Documentation update
  • test - Test-related changes
  • chore - Maintenance/tooling

Risk Level

  • Low - Minor changes, limited scope
  • Medium - Moderate changes, some user impact
  • High - Major changes, significant user/system impact

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

  • Users: Fixes some edge case bugs in .vscode file generation depending on project type
  • Developers: Adds central source of truth for each .vscode file
  • System: N/A

Test Plan

  • Unit tests added/updated
  • E2E tests added/updated
  • Manual testing completed
  • Tested in:

Contributors

@andrew-eldridge

@andrew-eldridge andrew-eldridge added the VSCode Issues or PRs specific to VS Code extension label Jul 15, 2026
Copilot AI review requested due to automatic review settings July 15, 2026 03:55
@andrew-eldridge andrew-eldridge added the risk:medium Medium risk change with potential impact label Jul 15, 2026
@github-actions

github-actions Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

🤖 AI PR Validation Report

PR Review Results

Thank you for your submission! Here's detailed feedback on your PR title and body compliance:

PR Title

  • Current: fix(vscode): Use single source of truth for project file consistency checks (.vscode, local.settings.json, host.json)
  • Issue: None — valid fix(scope): prefix and clearly descriptive.
  • Recommendation: No change needed.

Commit Type

  • Exactly one box selected: fix - Bug fix.
  • Matches the title prefix and the nature of the change (bug fixes in .vscode file generation).

Risk Level

  • Declared Medium in the body and risk:medium label — these agree with each other and with the advised estimate. This change touches extension-distribution code (apps/vs-code-designer) and consolidates project-file generation logic, which is squarely Medium per the rubric (moderate changes, some user impact; no security/auth/breaking-API surface that would make it High).

What & Why

  • Current: Describes introducing a single source of truth for .vscode files and consolidating divergent implementations.
  • Issue: None — clear context on what changed and why.
  • Recommendation: No change needed.

Impact of Change

  • All three audiences addressed (Users, Developers, System=N/A).
  • Recommendation:
    • Users: Fixes edge-case bugs in .vscode generation by project type — good.
    • Developers: Central source of truth per .vscode file — good.
    • System: N/A is acceptable here.

Test Plan

  • Unit tests added/updated (confirmed extensively in the diff — generator-based tests, onboarding, upload/download app settings, etc.) plus manual testing. Passes CHECK TESTS.

⚠️ Contributors

  • @andrew-eldridge listed. Nudge only: if any PMs/designers contributed, consider crediting them too. Does not block.

⚠️ Screenshots/Videos

  • The diff is limited to apps/vs-code-designer extension/host logic and tests — no libs/designer-ui/src, libs/designer/src, or apps/vs-code-react visual UI components are touched. Screenshots are not required. Nudge only.

Summary Table

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 ⚠️ Credit any PM/designer if applicable
Screenshots/Videos ⚠️ Not required (no visual UI change)

All required checks pass — this PR is compliant with the team template and cleared to merge.


Powered by: Copilot CLI (claude-opus-4.8) | Last updated: Tue, 28 Jul 2026 20:55:46 GMT

@github-actions

github-actions Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

📊 Coverage Check

The following changed files need attention:

apps/vs-code-designer/src/app/commands/appSettings/downloadAppSettings.ts - 0% covered
apps/vs-code-designer/src/app/commands/initProjectForVSCode/initProjectForVSCode.ts - 0% covered
apps/vs-code-designer/src/app/commands/syncCloudSettings.ts - 0% covered
apps/vs-code-designer/src/app/commands/workflows/configureWebhookRedirectEndpoint/configureWebhookRedirectEndpoint.ts - 0% covered
apps/vs-code-designer/src/app/tree/LogicAppResourceTree.ts - 0% covered
apps/vs-code-designer/src/app/utils/appSettings/localSettings.ts - 0% covered
apps/vs-code-designer/src/app/utils/codeless/hybridLogicApp/hybridApp.ts - 0% covered

⚠️ apps/vs-code-designer/src/app/commands/parameterizeConnections.ts - 60% covered (needs improvement)
⚠️ apps/vs-code-designer/src/app/commands/workflows/connectionView/panels/connectionPanel.ts - 18% covered (needs improvement)
⚠️ apps/vs-code-designer/src/app/commands/workflows/designer-v2/panels/localDesignerV2Panel.ts - 46% covered (needs improvement)
⚠️ apps/vs-code-designer/src/app/commands/workflows/designer/panels/localDesignerPanel.ts - 67% covered (needs improvement)
⚠️ apps/vs-code-designer/src/app/utils/cloudToLocalUtils.ts - 9% covered (needs improvement)
⚠️ apps/vs-code-designer/src/app/utils/codeless/connection.ts - 1% covered (needs improvement)
⚠️ apps/vs-code-designer/src/app/utils/debug.ts - 7% covered (needs improvement)
⚠️ apps/vs-code-designer/src/app/utils/dotnet/dotnet.ts - 60% covered (needs improvement)
⚠️ apps/vs-code-designer/src/app/utils/funcCoreTools/funcHostTask.ts - 35% covered (needs improvement)
⚠️ apps/vs-code-designer/src/app/utils/vsCodeConfig/settings.ts - 47% covered (needs improvement)

Please add tests for the uncovered files before merging.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 existing tasks.json writers to use it.
  • Renames WorkflowProjectTypeProjectPackageType and 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.

Comment thread apps/vs-code-designer/src/app/utils/vsCodeConfig/tasks.ts Outdated
Comment thread apps/vs-code-designer/src/app/utils/project.ts
@andrew-eldridge andrew-eldridge changed the title fix(vscode): Use single source of truth for .vscode files generation fix(vscode): Use single source of truth for project file consistency checks (.vscode, local.settings.json, host.json) Jul 25, 2026
Comment thread apps/vs-code-designer/src/app/utils/codeless/validateProjectArtifacts.ts Outdated
@andrew-eldridge
andrew-eldridge merged commit f579f8d into main Jul 28, 2026
27 of 33 checks passed
@andrew-eldridge
andrew-eldridge deleted the aeldridge/vscodeFilesRefresh branch July 28, 2026 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-validated risk:medium Medium risk change with potential impact VSCode Issues or PRs specific to VS Code extension

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants