Skip to content

Document WithCommand return-value payloads (Text/Json/Markdown) for Aspire 13.3#1161

Open
IEvangelist with Copilot wants to merge 1 commit into
release/13.5from
copilot/133-document-command-return-values
Open

Document WithCommand return-value payloads (Text/Json/Markdown) for Aspire 13.3#1161
IEvangelist with Copilot wants to merge 1 commit into
release/13.5from
copilot/133-document-command-return-values

Conversation

Copilot AI commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Aspire 13.3 added support for returning payload data from resource commands, including Markdown rendered in the dashboard response viewer. This PR updates the relevant docs to clearly describe the API contract, dashboard behavior, and release-note messaging.

  • Custom resource commands docs

    • Renames the core section to “Returning a result from a command”.
    • Adds a focused Markdown return example using CommandResultData with CommandResultFormat.Markdown.
    • Aligns wording around ExecuteCommandResult.Data and result formats.
  • Dashboard docs

    • Adds a notification-center note clarifying that Markdown command results are rendered as formatted Markdown in the text visualizer.
    • Reuses the existing response-view screenshot context to anchor the behavior.
  • 13.3 changelog

    • Updates the 13.3 AppHost entry to explicitly call out structured command payloads (Text, Json, Markdown) and the CommandResults.Success(string, CommandResultData) usage pattern.
builder.AddProject<Projects.MyService>("myservice")
    .WithCommand(
        name: "migrate-database",
        displayName: "Migrate Database",
        executeCommand: _ =>
        {
            var markdown = """
                # ⚙️ Database Migration Summary
                | Table | Result |
                |---|---|
                | Customers | ✅ 1,200 rows |
                """;

            return Task.FromResult(CommandResults.Success(
                "Database migrated.",
                new CommandResultData
                {
                    Value = markdown,
                    Format = CommandResultFormat.Markdown
                }));
        });

Copilot AI linked an issue Jun 2, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Document command return values in migration summary Document WithCommand return-value payloads (Text/Json/Markdown) for Aspire 13.3 Jun 2, 2026
Copilot AI requested a review from IEvangelist June 2, 2026 02:49
@IEvangelist IEvangelist marked this pull request as ready for review June 30, 2026 08:38
@IEvangelist IEvangelist requested a review from JamesNK as a code owner June 30, 2026 08:38
Copilot AI review requested due to automatic review settings June 30, 2026 08:38

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

This PR updates Aspire 13.3 documentation to describe the new “structured command result payloads” contract (Text/Json/Markdown), including how results flow into the dashboard notification center and how to return Markdown output from custom resource commands.

Changes:

  • Updates the Aspire 13.3 “What’s new” entry to explicitly call out ExecuteCommandResult.Data payloads and Markdown-capable results.
  • Renames/reshapes the custom resource commands docs section to focus on returning structured results and adds a Markdown return example.
  • Clarifies dashboard behavior for Markdown command results in the text visualizer and tightens cross-link wording.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
src/frontend/src/content/docs/whats-new/aspire-13-3.mdx Updates release-note wording to call out structured command payloads and the helper overload used to return them.
src/frontend/src/content/docs/fundamentals/custom-resource-commands.mdx Renames the structured-output section and adds a Markdown return example for CommandResultData / CommandResultFormat.Markdown.
src/frontend/src/content/docs/dashboard/explore.mdx Adds a note that Markdown results are rendered in the text visualizer and refines the link description to the commands docs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/frontend/src/content/docs/fundamentals/custom-resource-commands.mdx Outdated
Comment thread src/frontend/src/content/docs/whats-new/aspire-13-3.mdx Outdated
Comment thread src/frontend/src/content/docs/dashboard/explore.mdx Outdated
Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>

Address review feedback: add TypeScript Markdown example, fix heading style, imp
@JamesNK JamesNK force-pushed the copilot/133-document-command-return-values branch from 8667b03 to 2275d76 Compare July 10, 2026 07:02
@JamesNK JamesNK changed the base branch from main to release/13.5 July 10, 2026 07:03
@JamesNK

JamesNK commented Jul 10, 2026

Copy link
Copy Markdown
Member

Changed to release/13.5 because the sample includes TS which is new.

@JamesNK JamesNK requested a review from Copilot July 10, 2026 07:04

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

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

@aspire-repo-bot

Copy link
Copy Markdown
Contributor

Frontend HTML artifact ready

The latest frontend build uploaded the frontend-dist artifact for PR #1161. Use the VS Code button below to open this PR with GitHub Artifacts Explorer and browse the built HTML locally.

VS Code: Open PR #1161 artifacts

This comment updates automatically when a new frontend build artifact is uploaded.

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.

[13.3] Document command return values

4 participants