Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/agents/customer-repro-tester.agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Your job is to turn customer reports into safe, actionable repro evidence:
- parse symptoms, expected behavior, actual behavior, host surface, SKU, workflow kind, versions, settings, screenshots, logs, and sanitized artifacts;
- remove or reject secrets, tenant IDs, subscription IDs, connection strings, tokens, personal data, and raw customer payloads;
- choose the cheapest reliable repro method: manual, unit, React unit, Playwright E2E, VS Code ExTester E2E, or live-service-only investigation;
- use Playwright for browser/standalone/portal-like flows and VS Code ExTester through `run-e2e.js` for VS Code extension/webview flows;
- use Playwright for browser/standalone/portal-like flows and VS Code ExTester through `run-e2e.ts` for VS Code extension/webview flows;
- produce a repro report with steps, expected/actual behavior, evidence, likely owner, regression recommendation, and privacy notes.

Do not use live Azure/ARM/customer-tenant resources without explicit user approval.
2 changes: 1 addition & 1 deletion .github/agents/test.agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Own test strategy and coverage quality:
- map behavior changes and PR comments to meaningful assertions;
- reuse existing helpers, mocks, and fixtures;
- avoid weakening assertions to hide product bugs;
- for VS Code E2E, ensure tests are wired through `apps/vs-code-designer/src/test/ui/run-e2e.js` and follow `apps/vs-code-designer/src/test/ui/SKILL.md`;
- for VS Code E2E, ensure tests are wired through `apps/vs-code-designer/src/test/ui/run-e2e.ts` and follow `apps/vs-code-designer/src/test/ui/SKILL.md`;
- provide a coverage verdict before final status when tests are part of the plan.

Do not write production feature code unless explicitly asked. Coordinate with the owning domain agent for product changes.
2 changes: 1 addition & 1 deletion .github/agents/vscode-test-specialist.agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: Specialist for VS Code extension unit tests and ExTester UI E2E tes

You are the LogicAppsUX VS Code test specialist.

Use `.squad/agents/vscode-test-specialist/charter.md` as your detailed charter. Read `.squad/playbooks/vscode-testing.md`, `.squad/knowledge/vscode-e2e-testing.md`, `apps/vs-code-designer/src/test/ui/SKILL.md`, and `apps/vs-code-designer/src/test/ui/run-e2e.js` before editing VS Code UI E2E tests.
Use `.squad/agents/vscode-test-specialist/charter.md` as your detailed charter. Read `.squad/playbooks/vscode-testing.md`, `.squad/knowledge/vscode-e2e-testing.md`, `apps/vs-code-designer/src/test/ui/SKILL.md`, and `apps/vs-code-designer/src/test/ui/run-e2e.ts` before editing VS Code UI E2E tests.

Focus on deterministic VS Code tests:

Expand Down
5 changes: 3 additions & 2 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ pnpm run vscode:designer:e2e:headless # Headless mode
```bash
cd apps/vs-code-designer
npx tsup --config tsup.e2e.test.config.ts
node src/test/ui/run-e2e.js
node out/test/run-e2e.js

# Run specific phases via E2E_MODE env var
E2E_MODE="createonly" # Phase 4.1: workspace creation
Expand All @@ -82,7 +82,7 @@ Key knowledge files for E2E tests:
- `apps/vs-code-designer/src/test/ui/SKILL.md` — Complete learning document (700+ lines)
- `apps/vs-code-designer/src/test/ui/designerHelpers.ts` — Shared designer test helpers
- `apps/vs-code-designer/src/test/ui/runHelpers.ts` — Shared debug/run test helpers
- `apps/vs-code-designer/src/test/ui/run-e2e.js` — Test launcher (7 phases)
- `apps/vs-code-designer/src/test/ui/run-e2e.ts` — Test launcher (7 phases)

### Code Quality
```bash
Expand Down Expand Up @@ -368,3 +368,4 @@ Each package has detailed guidance in `docs/ai-setup/packages/<name>.md`. Read t
## Squad Agents

This repo uses Squad for AI agent specialization. See `.squad/README.md` for the team roster and `.squad/routing.md` for work dispatch.

9 changes: 5 additions & 4 deletions .github/instructions/vs-code-designer.instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ 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 src/test/ui/run-e2e.js
node out/test/run-e2e.js
```

Key files: `designerActions.test.ts`, `run-e2e.js`, `SKILL.md` (detailed learning document)
Key files: `designerActions.test.ts`, `run-e2e.ts`, `SKILL.md` (detailed learning document)

## Configuration

Expand Down Expand Up @@ -178,7 +178,7 @@ Each test runs in its own fresh VS Code session to avoid workspace-switch conten

11. **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.

12. **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 src/test/ui/run-e2e.js`) — don't wait for the user to ask. Report pass/fail results with any failure details.
12. **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

Expand All @@ -201,7 +201,7 @@ $env:E2E_MODE = "independentonly" # 4.0 + 4.8b + 4.11 — no Phase 4.1 d
$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 src/test/ui/run-e2e.js
node out/test/run-e2e.js
```

The four `createplus*` / `independentonly` modes are how `.github/workflows/vscode-e2e.yml` shards the suite across parallel runners. `full` remains the single-runner debug fallback.
Expand Down Expand Up @@ -239,3 +239,4 @@ Do NOT stop after pushing and tell the user "I'll wait" — proactively check an
## Graphify

Read `apps/vs-code-designer/src/graphify-out/GRAPH_REPORT.md` for structural context (god nodes, communities, surprising connections).

117 changes: 113 additions & 4 deletions .github/workflows/vscode-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ jobs:
run: |
export PATH="$(dirname $(which node)):/usr/local/bin:/usr/bin:/bin:$PATH"
xvfb-run --auto-servernum --server-args="-screen 0 1920x1080x24" \
node apps/vs-code-designer/src/test/ui/run-e2e.js
node apps/vs-code-designer/out/test/run-e2e.js
env:
LA_E2E_SCENARIO: p41a-fixtures
LA_E2E_STRICT_DEPENDENCY_VALIDATION: '1'
Expand Down Expand Up @@ -493,7 +493,7 @@ jobs:
export PATH="$(dirname $(which node)):/usr/local/bin:/usr/bin:/bin:$PATH"
echo "PATH=$PATH"
xvfb-run --auto-servernum --server-args="-screen 0 1920x1080x24" \
node apps/vs-code-designer/src/test/ui/run-e2e.js
node apps/vs-code-designer/out/test/run-e2e.js
env:
# Per-scenario matrix: each shard runs exactly one scenarios[] entry.
LA_E2E_SCENARIO: ${{ matrix.scenario }}
Expand All @@ -515,11 +515,117 @@ jobs:
if-no-files-found: ignore
retention-days: 30

vscode-e2e-compat:
name: vscode-e2e compatibility (${{ matrix.label }})
needs: setup-extension-build
timeout-minutes: 20
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
# The runner Node version drives pnpm/tsup/run-e2e.js and any child
# processes that resolve node from PATH. The extension-host Node
# version is owned by the VS Code/Electron build below.
#
# Keep an explicit legacy smoke so the latest extension continues to
# activate on the stable runner/runtime combination used by the full
# VS Code E2E suite.
- label: node20-vscode108
node-version: 20.x
vscode-version: 1.108.0
- label: node22-vscode108
node-version: 22.x
vscode-version: 1.108.0
# VS Code 1.123 carries the Electron/Node 24 runtime that exposed the
# removed node:util helper regression fixed by this branch.
- label: node24-vscode123
node-version: 24.x
vscode-version: 1.123.0
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Symlink node to system path
run: |
NODE_BIN="$(which node)"
NPM_BIN="$(which npm)"
NPX_BIN="$(which npx)"
for dir in /usr/local/bin /usr/bin; do
sudo ln -sf "$NODE_BIN" "$dir/node"
sudo ln -sf "$NPM_BIN" "$dir/npm"
sudo ln -sf "$NPX_BIN" "$dir/npx"
done
echo "Symlinked node $(node --version) into /usr/local/bin and /usr/bin"
env -i /usr/bin/node --version

- name: Cache pnpm store
uses: actions/cache@v4
with:
path: ~/.local/share/pnpm/store
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 9.1.3
run_install: |
- recursive: true
args: [--frozen-lockfile, --strict-peer-dependencies]

- name: Download extension build artifact
uses: actions/download-artifact@v4
with:
name: extension-build-${{ github.sha }}
path: .

- name: Extract build artifacts
run: tar -xzf extension-build.tar.gz

- name: Install system dependencies for virtual display
run: |
sudo apt-get update
sudo apt-get install -y xvfb libgbm-dev libgtk-3-0 libnss3 libasound2t64 libxss1 libatk-bridge2.0-0 libatk1.0-0

- name: Run compatibility activation smoke
run: |
export PATH="$(dirname $(which node)):/usr/local/bin:/usr/bin:/bin:$PATH"
echo "PATH=$PATH"
xvfb-run --auto-servernum --server-args="-screen 0 1920x1080x24" \
node apps/vs-code-designer/out/test/run-e2e.js
env:
LA_E2E_SCENARIO: p40-nonlogicapp
E2E_VSCODE_VERSION: ${{ matrix.vscode-version }}
NODE_OPTIONS: --max-old-space-size=4096
TEMP: ${{ runner.temp }}
TMP: ${{ runner.temp }}
TMPDIR: ${{ runner.temp }}

- name: Upload test screenshots (always)
uses: actions/upload-artifact@v4
if: always()
with:
name: vscode-e2e-screenshots-compat-${{ matrix.label }}
path: |
${{ runner.temp }}/test-resources/screenshots/
test-resources/screenshots/
if-no-files-found: ignore
retention-days: 30

# Rollup status check so branch protection can require a single check name
# ("vscode-e2e-summary") regardless of how many scenarios we add later.
vscode-e2e-summary:
name: vscode-e2e-summary
needs: [setup-extension-build, setup-fixtures, vscode-e2e]
needs: [setup-extension-build, setup-fixtures, vscode-e2e, vscode-e2e-compat]
if: always()
runs-on: ubuntu-latest
steps:
Expand All @@ -528,10 +634,13 @@ jobs:
echo "setup-extension-build: ${{ needs.setup-extension-build.result }}"
echo "setup-fixtures: ${{ needs.setup-fixtures.result }}"
echo "vscode-e2e (matrix): ${{ needs.vscode-e2e.result }}"
echo "compat matrix: ${{ needs.vscode-e2e-compat.result }}"
if [ "${{ needs.setup-extension-build.result }}" != "success" ] || \
[ "${{ needs.setup-fixtures.result }}" != "success" ] || \
[ "${{ needs.vscode-e2e.result }}" != "success" ]; then
[ "${{ needs.vscode-e2e.result }}" != "success" ] || \
[ "${{ needs.vscode-e2e-compat.result }}" != "success" ]; then
echo "::error::One or more vscode-e2e jobs failed"
exit 1
fi
echo "All vscode-e2e jobs passed."

5 changes: 3 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ pnpm run vscode:designer:e2e:headless # Headless mode
```bash
cd apps/vs-code-designer
npx tsup --config tsup.e2e.test.config.ts
node src/test/ui/run-e2e.js
node out/test/run-e2e.js

# Run specific phases via E2E_MODE env var
E2E_MODE="createonly" # Phase 4.1: workspace creation
Expand All @@ -86,7 +86,7 @@ Key knowledge files for E2E tests:
- `apps/vs-code-designer/src/test/ui/SKILL.md` — Complete learning document (700+ lines)
- `apps/vs-code-designer/src/test/ui/designerHelpers.ts` — Shared designer test helpers
- `apps/vs-code-designer/src/test/ui/runHelpers.ts` — Shared debug/run test helpers
- `apps/vs-code-designer/src/test/ui/run-e2e.js` — Test launcher (7 phases)
- `apps/vs-code-designer/src/test/ui/run-e2e.ts` — Test launcher (7 phases)

### Code Quality
```bash
Expand Down Expand Up @@ -372,3 +372,4 @@ Each package has detailed guidance in `docs/ai-setup/packages/<name>.md`. Read t
## Squad Agents

This repo uses Squad for AI agent specialization. See `.squad/README.md` for the team roster and `.squad/routing.md` for work dispatch.

9 changes: 5 additions & 4 deletions apps/vs-code-designer/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ 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 src/test/ui/run-e2e.js
node out/test/run-e2e.js
```

Key files: `designerActions.test.ts`, `run-e2e.js`, `SKILL.md` (detailed learning document)
Key files: `designerActions.test.ts`, `run-e2e.ts`, `SKILL.md` (detailed learning document)

## Configuration

Expand Down Expand Up @@ -178,7 +178,7 @@ Each test runs in its own fresh VS Code session to avoid workspace-switch conten

11. **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.

12. **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 src/test/ui/run-e2e.js`) — don't wait for the user to ask. Report pass/fail results with any failure details.
12. **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

Expand All @@ -201,7 +201,7 @@ $env:E2E_MODE = "independentonly" # 4.0 + 4.8b + 4.11 — no Phase 4.1 d
$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 src/test/ui/run-e2e.js
node out/test/run-e2e.js
```

The four `createplus*` / `independentonly` modes are how `.github/workflows/vscode-e2e.yml` shards the suite across parallel runners. `full` remains the single-runner debug fallback.
Expand Down Expand Up @@ -239,3 +239,4 @@ Do NOT stop after pushing and tell the user "I'll wait" — proactively check an
## Graphify

Read `apps/vs-code-designer/src/graphify-out/GRAPH_REPORT.md` for structural context (god nodes, communities, surprising connections).

4 changes: 2 additions & 2 deletions apps/vs-code-designer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"test:e2e-cli": "vscode-test",
"test:e2e-cli:compile": "tsc -p ./tsconfig.e2e.json",
"pretest:e2e-cli": "pnpm run test:e2e-cli:compile",
"vscode:designer:e2e:ui": "cd ../.. && pnpm run build:extension && cd apps/vs-code-designer && pnpm run build:ui && node src/test/ui/run-e2e.js",
"vscode:designer:e2e:headless": "cd ../.. && pnpm run build:extension && cd apps/vs-code-designer && pnpm run build:ui && node src/test/ui/run-e2e.js"
"vscode:designer:e2e:ui": "cd ../.. && pnpm run build:extension && cd apps/vs-code-designer && pnpm run build:ui && node out/test/run-e2e.js",
"vscode:designer:e2e:headless": "cd ../.. && pnpm run build:extension && cd apps/vs-code-designer && pnpm run build:ui && node out/test/run-e2e.js"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ describe('createWorkflow', () => {

expect(createLogicAppWorkflow).toHaveBeenCalledWith(context, data, 'D:\\repoA\\SharedProject');
});

it('throws when webview sends unrecognized project name', async () => {
const folder = { name: 'ProjectA', uri: { fsPath: 'D:\\workspace\\ProjectA' }, index: 0 } as vscode.WorkspaceFolder;
(vscode.workspace as any).workspaceFolders = [folder];
Expand Down
5 changes: 2 additions & 3 deletions apps/vs-code-designer/src/app/utils/languageServerProtocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@ import path from 'path';
import * as fse from 'fs-extra';
import { assetsFolderName, lspDirectory } from '../../constants';
import { ext } from '../../extensionVariables';
import { lspSdkHashMarkerName, lspServerDirectoryName, lspServerHashMarkerName } from './languageServerProtocolConstants';
import { ensureRuntimeDependenciesPath } from './runtimeDependenciesPath';
import AdmZip from 'adm-zip';
import { createHash } from 'crypto';

const lspServerDirectoryName = 'LSPServer';
const lspServerHashMarkerName = '.lspserver-hash';
const lspSdkHashMarkerName = '.lspsdk-hash';
export { lspSdkHashMarkerName, lspServerDirectoryName, lspServerHashMarkerName };
const lockedFileErrorCodes = new Set(['EBUSY', 'EPERM']);
const lockedFileRetryDelayMs = 2000;
const lockedFileRetryAttempts = 3;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export const lspServerDirectoryName = 'LSPServer';
export const lspServerHashMarkerName = '.lspserver-hash';
export const lspSdkHashMarkerName = '.lspsdk-hash';
Loading
Loading