Skip to content

Render AppHost summary flush in extension host#16801

Closed
adamint wants to merge 1 commit into
microsoft:mainfrom
adamint:dev/adamint/cli-extension-apphost-summary-layout
Closed

Render AppHost summary flush in extension host#16801
adamint wants to merge 1 commit into
microsoft:mainfrom
adamint:dev/adamint/cli-extension-apphost-summary-layout

Conversation

@adamint
Copy link
Copy Markdown
Member

@adamint adamint commented May 5, 2026

Description

Adjusts the AppHost startup summary layout when aspire run is hosted by the VS Code extension.

The terminal-oriented summary uses left padding, right-aligned labels, and blank separator rows for readability. In the extension debug console those choices show up as unwanted indentation and extra blank lines. This change keeps the existing terminal layout unchanged, but renders the extension-host summary flush and single-spaced:

AppHost: apphost.ts
Logs: /Users/.../cli_....log

Validation:

  • ./dotnet.sh build src/Aspire.Cli/Aspire.Cli.csproj /p:SkipNativeBuild=true

Fixes # (issue)

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?

Copilot AI review requested due to automatic review settings May 5, 2026 21:25
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 16801

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 16801"

@adamint
Copy link
Copy Markdown
Member Author

adamint commented May 5, 2026

Superseded by #16795, which now includes this focused slice.

@adamint adamint closed this May 5, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adjusts the aspire run AppHost startup summary rendering to avoid terminal-centric formatting (left padding, right-aligned labels, blank separator rows) when running under the VS Code extension host.

Changes:

  • Introduces a shared LabelMarkup(...) helper to switch between right-aligned labels (terminal) and non-aligned labels (extension host).
  • Removes blank separator rows and outer padding when isExtensionHost is true, while preserving the existing terminal layout.

Comment on lines 514 to 516
var longestLabelLength = labels.Max(s => s.Length) + 1; // +1 for colon

grid.Columns[0].Width = longestLabelLength;
Comment on lines +518 to +522
// In the extension's debug console, right-aligned labels and the surrounding padding
// render as visible left indentation, and the empty separator rows show up as blank
// lines that just push real content further down. Use a flush, single-spaced layout
// for the extension and keep the spaced-out look only for direct terminal output.
IRenderable LabelMarkup(string label)
@microsoft-github-policy-service microsoft-github-policy-service Bot added this to the 13.4 milestone May 5, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 5, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants