LogicAppsUX / vs-code-designer
CLAUDE.md114 starsChanged 5 months agoMITView on GitHub
The VS Code extension host for Azure Logic Apps. This is the main extension that gets published to the VS Code marketplace. Extension ↔ Webview messaging: The extension is packaged with dependencies: 1. Build: pnpm run build:extension 2. Copy files: Runs extension-copy-svgs.js 3. Install deps: cd dist && npm install 4. Package: vsce package Run Phase 4.2 only (requires workspaces from a prior Phase 4.1 run): Key files: designerActions.test.ts, run-e2e.ts, SKILL.md (detailed learning document)
In this repository17 other files it gives its agents.
- apps/docs/CLAUDE.mdCLAUDE.md
- apps/iframe-app/CLAUDE.mdCLAUDE.md
- apps/Standalone/CLAUDE.mdCLAUDE.md
- apps/vs-code-react/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- libs/a2a-core/CLAUDE.mdCLAUDE.md
- libs/chatbot/CLAUDE.mdCLAUDE.md
- libs/data-mapper/CLAUDE.mdCLAUDE.md
- libs/data-mapper-v2/CLAUDE.mdCLAUDE.md
- libs/designer/CLAUDE.mdCLAUDE.md
- libs/designer-ui/CLAUDE.mdCLAUDE.md
- libs/designer-v2/CLAUDE.mdCLAUDE.md
- libs/logic-apps-shared/CLAUDE.mdCLAUDE.md
- libs/vscode-extension/CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- uiSkill
- verify-prSkill
The file
Show its rules and text
We split this CLAUDE.md into the rules it gives an agent
19 rules. About 0 are common, 11 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈11
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 96
Run Phase 4.2 only (requires workspaces from a prior Phase 4.1 run):
- Distinctive: line 124
Debugging: Use VS Code's "Run Extension" launch config
- Distinctive: line 125
Reload: Use "Developer: Reload Window" after changes
- Distinctive: line 126
Logs: Check "Output" panel → "Azure Logic Apps"
- Very specific: line 159
Close all editors before opening overview: Call result.webview.switchBack() → driver.switchTo().defaultContent() → new …
- Distinctive: line 163
Stateless workflows don't persist run history: Don't use Stateless workspaces for tests that verify runs in the overview page.
- Very specific: line 177
Right-click the correct
workflow.json: Use VSBrowser.instance.openResources(absolutePath) to reveal the file in Explorer first, then … - Distinctive: line 211
ALWAYS: run these commands after editing any file, before committing:
- Very specific: line 219
Do NOT use --unsafe with Biome.
- Very specific: line 221
Use string literals ('text') instead of template literals (
text) when there are no interpolations - Very specific: line 222
Avoid unnecessary catch bindings — use catch { not catch (e) { when e is unused
- Distinctive: line 223
Keep imports organized and remove unused imports
- Very specific: line 224
Always use block statements with braces — if (x) { break.
- Distinctive: line 228
After pushing E2E test changes, automatically monitor the GitHub Actions CI run and iterate on failures without waiting for the user to ask:
- Distinctive: line 231
Wait ~20-25 minutes for the VS Code E2E test job to complete
- Very specific: line 232
Use the GitHub MCP tools (fetch_webpage on the Actions run URL, or mcp_io_github_git_pull_request_read with get_status) to check the result
- Distinctive: line 233
If the CI fails, analyze the failure logs (user will paste them if needed, or download screenshots)
- Distinctive: line 237
Do NOT stop after pushing and tell the user "I'll wait" — proactively check and iterate.
- Very specific: line 241
Read apps/vs-code-designer/src/graphify-out/GRAPH_REPORT.md for structural context (god nodes, communities, surprising connections).
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<!-- AUTO-GENERATED from docs/ai-setup/packages/vs-code-designer.md. DO NOT EDIT directly. -->VS Code Designer Extension
The VS Code extension host for Azure Logic Apps. This is the main extension that gets published to the VS Code marketplace.
Purpose
- VS Code extension entry point - Activates and manages the extension lifecycle
- Command registration - Provides Logic Apps commands in VS Code
- Webview hosting - Launches React-based designer panels
- Azure integration - Connects to Azure services for workflow management
- File system operations - Handles local Logic Apps projects
Commands
pnpm run build:extension # Build extension
pnpm run vscode:designer:pack # Package .vsix file
pnpm run test:extension-unit # Run unit tests
pnpm run vscode:designer:e2e:ui # E2E tests with UIStructure
/src
/app - Extension activation and commands
/commands - VS Code command implementations
/designers - Webview panel management
/services - Azure service implementations
/utils - Helper utilities
/dist - Build output and packaged extensionKey Components
Extension Activation (src/app/)
extension.ts- Main activation entry point- Registers commands, tree views, and webview providers
Command Handlers (src/commands/)
- Workflow CRUD operations
- Connection management
- Deployment commands
- Debug and run commands
Designers (src/designers/)
DesignerPanel- Main workflow designer webviewDataMapperPanel- Data transformation webview- Panel state management and messaging
Azure Services
- ARM API clients for Logic Apps resources
- Storage account integration
- App Service deployment
Webview Communication
Extension ↔ Webview messaging:
// Extension sends to webview
panel.webview.postMessage({ type: 'WORKFLOW_LOADED', data: workflow })
// Webview sends to extension (via vscode-extension lib)
vscode.postMessage({ type: 'SAVE_WORKFLOW', data: workflow })Extension Packaging
The extension is packaged with dependencies:
- Build:
pnpm run build:extension - Copy files: Runs
extension-copy-svgs.js - Install deps:
cd dist && npm install - Package:
vsce package
Testing
Unit Tests
pnpm run test:extension-unitE2E Tests (vscode-extension-tester)
pnpm run vscode:designer:e2e:ui # With UI
pnpm run vscode:designer:e2e:headless # HeadlessPhase 4.2 Designer Tests (2 tests, ~5 min)
The primary E2E tests are in src/test/ui/designerActions.test.ts (~2647 lines). They cover the complete workflow lifecycle:
- Test 1 (Standard): Open designer → add Request trigger + Response action → save → debug → open overview → run trigger → verify all nodes succeeded
- Test 2 (CustomCode): Open designer → add Compose action + fill inputs → save → debug → open overview → run trigger → verify Running → Succeeded transition → verify all nodes succeeded
Run Phase 4.2 only (requires workspaces from a prior Phase 4.1 run):
cd apps/vs-code-designer
npx tsup --config tsup.e2e.test.config.ts
$env:E2E_MODE = "designeronly"
node out/test/run-e2e.jsKey files: designerActions.test.ts, run-e2e.ts, SKILL.md (detailed learning document)
Configuration
package.json (Extension Manifest)
Defines:
- Commands and keybindings
- View containers and tree views
- Configuration settings
- Activation events
Dependencies
@microsoft/vscode-extension-logic-apps- Shared VS Code utilities@microsoft/logic-apps-shared- Common Logic Apps utilities- Azure SDK packages for resource management
- VS Code extension APIs
Development Tips
- Debugging: Use VS Code's "Run Extension" launch config
- Reload: Use "Developer: Reload Window" after changes
- Logs: Check "Output" panel → "Azure Logic Apps"
- Webview DevTools: Command Palette → "Open Webview Developer Tools"
ExTester E2E Test Knowledge Base
Full reference: See src/test/ui/SKILL.md for the complete learning document (700+ lines).
Phase Structure
Each test runs in its own fresh VS Code session to avoid workspace-switch contention:
| Phase | Test File | What It Tests |
| 4.1 | createWorkspace.test.ts | Workspace creation wizard (12 types) |
| 4.2 | designerActions.test.ts | Standard + CustomCode designer lifecycle |
| 4.3 | inlineJavascript.test.ts | Execute JavaScript Code action (ADO #10109800) |
| 4.4 | statelessVariables.test.ts | Initialize Variable action (ADO #10109878) |
| 4.5 | designerViewExtended.test.ts | Parallel branches + run-after (ADO #10109401) |
| 4.6 | keyboardNavigation.test.ts | Ctrl+Up/Down + Ctrl+Alt+P / Ctrl+Shift+P hotkey contract |
| 4.7 | dataMapper.test.ts, demo, smoke, standalone | Data Mapper + generic tests |
| 4.11 | bundleCdnHealth.test.ts | CDN integrity headers probe (Content-Length / Content-MD5 on the Workflows extension bundle). Pure Mocha — no VS Code session. |
Shared Helper Modules
| Module | Purpose |
helpers.ts | General utilities: sleep, screenshots, dialog dismissal, activity bar |
designerHelpers.ts | Designer interaction: open designer, canvas ops, search, save |
runHelpers.ts | Debug/run cycle: start debugging, overview page, run trigger, verify |
workspaceManifest.ts | Workspace manifest types and I/O |
Critical Rules for Writing New E2E Tests
- Close all editors before opening overview: Call
result.webview.switchBack()→driver.switchTo().defaultContent()→new EditorView().closeAllEditors()→sleep(2000)before starting debug. OtherwiseswitchToOverviewWebview()enters the designer iframe instead of the overview iframe. - Use
findLastAddActionElement()for second+ actions:findAddActionElement()returns the first+button which inserts between trigger and first action. UsefindLastAddActionElement()to append at the end of the flow. - Stateless workflows don't persist run history: Don't use Stateless workspaces for tests that verify runs in the overview page. Use Stateful.
- Parameter panels use contenteditable editors: The designer doesn't use standard
<label>+<input>pairs. Use[contenteditable="true"].editor-inputselectors and index-based targeting. Click the node first withopenNodeSettingsPanel()to ensure the panel is open. - Each test needs its own phase: Tests sharing a VS Code session fail due to lingering processes, webview iframes in DOM, and extension host instability after workspace switches.
- Use Selenium Actions API for React clicks:
driver.actions().move({ origin: element }).click().perform()— direct.click()doesn't trigger React event handlers in webview iframes. - Command palette needs retries:
executeOpenDesignerCommand()retries 5 times because the extension needs time to re-register commands after workspace switching. - Multiple webview iframes: use
switchToActiveDesignerFrame(): ExTester'snew WebView().switchToFrame()always enters the FIRST iframe — wrong when multiple designers are open. Use raw Seleniumdriver.switchTo().frame(element)with polling to find the visible iframe. - Designer tabs vs. file tabs — match on "(Workspace)":
activateDesignerTab()must match tabs containing BOTH the workflow name AND "Workspace" to avoid clicking theworkflow.jsontext editor tab instead of the designer panel. - Right-click the correct
workflow.json: UseVSBrowser.instance.openResources(absolutePath)to reveal the file in Explorer first, then right-click the selected row. - Only use built-in operations (Request, Response) for reliable tests: Connector operations (Compose) may not appear if the design-time API hasn't loaded the catalog.
- Always run tests automatically after creating or modifying them: After writing or editing any test file, immediately: lint (
npx biome check --write), build (npx tsup), and run (node out/test/run-e2e.js) — don't wait for the user to ask. Report pass/fail results with any failure details.
Running Tests
cd apps/vs-code-designer
npx tsup --config tsup.e2e.test.config.ts # Compile
# Run modes:
$env:E2E_MODE = "full" # All phases (single runner, ~30+ min) — local debug fallback
$env:E2E_MODE = "createonly" # Phase 4.1 only
$env:E2E_MODE = "designeronly" # Phase 4.2 only (requires prior 4.1 manifest)
$env:E2E_MODE = "newtestsonly" # Phases 4.3-4.6 only (requires prior 4.1 manifest)
$env:E2E_MODE = "conversiononly" # Phases 4.8a-e only (requires prior 4.1 manifest)
$env:E2E_MODE = "conversioncreateonly" # Phase 4.8b only (builds own legacy fixture)
$env:E2E_MODE = "nonlogicappstartup" # Phase 4.0 only
$env:E2E_MODE = "bundleintegrityonly" # Phase 4.11 — pure-Mocha CDN integrity probe (no VS Code)
# CI matrix shard modes (each runs on its own GitHub Actions runner):
$env:E2E_MODE = "independentonly" # 4.0 + 4.8b + 4.11 — no Phase 4.1 dep
$env:E2E_MODE = "createplusdesigner" # 4.1 → 4.2, 4.7
$env:E2E_MODE = "createplusnewtests" # 4.1 → 4.3, 4.4, 4.5, 4.6
$env:E2E_MODE = "createplusconversion" # 4.1 → 4.8a, 4.8c, 4.8d, 4.8e
node out/test/run-e2e.jsThe four createplus* / independentonly modes are how .github/workflows/vscode-e2e.yml shards the suite across parallel runners. full remains the single-runner debug fallback.
Mandatory: Lint and Format After Every Edit
ALWAYS run these commands after editing any file, before committing:
# From repo root:
npx biome check --write <files> # Format + safe lint fixes (NEVER use --unsafe)
npx tsup --config tsup.e2e.test.config.ts # Verify compilationDo NOT use --unsafe with Biome. If Biome reports errors that require --unsafe, fix them manually instead.
Common Biome rules to follow when writing code:
- Use string literals (
'text') instead of template literals (`text`) when there are no interpolations - Avoid unnecessary
catchbindings — usecatch {notcatch (e) {wheneis unused - Keep imports organized and remove unused imports
- Always use block statements with braces —
if (x) { break; }notif (x) break;
CI Iteration Workflow
After pushing E2E test changes, automatically monitor the GitHub Actions CI run and iterate on failures without waiting for the user to ask:
- Push the commit
- Wait ~20-25 minutes for the VS Code E2E test job to complete
- Use the GitHub MCP tools (
fetch_webpageon the Actions run URL, ormcp_io_github_git_pull_request_readwithget_status) to check the result - If the CI fails, analyze the failure logs (user will paste them if needed, or download screenshots)
- Fix the issues, build, commit, and push
- Go back to step 2
Do NOT stop after pushing and tell the user "I'll wait" — proactively check and iterate.
Graphify
Read apps/vs-code-designer/src/graphify-out/GRAPH_REPORT.md for structural context (god nodes, communities, surprising connections).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

