Teach PR testing skill to validate VS Code extension changes#17963
Teach PR testing skill to validate VS Code extension changes#17963adamint wants to merge 2 commits into
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 17963Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 17963" |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
694892b to
0e92a36
Compare
There was a problem hiding this comment.
Pull request overview
This PR updates the pr-testing agent guidance to cover VS Code extension PR testing from PR source/VSIX, and it also includes a sizeable set of Aspire Dashboard changes (assistant focus restoration flows, text visualizer format picker changes, and log resource-prefix contrast updates) along with new/updated dashboard component tests.
Changes:
- Expanded
.agents/skills/pr-testinginstructions to include VS Code extension-specific validation paths (source/VSIX,extension/build.*,yarn test, focusedyarn test:e2e, evidence capture). - Added dashboard assistant focus-restore tracking via a new internal
IAssistantDisplayContextimplemented byAIContextProvider, and wired it through DI + layout/dialog components. - Updated dashboard UI/tests: switched
TextVisualizerDialogformat UI toFluentSelect, added WCAG contrast-driven resource-prefix styling and validation tests, and added accessibility state (aria-pressed) for assistant feedback buttons.
Show a summary per file
| File | Description |
|---|---|
| tests/Shared/TestDialogService.cs | Implements additional dialog/panel async overloads used by newer dashboard tests. |
| tests/Shared/TestAIContextProvider.cs | Extends test AI provider to implement new assistant display context surface for focus restoration tests. |
| tests/Aspire.Dashboard.Components.Tests/Shared/FluentUISetupHelpers.cs | Registers TestAIContextProvider for both IAIContextProvider and IAssistantDisplayContext in test DI. |
| tests/Aspire.Dashboard.Components.Tests/Layout/MainLayoutTests.cs | Adds focus-restore tests for header dialogs and assistant sidebar/modal transitions. |
| tests/Aspire.Dashboard.Components.Tests/Controls/TextVisualizerDialogTests.cs | Updates tests for FluentSelect format picker and selection preservation across re-render. |
| tests/Aspire.Dashboard.Components.Tests/Controls/LogViewerTests.cs | Adds contrast validation + style generation tests for resource prefix rendering. |
| tests/Aspire.Dashboard.Components.Tests/Controls/AssistantChatTests.cs | Adds accessibility coverage for pressed-state on like/dislike buttons. |
| src/Aspire.Dashboard/wwwroot/css/app.css | Adds --accent-*-text variables to support theme-specific foreground contrast for prefixes. |
| src/Aspire.Dashboard/Model/Assistant/IAssistantDisplayContext.cs | Introduces internal assistant display context interface for focus/visibility coordination. |
| src/Aspire.Dashboard/Model/Assistant/AssistantDialogViewModel.cs | Adds internal return-focus element id tracking for assistant dialogs. |
| src/Aspire.Dashboard/Model/Assistant/AIContextProvider.cs | Implements IAssistantDisplayContext, adds focus target tracking, and routes modal dialog open via JS runtime for focus fixes. |
| src/Aspire.Dashboard/DashboardWebApplication.cs | DI: registers AIContextProvider and exposes it via both assistant interfaces. |
| src/Aspire.Dashboard/Components/Layout/MainLayout.razor.cs | Adds focus restoration plumbing for header dialogs and assistant sidebar hide/show lifecycle. |
| src/Aspire.Dashboard/Components/Layout/MainLayout.razor | Assigns stable IDs to launch buttons and passes return-focus target into assistant sidebar dialog. |
| src/Aspire.Dashboard/Components/Dialogs/TextVisualizerDialog.razor.cs | Updates selection handling to support FluentSelect and preserve selected option across parent re-renders. |
| src/Aspire.Dashboard/Components/Dialogs/TextVisualizerDialog.razor | Replaces menu-button based format picker with FluentSelect. |
| src/Aspire.Dashboard/Components/Dialogs/AssistantSidebarDialog.razor.cs | Uses IAssistantDisplayContext to control hide/expand behavior and focus target selection. |
| src/Aspire.Dashboard/Components/Dialogs/AssistantSidebarDialog.razor | Updates close handler to async method. |
| src/Aspire.Dashboard/Components/Dialogs/AssistantModalDialog.razor.cs | Adds optional JS-driven focus restoration on dialog close; routes sidebar switch via display context. |
| src/Aspire.Dashboard/Components/Controls/ResourcePrefixStyle.cs | Centralizes resource-prefix inline style generation including theme-variable foreground selection. |
| src/Aspire.Dashboard/Components/Controls/LogViewer.razor | Uses ResourcePrefixStyle for resource prefix styling instead of direct background-only styling. |
| src/Aspire.Dashboard/Components/Controls/AssistantChat.razor | Adds aria-pressed state to like/dislike buttons for accessibility. |
| .agents/skills/pr-testing/SKILL.md | Updates PR testing skill guidance to explicitly handle extension-only PR validation and evidence capture. |
Copilot's findings
- Files reviewed: 1/1 changed files
- Comments generated: 1
|
Tried this against an extension+CLI PR to make sure the new path gives useful output: #17955 ( Example run:
ASPIRE_EXTENSION_E2E_SHARD=discovery-configuration \
ASPIRE_EXTENSION_E2E_SPEC=out/test-e2e/test-e2e/discoveryConfiguration.e2e.test.js \
ASPIRE_EXTENSION_E2E_CLI_PATH=/tmp/aspire-pr17955-test/artifacts/bin/Aspire.Cli/Debug/net10.0/aspire \
corepack yarn run test:e2eThat failed with a useful extension-specific signal: The last exported extension state had A couple things I think we should fix in this PR before merging:
|
Description
This updates the PR testing skill so VS Code extension PRs are tested from the PR extension source or a VSIX built from that source. The dogfood CLI path is still used for product PRs, but extension-only PRs no longer get treated as blocked just because the CLI dogfood comment is missing or irrelevant to the extension changes.
The skill now calls out the extension-specific path: use a short checkout path, build with
extension/build.sh, runcorepack yarn run test, use focusedcorepack yarn run test:e2efor user-visible extension behavior, setASPIRE_EXTENSION_E2E_CLI_PATHwhen testing with a specific CLI, and capture Extension Host/E2E diagnostics as evidence.It also includes a concrete example report based on testing a VS Code extension PR, with artifact verification, build/unit validation, Extension Host E2E steps, diagnostics paths, and an overall result section.
Validation:
git diff --checkFixes # (issue)
Checklist
<remarks />and<code />elements on your triple slash comments?