Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Jul 11, 2025

This PR makes parameters and connection strings visible in the Aspire dashboard by removing the IsHidden = true settings that were previously hiding them by default.

Background

Previously, parameters and connection strings were hidden from the dashboard because:

  1. Individual resources added hidden parameters that cluttered the view
  2. The dashboard lacked the ability to show hierarchy

Now that the dashboard supports hierarchy display, these resources should be visible as they contain valuable configuration properties that are useful to developers.

Changes Made

  1. ParameterResourceBuilderExtensions.cs: Removed IsHidden = true from parameter resources - they are now visible by default
  2. ConnectionStringBuilderExtensions.cs: Removed IsHidden = true from connection string resources - they are now visible by default
  3. ParameterProcessor.cs: Removed IsHidden = false from error handling since resources are visible by default
  4. Tests: Updated existing test and added new test to verify the new visibility behavior

Before vs After

Before: Parameters and connection strings only appeared in the dashboard when there were errors or missing values, making it look odd and providing limited visibility into configuration.

After: Parameters and connection strings are always visible in the dashboard, showing their valuable properties and providing better insight into the application's configuration.

All existing tests pass, confirming the changes don't break existing functionality while providing the intended improved visibility.

Fixes #10335.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@Copilot Copilot AI changed the title [WIP] Parameters and connection strings should be visible in the dashboard Make parameters and connection strings visible in dashboard Jul 11, 2025
@Copilot Copilot AI requested a review from davidfowl July 11, 2025 15:53
Copilot finished work on behalf of davidfowl July 11, 2025 15:53
@davidfowl davidfowl requested a review from eerhardt July 11, 2025 17:50
@davidfowl davidfowl marked this pull request as ready for review July 11, 2025 17:51
@Copilot Copilot AI review requested due to automatic review settings July 11, 2025 17:51
@davidfowl davidfowl requested a review from mitchdenny as a code owner July 11, 2025 17:51
Copy link
Contributor

@Copilot 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

This PR removes default hiding of parameters and connection strings so they appear in the Aspire dashboard by default.

  • Removed IsHidden = true from parameter and connection string builders
  • Removed explicit IsHidden = false in error handling for parameters
  • Updated/add tests to assert that parameters and connection strings are visible by default

Reviewed Changes

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

File Description
src/Aspire.Hosting/ParameterResourceBuilderExtensions.cs Removed default hiding of parameter resources
src/Aspire.Hosting/ConnectionStringBuilderExtensions.cs Removed default hiding of connection string resources
src/Aspire.Hosting/Orchestrator/ParameterProcessor.cs No longer forces parameters visible only on error
tests/Aspire.Hosting.Tests/AddParameterTests.cs Renamed parameter test, added connection-string visibility test
Comments suppressed due to low confidence (2)

tests/Aspire.Hosting.Tests/AddParameterTests.cs:14

  • [nitpick] The class now contains tests for both parameters and connection strings; consider renaming it to something like ResourceVisibilityTests for clarity and separation of concerns.
public class AddParameterTests

src/Aspire.Hosting/ParameterResourceBuilderExtensions.cs:164

  • Consider setting an explicit initial state (e.g. State = KnownResourceStates.Waiting) for parameter snapshots to match the pattern used in ConnectionStringResource builders.
            ResourceType = KnownResourceTypes.Parameter,

@davidfowl davidfowl added this to the 9.4 milestone Jul 11, 2025
await _notificationService.PublishUpdateAsync(connectionStringResource, s => s with
{
State = new(KnownResourceStates.Active, KnownResourceStateStyles.Info),
State = new(KnownResourceStates.Active, KnownResourceStateStyles.Success),
Copy link
Member

Choose a reason for hiding this comment

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

was this just a mistake previously?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, I changed the previous ones to Success in this PR #10235 for parameters.

@davidfowl davidfowl merged commit 19bfc33 into main Jul 11, 2025
276 checks passed
@davidfowl davidfowl deleted the copilot/fix-10335 branch July 11, 2025 19:33
@davidfowl
Copy link
Member

/backport to release/9.4

@github-actions
Copy link
Contributor

@davidfowl
Copy link
Member

Interesting side effect of this change. Parameters are not "related resources" anywhere it seems. The graph view shows them as islands 😄

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.

Parameters and connection strings should be visible in the dashboard

3 participants