Skip to content

refactor(vscode): Multi-project workspace folder support, consistent project resolution across commands, workspace util cleanup - #9531

Open
Andrew Eldridge (andrew-eldridge) wants to merge 27 commits into
mainfrom
aeldridge/vscode-workspace-util-cleanup
Open

Andrew Eldridge (andrew-eldridge) wants to merge 27 commits into
mainfrom
aeldridge/vscode-workspace-util-cleanup

Conversation

@andrew-eldridge

@andrew-eldridge Andrew Eldridge (andrew-eldridge) commented Aug 12, 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

  • Centralized project discovery: Removes  verifyIsProject.ts  and consolidates project-root discovery, parent resolution, selection, URI reconstruction, and workspace lookup in  workspace.ts .
  • Separated project detection: Adds dedicated codeless and codeful detectors. Codeless projects are identified through valid  workflow.json  schemas; codeful projects support both  net8  and  net8.0 .
  • Multi-project handling: Discovers all Logic App projects across workspace folders and immediate child directories. Commands now prompt for a project when context does not identify one.
  • Project-scoped commands: Explorer commands such as Deploy, Create Workflow, Generate Deployment Scripts, Switch Debug Mode, SQL storage, and .NET conversion are restricted to discovered Logic App project roots.
  • Nested-project support: Panels, workflow commands, consistency checks, managed identity, Azure connectors, unit-test generation, connection handling, and runtime startup resolve the actual project containing the selected workflow/file rather than assuming the VS Code workspace folder is the project.
  • Deployment restructuring: Separates the selected project root from the effective deployment payload. Metadata, app settings, temporary deployment content, hybrid SMB handling, and codeful publishing use explicit project paths.
  • Remote URI preservation: Adds  resolveUri()  so deployment paths retain Remote SSH, WSL, container, Codespaces, or other workspace URI schemes instead of always becoming  file:  URIs.
  • Build/debug changes: Passes project paths through Functions port resolution, custom-code building, codeful publishing, and debugging. Task matching remains workspace-scope based.
  • Create Workflow changes: Sends all available projects and their existing workflow names to the webview, supports project selection, and prevents duplicate workflow names.
  • Activation/context changes: Discovers projects once during activation, updates project/menu context keys, runs consistency work for each project, and detects nested codeful projects before starting the language server.
  • Configuration cleanup: Removes  azureLogicAppsStandard.projectSubpath  and the user-facing Initialize project for use with VS Code command. Internal initialization remains available to deployment and conversion flows.
  • Workspace creation: Extension-created projects remain top-level workspace-folder entries; manually nested projects are supported by discovery but not produced by the project-creation UI.
  • Utility cleanup: Moves  FileManagement  from deployment-script helpers into the general utility layer.
  • Test cleanup: Replaces old project-resolution tests, adds focused deployment/menu/project-selection coverage, and removes  projectOutsideWorkspace.test.ts , which did not exercise production behavior

Impact of Change

  • Users: Expands support for nested project structures (i.e. logic app project is not a workspace folder), improves error handling
  • Developers: Simplifies the get logic apps, logic app selection, project type (codeless/codeful), and other utils. Abstracts away workspace details (e.g. searching individual workspace folders) at usages
  • System: N/A

Test Plan

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

Contributors

Andrew Eldridge (@andrew-eldridge)

@github-actions

github-actions Bot commented Aug 12, 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/createProject/createProjectSteps/existingWorkspaceStep.ts - 0% covered
❌ apps/vs-code-designer/src/app/commands/dataMapper/dataMapper.ts - 0% covered
❌ apps/vs-code-designer/src/app/commands/initProjectForVSCode/initProjectForVSCode.ts - 0% covered
❌ apps/vs-code-designer/src/app/commands/runProjectConsistencyCheck.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/commands/workflows/unitTest/createUnitTestFromRun.ts - 0% covered
❌ apps/vs-code-designer/src/app/tree/AzureAccountTreeItemWithProjects.ts - 0% covered
❌ apps/vs-code-designer/src/app/utils/codeless/hybridLogicApp/hybridApp.ts - 0% covered

⚠️ apps/vs-code-designer/src/app/commands/debugLogicApp.ts - 75% covered (needs improvement)
⚠️ apps/vs-code-designer/src/app/commands/ensureWorkspace.ts - 79% covered (needs improvement)
⚠️ apps/vs-code-designer/src/app/commands/generateDeploymentScripts/generateDeploymentScriptsSteps/adoDeploymentScriptsSteps/GenerateADODeploymentScriptsStep.ts - 17% covered (needs improvement)
⚠️ apps/vs-code-designer/src/app/commands/parameterizeConnections.ts - 58% covered (needs improvement)
⚠️ apps/vs-code-designer/src/app/commands/registerCommands.ts - 76% covered (needs improvement)
⚠️ apps/vs-code-designer/src/app/commands/workflows/connectionView/panels/connectionPanel.ts - 22% 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 - 69% covered (needs improvement)
⚠️ apps/vs-code-designer/src/app/commands/workflows/switchToDotnetProject.ts - 69% covered (needs improvement)
⚠️ apps/vs-code-designer/src/app/utils/bundleFeed.ts - 56% covered (needs improvement)
⚠️ apps/vs-code-designer/src/app/utils/cloudToLocalUtils.ts - 9% covered (needs improvement)
⚠️ apps/vs-code-designer/src/app/utils/codeful.ts - 69% covered (needs improvement)
⚠️ apps/vs-code-designer/src/app/utils/codeless/connection.ts - 8% covered (needs improvement)
⚠️ apps/vs-code-designer/src/app/utils/customCodeUtils.ts - 76% covered (needs improvement)
⚠️ apps/vs-code-designer/src/app/utils/dotnet/dotnet.ts - 61% covered (needs improvement)
⚠️ apps/vs-code-designer/src/app/utils/funcCoreTools/funcHostTask.ts - 21% covered (needs improvement)
⚠️ apps/vs-code-designer/src/app/utils/unitTest/unitTest.ts - 77% covered (needs improvement)
⚠️ apps/vs-code-designer/src/app/utils/vsCodeConfig/launch.ts - 9% covered (needs improvement)
⚠️ apps/vs-code-designer/src/app/utils/vsCodeConfig/settings.ts - 46% covered (needs improvement)
⚠️ apps/vs-code-designer/src/app/utils/workspace.ts - 48% covered (needs improvement)
⚠️ apps/vs-code-designer/src/app/utils/fileManagement.ts - 59% covered (needs improvement)

Please add tests for the uncovered files before merging.

@github-actions

github-actions Bot commented Aug 12, 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: refactor(vscode): Multi-project workspace folder support, consistent project resolution across commands, workspace util cleanup
  • Issue: The title is specific, descriptive, and accurately summarizes the primary refactoring areas.
  • Recommendation: No change required.

✅ Commit Type

  • Properly selected (refactor).
  • Only one commit type is selected, which is correct.

⚠️ Risk Level

  • The submitted risk level is consistently marked as Medium, and the risk:medium label is present.
  • Based on the diff, the advised risk is High because this change affects project discovery, activation, deployment, debugging, language-server startup, workspace context/menu visibility, and numerous user-facing commands across 122 files.
  • Recommendation: Reassess the risk and consider selecting High and changing the label to risk:high. If Medium is retained, explain why the broad cross-command and deployment changes are expected to have only moderate impact.

✅ What & Why

  • Current: Provides detailed context covering centralized project discovery, nested and multi-project support, deployment, debugging, activation, configuration cleanup, and test changes.
  • Issue: No required information is missing. The section is more detailed than the requested brief context, but it is relevant and useful for a change of this scope.
  • Recommendation: No required change. Optionally condense the bullets if a shorter review summary is preferred.

✅ Impact of Change

  • The impact section identifies user and developer effects and explicitly states that there is no known system impact.
  • Recommendation:
    • Users: Retain the nested-project and multi-project behavior changes; consider mentioning deployment, debugging, menu visibility, and project-selection behavior explicitly.
    • Developers: Retain the utility/API consolidation and project-resolution changes.
    • System: Replace N/A with a concrete statement such as: Changes activation-time project discovery, language-server startup, deployment path resolution, and workspace context-key computation; no dependency or service changes.

✅ Test Plan

  • Unit tests are marked as added/updated and are supported by the diff, including project discovery, deployment, menu visibility, workspace resolution, debugging, language-server, and command coverage.
  • Manual testing is also marked complete. E2E tests are not required because unit tests are present.

⚠️ Contributors

  • The submitter is credited as @andrew-eldridge.
  • Recommendation: Consider crediting PMs, designers, reviewers, or other contributors if they influenced the implementation or requirements.

⚠️ Screenshots/Videos

  • This optional section is not included in the body.
  • Screenshots are not required for this review because the PR is primarily a VS Code extension architecture and behavior change, although screenshots or a short recording of the updated project-selection/menu behavior could help human reviewers.

Summary Table

Section Status Recommendation
Title ✅ No change required.
Commit Type ✅ Keep only refactor selected.
Risk Level ⚠️ Consider changing the body and label from Medium to High, or justify retaining Medium.
What & Why ✅ Complete and relevant; optionally shorten.
Impact of Change ✅ Replace System: N/A with a concrete system-impact statement.
Test Plan ✅ Unit-test coverage in the diff is sufficient.
Contributors ⚠️ Add other contributors if applicable.
Screenshots/Videos ⚠️ Optional; consider showing project selection or menu behavior.

The PR title and body pass the required compliance checks. The advised risk is higher than the submitted Medium estimate because of the broad cross-command, activation, deployment, debugging, and language-server changes.


Powered by: Logic App (fallback) | Last updated: Thu, 29 Oct 2026 15:47:54 GMT

…me usages of tryGetLogicAppProjectRoot (scoped to workspace folder)
…aceFolder/getWorkspaceFolderPath/getWorkflowLogicAppProjectRoot
@andrew-eldridge Andrew Eldridge (andrew-eldridge) added VSCode Issues or PRs specific to VS Code extension risk:medium Medium risk change with potential impact labels Aug 31, 2026
@andrew-eldridge
Andrew Eldridge (andrew-eldridge) marked this pull request as ready for review August 31, 2026 20:44
Copilot AI balanced review requested due to automatic review settings August 31, 2026 20:44
@andrew-eldridge Andrew Eldridge (andrew-eldridge) changed the title refactor(vscode): Workspace util cleanup refactor(vscode): Multi-project workspace folder support, workspace util cleanup Aug 31, 2026

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

Refactors the VS Code extension for nested and multi-project Logic Apps workspaces, centralizing project discovery and project-scoped command handling.

Changes:

  • Adds codeless/codeful project discovery and project-aware command routing.
  • Restructures deployment, debugging, panels, and settings around explicit project paths.
  • Updates manifest contexts and expands unit-test coverage.

Reviewed changes

Copilot reviewed 117 out of 117 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
apps/vs-code-designer/src/test/e2e/integration/workspaceConversion.test.ts Cleans workspace test comments.
apps/vs-code-designer/src/package.json Updates commands, settings, and menu contexts.
apps/vs-code-designer/src/main.ts Discovers projects during activation.
apps/vs-code-designer/src/extensionVariables.ts Documents legacy default project state.
apps/vs-code-designer/src/constants.ts Updates command and context constants.
apps/vs-code-designer/src/app/utils/vsCodeConfig/settings.ts Makes setting scope optional.
apps/vs-code-designer/src/app/utils/vsCodeConfig/launch.ts Uses parent workspace resolution.
apps/vs-code-designer/src/app/utils/startRuntimeApi.ts Resolves runtime workspace by project.
apps/vs-code-designer/src/app/utils/managedIdentity.ts Updates every discovered project concurrently.
apps/vs-code-designer/src/app/utils/funcCoreTools/funcHostTask.ts Resolves ports from explicit projects.
apps/vs-code-designer/src/app/utils/fileManagement.ts Generalizes workspace-folder management.
apps/vs-code-designer/src/app/utils/extension.ts Sets discovered-project context keys.
apps/vs-code-designer/src/app/utils/dotnet/dotnet.ts Uses centralized project discovery.
apps/vs-code-designer/src/app/utils/dotnet/__test__/dotnet.setCommand.test.ts Updates project-discovery mocks.
apps/vs-code-designer/src/app/utils/codeless/startDesignTimeApi.ts Starts APIs for discovered projects.
apps/vs-code-designer/src/app/utils/codeless/parameter.ts Resolves parameter project from workflow.
apps/vs-code-designer/src/app/utils/codeless/hybridLogicApp/hybridApp.ts Selects a project for local settings.
apps/vs-code-designer/src/app/utils/codeless/__test__/startDesignTimeApi.test.ts Updates discovery tests.
apps/vs-code-designer/src/app/utils/codeless/__test__/parameter.test.ts Tests parent-project resolution.
apps/vs-code-designer/src/app/utils/codeless.ts Adds codeless project detection.
apps/vs-code-designer/src/app/utils/cloudToLocalUtils.ts Uses parent workspace lookup.
apps/vs-code-designer/src/app/utils/bundleFeed.ts Resolves bundle settings from a project.
apps/vs-code-designer/src/app/utils/azurite/__test__/activateAzurite.test.ts Removes obsolete project-discovery tests.
apps/vs-code-designer/src/app/utils/appSettings/__test__/connectionKeys.test.ts Updates discovery mock naming.
apps/vs-code-designer/src/app/utils/__test__/managedIdentity.test.ts Tests multi-project settings updates.
apps/vs-code-designer/src/app/utils/__test__/FileManagement.test.ts Adds workspace-folder utility tests.
apps/vs-code-designer/src/app/utils/__test__/extension.test.ts Tests project context values.
apps/vs-code-designer/src/app/utils/__test__/codeless.test.ts Tests codeless detection.
apps/vs-code-designer/src/app/utils/__test__/bundleFeed.test.ts Updates project-selection mocks.
apps/vs-code-designer/src/app/tree/AzureAccountTreeItemWithProjects.ts Removes project-subpath refresh handling.
apps/vs-code-designer/src/app/projectConsistency/vscodeConsistency.ts Checks every discovered project.
apps/vs-code-designer/src/app/projectConsistency/projectFilesConsistency.ts Reuses shared path comparison.
apps/vs-code-designer/src/app/projectConsistency/__test__/vscodeConsistency.test.ts Updates consistency discovery tests.
apps/vs-code-designer/src/app/projectConsistency/__test__/projectFilesConsistency.test.ts Preserves path utilities in mocks.
apps/vs-code-designer/src/app/languageServer/languageServer.ts Selects a project for language-server startup.
apps/vs-code-designer/src/app/languageServer/__test__/languageServer.test.ts Updates language-server selection tests.
apps/vs-code-designer/src/app/commands/workflows/useSQLStorage.ts Makes SQL storage project-scoped.
apps/vs-code-designer/src/app/commands/workflows/unitTest/createUnitTest.ts Resolves workflows and projects explicitly.
apps/vs-code-designer/src/app/commands/workflows/unitTest/__test__/createUnitTest.test.ts Tests workflow/project fallbacks.
apps/vs-code-designer/src/app/commands/workflows/switchDebugMode/switchDebugMode.ts Makes debug-mode switching project-scoped.
apps/vs-code-designer/src/app/commands/workflows/switchDebugMode/__test__/switchDebugMode.test.ts Tests project resolution.
apps/vs-code-designer/src/app/commands/workflows/overview/panels/localOverviewPanel.ts Resolves the containing project.
apps/vs-code-designer/src/app/commands/workflows/overview/panels/localCodefulOverviewPanel.ts Resolves codeful project roots.
apps/vs-code-designer/src/app/commands/workflows/overview/panels/__test__/localOverviewPanel.test.ts Updates project-root mocks.
apps/vs-code-designer/src/app/commands/workflows/overview/panels/__test__/localCodefulOverviewPanel.test.ts Updates codeful project mocks.
apps/vs-code-designer/src/app/commands/workflows/overview/openOverview.ts Falls back to the active workflow.
apps/vs-code-designer/src/app/commands/workflows/overview/__test__/openOverview.test.ts Tests active-workflow fallback.
apps/vs-code-designer/src/app/commands/workflows/monitoringView/panels/localMonitoringPanel.ts Makes monitoring metadata project-aware.
apps/vs-code-designer/src/app/commands/workflows/monitoringView/panels/__test__/localMonitoringPanel.test.ts Updates monitoring project mocks.
apps/vs-code-designer/src/app/commands/workflows/designer/utils/parameterMerge.ts Uses workflow-based parameter lookup.
apps/vs-code-designer/src/app/commands/workflows/designer/panels/localDesignerPanel.ts Makes designer operations project-aware.
apps/vs-code-designer/src/app/commands/workflows/designer/panels/__test__/localDesignerPanel.test.ts Updates designer project tests.
apps/vs-code-designer/src/app/commands/workflows/designer-v2/panels/localDesignerV2Panel.ts Makes V2 designer project-aware.
apps/vs-code-designer/src/app/commands/workflows/designer-v2/panels/__test__/localDesignerV2Panel.test.ts Updates V2 panel tests.
apps/vs-code-designer/src/app/commands/workflows/designer-v2/openDesignerV2.ts Resolves projects before custom-code builds.
apps/vs-code-designer/src/app/commands/workflows/designer-v2/__test__/openDesignerV2.test.ts Tests project-aware V2 opening.
apps/vs-code-designer/src/app/commands/workflows/connectionView/panels/connectionPanel.ts Makes connection operations project-aware.
apps/vs-code-designer/src/app/commands/workflows/connectionView/panels/__test__/connectionPanelRace.test.ts Updates connection project mocks.
apps/vs-code-designer/src/app/commands/workflows/configureWebhookRedirectEndpoint/configureWebhookRedirectEndpoint.ts Resolves webhook settings by project.
apps/vs-code-designer/src/app/commands/workflows/__test__/useSQLStorage.test.ts Tests SQL project selection.
apps/vs-code-designer/src/app/commands/syncCloudSettings.ts Makes cloud-settings sync project-scoped.
apps/vs-code-designer/src/app/commands/runProjectConsistencyCheck.ts Runs checks for discovered projects.
apps/vs-code-designer/src/app/commands/registerCommands.ts Updates command registrations.
apps/vs-code-designer/src/app/commands/publishCodefulProject.ts Publishes explicit project paths.
apps/vs-code-designer/src/app/commands/pickFuncProcess.ts Passes project paths through debugging.
apps/vs-code-designer/src/app/commands/parameterizeConnections.ts Parameterizes all discovered projects.
apps/vs-code-designer/src/app/commands/initProjectForVSCode/initProjectForVSCode.ts Restricts initialization to projects.
apps/vs-code-designer/src/app/commands/generateDeploymentScripts/generateDeploymentScriptsSteps/adoDeploymentScriptsSteps/GenerateADODeploymentScriptsStep.ts Uses shared file management.
apps/vs-code-designer/src/app/commands/generateDeploymentScripts/generateDeploymentScripts.ts Selects deployment-script projects.
apps/vs-code-designer/src/app/commands/generateDeploymentScripts/__test__/generateDeploymentScripts.test.ts Tests project selection.
apps/vs-code-designer/src/app/commands/generateDeploymentScripts/__test__/FileManagement.test.ts Removes relocated utility tests.
apps/vs-code-designer/src/app/commands/ensureWorkspace.ts Uses centralized workspace discovery.
apps/vs-code-designer/src/app/commands/deploy/hybridLogicApp/index.ts Passes project paths into SMB deployment.
apps/vs-code-designer/src/app/commands/deploy/hybridLogicApp/connectToSMB.ts Uploads an explicit project.
apps/vs-code-designer/src/app/commands/deploy/hybridLogicApp/__test__/connectToSMB.test.ts Updates SMB deployment tests.
apps/vs-code-designer/src/app/commands/debugLogicApp.ts Selects projects for debugging.
apps/vs-code-designer/src/app/commands/dataMapper/dataMapper.ts Adds project selection to Data Mapper.
apps/vs-code-designer/src/app/commands/createWorkflow/createWorkflow.ts Supplies all projects and workflow names.
apps/vs-code-designer/src/app/commands/createProject/createProjectSteps/existingWorkspaceStep.ts Derives paths from workspace files.
apps/vs-code-designer/src/app/commands/createNewCodeProject/CodeProjectBase/CreateLogicAppProjects.ts Uses centralized project detection.
apps/vs-code-designer/src/app/commands/buildCustomCodeFunctionsProject.ts Builds from explicit project paths.
apps/vs-code-designer/src/app/commands/azureConnectors/enableAzureConnectors.ts Makes connector setup project-scoped.
apps/vs-code-designer/src/app/commands/azureConnectors/__test__/enableAzureConnectors.test.ts Tests connector project selection.
apps/vs-code-designer/src/app/commands/appSettings/uploadAppSettings.ts Uploads settings from selected projects.
apps/vs-code-designer/src/app/commands/appSettings/downloadAppSettings.ts Downloads settings into selected projects.
apps/vs-code-designer/src/app/commands/appSettings/__test__/uploadAppSettings.test.ts Tests explicit and selected paths.
apps/vs-code-designer/src/app/commands/addCustomCode/addCustomCode.ts Uses centralized project validation.
apps/vs-code-designer/src/app/commands/addCustomCode/__test__/addCustomCode.test.ts Updates project-validation mocks.
apps/vs-code-designer/src/app/commands/__test__/pickFuncProcess.test.ts Tests project-aware debugging.
apps/vs-code-designer/src/app/commands/__test__/pickCustomCodeWorkerProcess.test.ts Removes obsolete discovery mocks.
apps/vs-code-designer/src/app/commands/__test__/parameterizeConnections.test.ts Updates discovery assertions.
apps/vs-code-designer/src/app/commands/__test__/debugLogicApp.test.ts Tests debug project selection.
apps/vs-code-designer/src/app/commands/__test__/commandWebviewWrappers.test.ts Tests multi-project webview data.
apps/vs-code-designer/src/app/commands/__test__/buildCustomCodeFunctionsProject.test.ts Updates explicit-path build tests.
apps/vs-code-designer/src/__test__/logicAppProjectMenuVisibility.test.ts Tests project-root menu visibility.
apps/vs-code-designer/.github/copilot-skills/vscode-e2e-testing.md Updates documented E2E inventory.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread apps/vs-code-designer/src/main.ts Resolved
@andrew-eldridge Andrew Eldridge (andrew-eldridge) changed the title refactor(vscode): Multi-project workspace folder support, workspace util cleanup refactor(vscode): Multi-project workspace folder support, consistent project resolution across commands, workspace util cleanup Sep 2, 2026

This branch has not been deployed

No deployments
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.

2 participants