fix(vscode): Fix 'create unit test' and 'create unit test from run' in v2 designer#9398
fix(vscode): Fix 'create unit test' and 'create unit test from run' in v2 designer#9398andrew-eldridge wants to merge 3 commits into
Conversation
🤖 AI PR Validation ReportPR Review ResultsThank you for your submission! Here's detailed feedback on your PR title and body compliance:✅ PR Title
✅ Commit Type
✅ Risk Level
✅ What & Why
✅ Impact of Change
✅ Test Plan
|
| Section | Status | Recommendation |
|---|---|---|
| Title | ✅ | No changes needed |
| Commit Type | ✅ | No changes needed |
| Risk Level | ✅ | Medium is correct |
| What & Why | ✅ | No changes needed |
| Impact of Change | ✅ | Optional: note temporary handler |
| Test Plan | ✅ | Unit tests present |
| Contributors | Credit PM/designer if any | |
| Screenshots/Videos | Add UI screenshot if visual |
All required checks pass — this PR is compliant and good to merge. Address the optional warnings if relevant.
Powered by: Copilot CLI (claude-opus-4.8) | Last updated: Fri, 17 Jul 2026 16:56:09 GMT
📊 Coverage CheckThe following changed files need attention:
Please add tests for the uncovered files before merging. |
There was a problem hiding this comment.
Pull request overview
Updates the VS Code V2 designer command bar to match V1’s unit test creation capabilities by re-enabling “Create unit test” and scoping “Create unit test from run” to the monitoring view context.
Changes:
- Reintroduces the V2 “Create unit test” action via a React Query mutation and adds it to the overflow menu (designer view only).
- Restricts “Create unit test from run” to monitoring view when
runIdis present (local only). - Adds/extends unit tests around unit test menu item visibility and enables the extension’s local designer panel to handle
createUnitTestFromRun.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| apps/vs-code-react/src/app/designer/DesignerCommandBar/indexV2.tsx | Adds V2 “Create unit test” mutation + menu item; gates “from run” to monitoring view with runId. |
| apps/vs-code-react/src/app/designer/DesignerCommandBar/test/indexV2.test.tsx | Adds unit tests for unit test menu item visibility/disabled state and “from run” click routing. |
| apps/vs-code-designer/src/app/commands/workflows/openDesigner/openDesignerForLocalProject.ts | Adds handling for ExtensionCommand.createUnitTestFromRun in the local designer panel message router. |
Commit Type
Risk Level
What & Why
Adds 'Create unit test' option to menu in v2 designer and ensures 'Create unit test from run' option only appears when in monitoring view (accessed through overview).
Impact of Change
Test Plan
Contributors
@andrew-eldridge