Skip to content

Add Aspire AppHosts canvas extension - #57

Open
Ella Hathaway (ellahathaway) wants to merge 12 commits into
mainfrom
ellahathaway-aspire-app-visualization
Open

Add Aspire AppHosts canvas extension#57
Ella Hathaway (ellahathaway) wants to merge 12 commits into
mainfrom
ellahathaway-aspire-app-visualization

Conversation

@ellahathaway

@ellahathaway Ella Hathaway (ellahathaway) commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add the aspire-apphosts canvas: a Workspace/Global AppHost workbench with official Aspire branding, stable AppHost switching, and responsive resource cards
  • keep lifecycle state, health, identifiable name · host:port endpoints, commands, child-resource ownership, and explicit AppHost operations visible without recreating the VS Code explorer
  • add a read-only Graph tab for Parent, Reference, and WaitFor relationships; combined connectors have selectable, sanitized Copilot context, and filtered summaries distinguish hidden relationships from none declared
  • provide canonical resource-name copying, integrated endpoint browsing, resource details, console logs, structured logs, traces, metrics, and supported terminal attachment
  • preserve explicit Run, Stop, Deploy, Publish, pipeline-step, source, and authenticated Dashboard actions with confirmations and serialized execution
  • keep full AppHost paths, Dashboard login tokens, arbitrary properties, connection data, environment values, and command secrets provider-side

Supports microsoft/aspire#19817.

Review fixes

  • Selected context includes its owning AppHost, stable resource/relationship identity, and fresh or retained-stale status. Duplicate host labels use bounded directory hints plus stable IDs rather than changing ordinals.
  • Monotonic content revisions prevent late HTTP replies from overwriting newer SSE snapshots; freshness updates apply only to the corresponding revision.
  • Dynamic command metadata is authoritative only for matching dependency values and successful loads. Pending/failed loads block Run immediately; defaults, live schema changes, typed argument normalization, and discarded secrets are reconciled. Authority conflicts expose Retry inputs without automatically rerunning commands.
  • Submitted secrets are redacted before output truncation, including interrupted output. Windows .cmd/.bat overrides fail explicitly with executable guidance rather than altering arguments.
  • Pipeline cancellation bypasses required-field validation, dialogs have accessible names and focus restoration, and form errors are associated with their controls.
  • Narrow layouts use a compact More menu, preserve readable target/parent identity, and avoid horizontal overflow. Resource inspection and copying are separate controls; standalone dark mode respects explicit host theme tokens.
  • Concurrent opens share one listener; close-during-open and failed-listen cleanup are covered.
  • CI now runs root and nested Aspireify suites from one npm test script 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

Aspire AppHosts ready-to-run state

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.

Aspire AppHosts running resource board

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.

Aspire AppHosts resource graph

Diagnostic handoff

The resource menu opens details, console logs, structured logs, traces, and metrics in the authenticated Dashboard through GitHub Copilot's integrated browser.

Aspire AppHosts diagnostic actions

Compact layout

Aspire AppHosts compact responsive layout

Validation

  • 84 focused tests pass across the AppHosts model, provider, renderer, CI workflow, and both plugin-mirror suites. Provider coverage includes 14 subprocess boundary scenarios; renderer regressions execute the shipped JavaScript and HTML through a dependency-free VM/DOM adapter.
  • Chromium synthetic-source smoke covers delayed HTTP versus newer SSE, dynamic-input pending/failure/retry, canonical copying and details handoff, relationship context, filtered counts, pipeline cancellation, duplicate target identity, long parents, 320px coarse-pointer and 960px layouts, and host-token light/dark priority.
  • The final integration review's additional default/schema recovery finding was corrected and independently rechecked.
  • Full npm test runs still hit the pre-existing Windows GIT_CONFIG_GLOBAL=NUL failure in the two telemetry/bundle test files; the prior mirror newline failure is fixed.
  • Native loading of an exact-source session-only copy remains blocked by this session's external session.resume error: “Hook processor is not configured.” Synthetic boundary tests are not presented as a successful native-host run.
  • No real Aspire start/stop/deploy operations were performed for these fixes. Temporary provider copies, preview servers, browser pages, and artifacts were removed.

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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-model extension 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.

Comment thread extensions/aspire-app-model/extension.mjs
Comment thread extensions/aspire-app-model/lib/app-model.mjs
Comment thread extensions/aspire-app-model/extension.mjs
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants