Add Aspire AppHosts canvas extension - #57
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6d3152cb-2f04-486f-b615-407b6d2ad0de
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6d3152cb-2f04-486f-b615-407b6d2ad0de
There was a problem hiding this comment.
🟡 Changes recommended
There are confirmed correctness/security issues in the provider code (dashboard URL base-path stripping and request-body limit handling) that should be addressed before approval.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds a new aspire-app-model canvas extension that provides a Workspace/Global Aspire AppHost workbench (resource board, endpoints, health, commands, dashboard/terminal actions) while keeping sensitive AppHost data provider-side, and introduces tests to validate both the app-model contract and extension publishing mirroring.
Changes:
- Introduce
aspire-app-modelextension provider + shared app-model library for CLI projection/sanitization and tree building. - Add canvas UI assets (HTML/CSS) and comprehensive Node tests for app-model behavior and security boundaries.
- Update repo README and add a test to ensure the published plugin mirrors all runtime extension files.
File summaries
| File | Description |
|---|---|
| tests/plugin-extension-mirror.test.mjs | Verifies published plugin extension mirrors match runtime sources (files + link targets). |
| tests/aspire-app-model.test.mjs | Adds extensive tests covering sanitization, URL building, tree shaping, concurrency, and provider/UI contract. |
| README.md | Documents the new aspire-app-model extension. |
| extensions/aspire-app-model/ui/styles.css | Adds canvas UI styling for the AppHost workbench. |
| extensions/aspire-app-model/ui/index.html | Adds the canvas renderer HTML shell for the workbench. |
| extensions/aspire-app-model/README.md | Documents the extension’s data contract, security boundary, and UX behavior. |
| extensions/aspire-app-model/lib/app-model.mjs | Implements CLI payload normalization, sanitization/redaction, URL building, tree building, and concurrency helpers. |
| extensions/aspire-app-model/extension.mjs | Implements the provider-side canvas server, request auth, polling/refresh, operations, and canvas/tool wiring. |
Review details
Suppressed comments (1)
extensions/aspire-app-model/extension.mjs:179
- If readJsonBody() destroys the request after exceeding MAX_BODY_BYTES, the stream will likely emit an 'error' event. The current
req.once("error", reject)would then reject with that stream error (missing the 413 status), which would surface as a 400 in the handler. Ignore request errors after the size limit has already been hit so the 413 path remains authoritative.
req.once("error", reject);
- Files reviewed: 15/15 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6d3152cb-2f04-486f-b615-407b6d2ad0de
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6d3152cb-2f04-486f-b615-407b6d2ad0de
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6d3152cb-2f04-486f-b615-407b6d2ad0de
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6d3152cb-2f04-486f-b615-407b6d2ad0de
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6d3152cb-2f04-486f-b615-407b6d2ad0de
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6d3152cb-2f04-486f-b615-407b6d2ad0de
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Harden context ownership, snapshot ordering, command-input authority and secret handling. Fix responsive, accessibility, graph and interaction regressions, and wire the complete regression suites into CI. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Summary
aspire-apphostscanvas: a Workspace/Global AppHost workbench with official Aspire branding, stable AppHost switching, and responsive resource cardsname · host:portendpoints, commands, child-resource ownership, and explicit AppHost operations visible without recreating the VS Code explorerSupports microsoft/aspire#19817.
Review fixes
.cmd/.batoverrides fail explicitly with executable guidance rather than altering arguments.npm testscript and triggers for extension/mirror changes. Seven malformed Aspireify mirror symlink targets have their trailing newlines removed while preserving symlink modes.Screenshots
These captures show the preceding workbench iteration; the review fixes above additionally refine branding, narrow layouts, relationships, and command input handling.
Ready to run
Running resource workbench
The neutral six-resource fixture demonstrates content-driven card heights: resources grow only for the endpoints, health checks, and commands they actually contain.
Resource graph
Dependencies and parents flow toward the resources that use them; combined semantics share one labeled connector, and all editing and operations remain in Resources.
Diagnostic handoff
The resource menu opens details, console logs, structured logs, traces, and metrics in the authenticated Dashboard through GitHub Copilot's integrated browser.
Compact layout
Validation
npm testruns still hit the pre-existing WindowsGIT_CONFIG_GLOBAL=NULfailure in the two telemetry/bundle test files; the prior mirror newline failure is fixed.session.resumeerror: “Hook processor is not configured.” Synthetic boundary tests are not presented as a successful native-host run.