Skip to content

[docs] Add VS Code Open terminal context menu to terminal docs - #1580

Merged
David Pine (IEvangelist) merged 6 commits into
microsoft:mainfrom
alistairmatthews:docs/vscode-open-terminal-action-18260-4c6001718f11f0ba
Aug 26, 2026
Merged

David Pine (IEvangelist) merged 6 commits into
microsoft:mainfrom
alistairmatthews:docs/vscode-open-terminal-action-18260-4c6001718f11f0ba

Conversation

@alistairmatthews

Copy link
Copy Markdown
Collaborator

Documents changes from microsoft/aspire#18260

Generated by PR Documentation Check for issue #18260 · 1.7K AIC · ⌖ 62.4 AIC · ⊞ 45.7K · ◷

The generation failed and the PR was saved as Issue #1282. I've recreated the original PR by using the saved bundle.

Fixes: #1282

…d resources

Documents the new 'Open terminal' right-click context menu action added
to the Aspire VS Code extension resource tree view in PR microsoft/aspire#18260.
Terminal-enabled resources (configured with WithTerminal()) now show an
Open terminal entry that runs 'aspire terminal attach <resource>' and
opens the session as an editor-style terminal tab.

Co-authored-by: Copilot <[email protected]>

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.

Pull request overview

Adds documentation for interactive terminal support, the VS Code Open terminal action, and Aspire 13.5 release notes.

Changes:

  • Adds a WithTerminal() guide.
  • Updates VS Code extension documentation.
  • Adds Aspire 13.5 release notes.

Review findings:

  • Replica examples should use generated replica IDs.
  • The TypeScript IInteractionService claim must be reconciled with the linked guide.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Summary
src/frontend/src/content/docs/whats-new/aspire-13-5.mdx Adds Aspire 13.5 features and release notes.
src/frontend/src/content/docs/get-started/aspire-vscode-extension.mdx Documents the new terminal context-menu action.
src/frontend/src/content/docs/app-host/withterminal.mdx Adds interactive terminal usage guidance and examples.
Suppressed comments (4)

src/frontend/src/content/docs/app-host/withterminal.mdx:104

  • This C# example applies WithReplicas to AddExecutable, but the Aspire.Hosting API surface in this checkout defines WithReplicas(this IResourceBuilder<ProjectResource>, int) (src/frontend/src/data/pkgs/Aspire.Hosting.13.4.0.json:23225-23240). Since AddExecutable returns an executable resource builder, this sample does not compile; use a project resource for the replica example or remove the replica call.
var agent = builder.AddExecutable("agent", "my-agent", ".")
    .WithReplicas(3)
    .WithTerminal();

src/frontend/src/content/docs/app-host/withterminal.mdx:118

  • The TypeScript replica sample has the same API mismatch: addNodeApp returns NodeAppResource, while the generated 13.4 Aspire API exposes withReplicas(replicas) only on ProjectResource (src/frontend/src/data/ts-modules/Aspire.Hosting.13.4.0.json:8245-8251). As shown, await agent.withReplicas(3) is not a valid call; use addProject for this example or omit the replica section for Node apps.
const agent = await builder
    .addNodeApp("agent", "./agent", "index.mjs");
await agent.withReplicas(3);
await agent.withTerminal();

src/frontend/src/content/docs/app-host/withterminal.mdx:2

  • This new AppHost page is not registered in the AppHost sidebar. The sidebar explicitly enumerates the AppHost pages and currently ends its resource-type entries at app-host/executable-resources (src/frontend/config/sidebar/docs.topics.ts:908-939), so the terminal guide is only reachable through the links added here. Add app-host/withterminal to that sidebar section so the guide is discoverable.
title: Interactive terminal sessions

src/frontend/src/content/docs/app-host/withterminal.mdx:181

  • This guide introduces the new aspire terminal ps and aspire terminal attach CLI surface, but the CLI command index at src/frontend/src/content/docs/reference/cli/commands/aspire.mdx:45-75 has no terminal entry and there is no terminal command reference page. Users browsing the CLI reference will not discover these commands; add the command reference/index entry or link to the new command documentation here.
## See also

- [Executable resources](/app-host/executable-resources/)
- [Resource lifetimes](/app-host/resource-lifetimes/)
- [Aspire CLI reference](/reference/cli/overview/)

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@IEvangelist David Pine (IEvangelist) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Documentation accuracy review

Source of truth: microsoft/aspire main at 022b3abf8ac7a42909c6b4960a10542ce5625c7d
Claims: 10 total — 10 verified, 0 verified-with-nuance, 0 unverifiable, 0 contradicted
Doc test: PR head f96116943b076a3fd32008a26beb898a7889c4a1; 2 affected routes exercised; 0 critical issues, 0 warnings

Phase A — Claim verification

No blocking or advisory findings.

Verified claims and source evidence (10)
ID PR location Verified claim Source evidence
C-01 with-terminal.mdx:187 WithTerminal() resources receive an Open terminal right-click action. The localized label is Open terminal, the context-menu item is gated by canOpenTerminal, and the resource context adds that marker only when terminal support is enabled (treePresentation.ts:100-126).
C-02 with-terminal.mdx:187 Selecting the action runs aspire terminal attach <resource>. openResourceTerminal() builds ['terminal', 'attach', resourceName].
C-03 with-terminal.mdx:187 The command opens in a VS Code editor-area terminal tab. The action requests terminalTarget: 'editor', which selects createAspireEditorTerminal and TerminalLocation.Editor.
C-04 with-terminal.mdx:189 Replica-aware attachment adds --replica <index>. The extension reads the replica index and appends --replica; the property lookup is defined in getTerminalReplicaIndex().
C-05 with-terminal.mdx:189 --apphost is added when the extension can resolve the AppHost path. openResourceTerminal() conditionally appends --apphost, using the resource/AppHost/workspace path resolver in the same provider.
C-06 with-terminal.mdx:189 Passing --apphost avoids requiring the user to identify the AppHost separately. The attach command exposes the --apphost / --project option and supplies it to AppHost connection resolution.
C-07 with-terminal.mdx:192 The menu action is visible only when terminal.enabled is true. isTerminalEnabled() controls the canOpenTerminal context marker used by the menu gate.
C-08 with-terminal.mdx:192 Calling WithTerminal() causes terminal.enabled = "true" to be published. AddTerminalProperties() detects TerminalAnnotation and emits the enabled property.
C-09 with-terminal.mdx:192 Without WithTerminal(), the menu action is absent. Without TerminalAnnotation, snapshot enrichment returns without adding terminal properties, so the context-menu gate is not satisfied.
C-10 aspire-vscode-extension.mdx:90 The resource context menu can open an interactive terminal for WithTerminal() resources. Verified by the same command-registration, context-gating, and terminal-snapshot chain above; the new /app-host/with-terminal/ cross-reference also resolves successfully.

Phase B — Doc-tester results

Documentation Test Report

Focus Area: VS Code Open terminal additions
Date: 2026-08-26
Tester: doc-tester agent
PR ref served: f96116943b076a3fd32008a26beb898a7889c4a1
Local server: http://localhost:4323/

Routes and sections exercised:

  • /app-host/with-terminal/#access-terminals-from-vs-code
  • /get-started/aspire-vscode-extension/ — The Aspire view section and its new WithTerminal() link

Summary

Category Passed Failed Warnings
Content rendering and clarity 2 0 0
Code examples 0 0 0
CLI commands 0 0 0
Links and section navigation 2 0 0

Critical Issues

None.

Warnings

None.

Passed Checks

  • The new Access terminals from VS Code section renders completely, including inline command/flag formatting and the note.
  • The new section appears in the page table of contents, and its anchor navigates to #access-terminals-from-vs-code.
  • The VS Code extension page renders the new WithTerminal() cross-reference with the required site-relative, trailing-slash URL.
  • Clicking that cross-reference loads /app-host/with-terminal/ successfully with the expected page title and content.
  • The added text is understandable in context without relying on prior Aspire knowledge.

Recommendations

None.

Knowledge Gaps

None. Phase B intentionally remained source-blind. The VS Code extension action itself was not launched from the local docs site; its behavior is independently covered by Phase A's source verification.

@IEvangelist
David Pine (IEvangelist) enabled auto-merge (squash) August 26, 2026 12:25
@IEvangelist
David Pine (IEvangelist) merged commit 9dff3dd into microsoft:main Aug 26, 2026
10 checks passed
@alistairmatthews
Alistair Matthews (alistairmatthews) deleted the docs/vscode-open-terminal-action-18260-4c6001718f11f0ba branch August 26, 2026 13:54
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.

[docs] Add VS Code Open terminal context menu to terminal docs

3 participants