Skip to content

make non-http panel links non-clickable#15514

Open
adamint wants to merge 2 commits intomicrosoft:mainfrom
adamint:dev/adamint/show-non-http-endpoints-differently
Open

make non-http panel links non-clickable#15514
adamint wants to merge 2 commits intomicrosoft:mainfrom
adamint:dev/adamint/show-non-http-endpoints-differently

Conversation

@adamint
Copy link
Member

@adamint adamint commented Mar 24, 2026

Description

Fixes #15472

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?

@adamint adamint requested a review from maddymontaquila March 24, 2026 00:42
@adamint adamint self-assigned this Mar 24, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 24, 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 -- 15514

Or

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

@adamint adamint marked this pull request as ready for review March 24, 2026 00:42
Copilot AI review requested due to automatic review settings March 24, 2026 00:42
Copy link
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

Updates the Aspire VS Code extension’s running App Hosts tree so that only HTTP/HTTPS endpoints behave like “openable” links, preventing non-HTTP endpoints (e.g., SQL/TCP) from showing as clickable browser targets.

Changes:

  • Make endpoint tree items clickable (and show “open” affordances) only when the URL is HTTP/HTTPS.
  • Add a separate context value for non-HTTP endpoints and adjust the context-menu “Copy endpoint URL” visibility to include them.

Reviewed changes

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

File Description
extension/src/views/AspireAppHostTreeProvider.ts Conditionally assigns link icon + vscode.open command only for HTTP/HTTPS endpoints; adds non-HTTP endpoint context value.
extension/package.json Broadens the “Copy endpoint URL” context-menu visibility to match both HTTP and non-HTTP endpoint items.

@github-actions
Copy link
Contributor

Re-running the failed jobs in the CI workflow for this pull request because 1 job was identified as retry-safe transient failures in the CI run attempt.
GitHub was asked to rerun all failed jobs for that attempt, and the rerun is being tracked in the rerun attempt.
The job links below point to the failed attempt jobs that matched the retry-safe transient failure rules.

arguments: [vscode.Uri.parse(url)]
};

const isHttpUrl = url.startsWith('http://') || url.startsWith('https://');
Copy link
Member

Choose a reason for hiding this comment

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

Does this need to worry about case? i.e. HTTP://

Copy link
Member Author

Choose a reason for hiding this comment

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

Yea, it should be case insensitive. Updated

@adamint adamint requested a review from JamesNK March 24, 2026 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

VS Code extension shouldn't offer to open non HTTP resources in browser

3 participants