Skip to content

feat(vscode): 'Add custom code' command for adding custom code to existing logic app - #9526

Merged
Andrew Eldridge (andrew-eldridge) merged 7 commits into
mainfrom
aeldridge/custom-code-create-function
Aug 12, 2026
Merged

feat(vscode): 'Add custom code' command for adding custom code to existing logic app#9526
Andrew Eldridge (andrew-eldridge) merged 7 commits into
mainfrom
aeldridge/custom-code-create-function

Conversation

@andrew-eldridge

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

Adds new extension command 'Add custom code' used for adding custom code functions project to existing logic app that wasn't initialized with custom code. Re-uses existing project creation flow

Impact of Change

  • Users: Adds new command 'Add custom code'
  • Developers: Cleans up some custom code related utils
  • 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 11, 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: feat(vscode): 'Add custom code' command for adding custom code to existing logic app
  • Issue: None — valid feat(scope): prefix and clearly descriptive.
  • Recommendation: No change needed.

Commit Type

  • Exactly one type selected (feature - New functionality), consistent with the feat: title prefix.
  • Note: The label reads "feature" while the template lists "feat"; harmless, but you may align it to feat for exactness.

Risk Level

  • Exactly one box selected (Medium) and the risk:medium label matches the body. This also matches the advised estimate: changes ship to the VS Code extension (apps/vs-code-designer) and its webview (apps/vs-code-react), which per the rubric is Medium (extension distribution). No security/auth or shared-core breaking changes → not High.

What & Why

  • Current: Explains the new 'Add custom code' command that adds a custom-code functions project to an existing Logic App, reusing the existing project creation flow.
  • Issue: None.
  • Recommendation: No change needed.

Impact of Change

  • All three audiences addressed (Users: new command; Developers: custom-code util cleanup; System: N/A).
  • Recommendation:
    • Users: Clear as written.
    • Developers: Optionally mention the removed getLogicAppWithoutCustomCode/promptForLogicAppWithoutCustomCode helpers and the new getEligibleLogicAppFoldersForCustomCode API for anyone depending on them.
    • System: N/A is acceptable.

Test Plan

  • Unit tests added/updated (confirmed in diff: new addCustomCode.test.ts, updated customCodeUtils.test.ts, registerCommands.test.ts, and multiple vs-code-react step/slice tests). Manual testing also checked. Test Plan passes.

⚠️ Contributors

  • @andrew-eldridge credited. Consider also crediting any PM/designer involved in the command UX.

⚠️ Screenshots/Videos

  • The diff touches apps/vs-code-react/src/ webview steps (logicAppTypeStep.tsx, reviewCreateStep.tsx) that disable inputs and hide the radio group in the add-custom-code flow. This isn't clearly a strong visual change, so it's a nudge rather than a blocker — but a quick screenshot/GIF of the pre-configured wizard would help reviewers verify the locked Logic App selection.

Summary Table

Section Status Recommendation
Title No change needed
Commit Type Optionally use feat label wording
Risk Level Medium is correct
What & Why No change needed
Impact of Change Optionally note removed/added utils
Test Plan Unit tests confirmed
Contributors ⚠️ Credit PM/designer if applicable
Screenshots/Videos ⚠️ Add a wizard screenshot/GIF

✅ This PR passes template validation. All required checks are satisfied and the declared Medium risk matches the estimate. Addressing the two warnings (contributors, screenshot) is optional and does not block merge.


Powered by: Copilot CLI (claude-opus-4.8) | Last updated: Wed, 12 Aug 2026 20:40:47 GMT

@github-actions

github-actions Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

📊 Coverage Check

The following changed files need attention:

⚠️ apps/vs-code-designer/src/app/commands/registerCommands.ts - 75% covered (needs improvement)
⚠️ apps/vs-code-designer/src/app/utils/workspace.ts - 48% covered (needs improvement)
⚠️ apps/vs-code-react/src/state/createWorkspaceSlice.ts - 58% 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

Adds a VS Code Explorer command for attaching .NET custom code to an existing eligible Logic App project.

Changes:

  • Registers and exposes the new context-menu command.
  • Reuses the project wizard with a locked Logic App selection.
  • Adds eligibility filtering and unit tests.

Reviewed changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
apps/vs-code-react/src/state/createWorkspaceSlice.ts Adds custom-code flow state.
apps/vs-code-react/src/state/__test__/createWorkspaceSlice.test.ts Tests state initialization.
apps/vs-code-react/src/app/createWorkspace/steps/logicAppTypeStep.tsx Locks preselected project fields.
apps/vs-code-react/src/app/createWorkspace/steps/__test__/workspaceNameStep.test.tsx Updates test state.
apps/vs-code-react/src/app/createWorkspace/steps/__test__/workflowTypeStep.test.tsx Updates test state.
apps/vs-code-react/src/app/createWorkspace/steps/__test__/reviewCreateStep.test.tsx Updates test state.
apps/vs-code-react/src/app/createWorkspace/steps/__test__/logicAppTypeStep.test.tsx Tests locked custom-code UI.
apps/vs-code-react/src/app/createWorkspace/steps/__test__/dotNetFrameworkStep.test.tsx Updates test state.
apps/vs-code-react/src/app/createWorkspace/__test__/createWorkspace.test.tsx Updates test fixture.
apps/vs-code-designer/src/package.json Contributes the command and menu entry.
apps/vs-code-designer/src/main.ts Initializes eligibility context.
apps/vs-code-designer/src/constants.ts Defines command and context keys.
apps/vs-code-designer/src/app/utils/workspace.ts Removes superseded selection helpers.
apps/vs-code-designer/src/app/utils/customCodeUtils.ts Determines eligible Logic Apps.
apps/vs-code-designer/src/app/utils/__test__/customCodeUtils.test.ts Imports the new eligibility utility.
apps/vs-code-designer/src/app/commands/registerCommands.ts Registers the command.
apps/vs-code-designer/src/app/commands/createProject/createProject.ts Uses centralized eligibility discovery.
apps/vs-code-designer/src/app/commands/addCustomCode/addCustomCode.ts Implements the command workflow.
apps/vs-code-designer/src/app/commands/addCustomCode/__test__/addCustomCode.test.ts Tests command validation and setup.
apps/vs-code-designer/src/app/commands/__test__/registerCommands.test.ts Tests command registration.
apps/vs-code-designer/src/app/commands/__test__/commandWebviewWrappers.test.ts Updates project-webview tests.

💡 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 Outdated
Comment thread apps/vs-code-designer/src/app/utils/customCodeUtils.ts
Comment thread apps/vs-code-designer/src/app/commands/addCustomCode/addCustomCode.ts Outdated
@andrew-eldridge Andrew Eldridge (andrew-eldridge) added VSCode Issues or PRs specific to VS Code extension risk:medium Medium risk change with potential impact and removed needs-pr-update labels Aug 11, 2026
@andrew-eldridge
Andrew Eldridge (andrew-eldridge) merged commit 1302773 into main Aug 12, 2026
41 of 43 checks passed
@andrew-eldridge
Andrew Eldridge (andrew-eldridge) deleted the aeldridge/custom-code-create-function branch August 12, 2026 21:08
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.

3 participants