Skip to content

Dashboard: Parameters page follow-ups - clickable set value, warning badge, filter by resource#16117

Merged
adamint merged 11 commits intomicrosoft:mainfrom
adamint:dev/adamint/parameters-tab-improvements
Apr 24, 2026
Merged

Dashboard: Parameters page follow-ups - clickable set value, warning badge, filter by resource#16117
adamint merged 11 commits intomicrosoft:mainfrom
adamint:dev/adamint/parameters-tab-improvements

Conversation

@adamint
Copy link
Copy Markdown
Member

@adamint adamint commented Apr 13, 2026

Description

Follow-up improvements to the Parameters page in the Aspire Dashboard, addressing items from issue #13430.

Changes

Feature 1: Clickable "Value not set" to set parameter values

  • Unresolved parameters show "Value not set" as a clickable button (styled as inline link) that triggers the SetParameterCommand dialog
  • Uses a native <button> for proper keyboard accessibility (Enter and Space activation)
  • Uses @onclick:stopPropagation to prevent opening the resource details view

Feature 2: Filter parameters by resource ("View parameters")

  • "View parameters (N)" menu item on resources that have parameter relationships, showing the count
  • Available in both the Actions column menu and right-click context menu
  • Clicking instantly switches to the Parameters tab filtered to only that resource's parameters
  • Uses direct in-page state change for instant tab switching
  • Filter indicator button in the toolbar showing the resource name with a dismiss (×) icon
  • Reuses the existing resource query parameter for deep-linking when combined with view=Parameters
  • Resource type filter section hidden on Parameters tab (irrelevant since all entries are type "Parameter")

Graph improvements

  • Parameter nodes no longer show "No endpoints" text
  • Icon centered vertically in the circle bubble when no endpoint text is present
  • Fixed trimText null crash when endpoint text is null

Other improvements

  • autocomplete="off" on text input in parameter dialog to prevent browser autofill suggestions
  • Stress AppHost: Added api-key and db-connection-string parameters wired to stress-apiservice for testing

Fixes #13430

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
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
    • No
  • Does the change require an update in our Aspire docs?
    • Yes
    • No

…r by resource, graph improvements

- Feature 1: Make 'Value not set' a clickable link that triggers the SetParameterCommand
- Feature 2: Add warning badge on Parameters tab showing count of unresolved parameters
- Feature 3: 'View parameters (N)' menu item on resources with parameter relationships
  - Filters parameters by related resource with toolbar indicator and clear button
  - Direct in-page callback for instant tab switching (no URL navigation delay)
- Graph: Hide endpoints for parameter nodes and center the icon
- Graph: Fix null endpoint text crash in trimText function
- Filter: Hide resource types filter section on Parameters tab
- Dialog: Add autocomplete=off to prevent browser suggestions in parameter input
- Stress AppHost: Add api-key and db-connection-string parameters for testing
- Tests: Add ResourceGraphMapper and ResourceMenuBuilder tests
- Skill: Update dashboard E2E testing skill to store evidence outside repo

Fixes microsoft#13430
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 13, 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 -- 16117

Or

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

@adamint adamint marked this pull request as ready for review April 13, 2026 15:35
@adamint adamint requested a review from JamesNK as a code owner April 13, 2026 15:35
Copilot AI review requested due to automatic review settings April 13, 2026 15:35
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

This PR adds follow-up UX improvements to the Aspire Dashboard Parameters experience by enabling in-grid value setting for unresolved parameters, adding a resource-scoped parameters filter (including a “View parameters (N)” menu entry), and refining resource-graph rendering for parameter nodes.

Changes:

  • Add a “View parameters (N)” action for resources that reference parameter resources, and wire it to filter the Parameters view to a single resource.
  • Make “Value not set” clickable (when supported) to launch the parameter set command; disable browser autofill in the parameter dialog input.
  • Hide endpoint text for parameter nodes in the resource graph and adjust icon positioning accordingly.

Reviewed changes

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

Show a summary per file
File Description
tests/Aspire.Dashboard.Tests/Model/ResourceMenuBuilderTests.cs Adds unit coverage for the new “View parameters” menu item visibility logic.
tests/Aspire.Dashboard.Tests/Model/ResourceGraphMapperTests.cs Adds unit coverage that parameter nodes have no endpoint text/url in the graph DTO.
src/Aspire.Dashboard/wwwroot/js/app-resourcegraph.js Hides endpoint UI when endpointText is absent and recenters the icon.
src/Aspire.Dashboard/Resources/xlf/Resources.zh-Hant.xlf Adds new localized string entries for parameter filter clear + view-related-parameters.
src/Aspire.Dashboard/Resources/xlf/Resources.zh-Hans.xlf Adds new localized string entries for parameter filter clear + view-related-parameters.
src/Aspire.Dashboard/Resources/xlf/Resources.tr.xlf Adds new localized string entries for parameter filter clear + view-related-parameters.
src/Aspire.Dashboard/Resources/xlf/Resources.ru.xlf Adds new localized string entries for parameter filter clear + view-related-parameters.
src/Aspire.Dashboard/Resources/xlf/Resources.pt-BR.xlf Adds new localized string entries for parameter filter clear + view-related-parameters.
src/Aspire.Dashboard/Resources/xlf/Resources.pl.xlf Adds new localized string entries for parameter filter clear + view-related-parameters.
src/Aspire.Dashboard/Resources/xlf/Resources.ko.xlf Adds new localized string entries for parameter filter clear + view-related-parameters.
src/Aspire.Dashboard/Resources/xlf/Resources.ja.xlf Adds new localized string entries for parameter filter clear + view-related-parameters.
src/Aspire.Dashboard/Resources/xlf/Resources.it.xlf Adds new localized string entries for parameter filter clear + view-related-parameters.
src/Aspire.Dashboard/Resources/xlf/Resources.fr.xlf Adds new localized string entries for parameter filter clear + view-related-parameters.
src/Aspire.Dashboard/Resources/xlf/Resources.es.xlf Adds new localized string entries for parameter filter clear + view-related-parameters.
src/Aspire.Dashboard/Resources/xlf/Resources.de.xlf Adds new localized string entries for parameter filter clear + view-related-parameters.
src/Aspire.Dashboard/Resources/xlf/Resources.cs.xlf Adds new localized string entries for parameter filter clear + view-related-parameters.
src/Aspire.Dashboard/Resources/xlf/ControlsStrings.zh-Hant.xlf Adds localized tooltip/action text for the “click to set parameter value” affordance.
src/Aspire.Dashboard/Resources/xlf/ControlsStrings.zh-Hans.xlf Adds localized tooltip/action text for the “click to set parameter value” affordance.
src/Aspire.Dashboard/Resources/xlf/ControlsStrings.tr.xlf Adds localized tooltip/action text for the “click to set parameter value” affordance.
src/Aspire.Dashboard/Resources/xlf/ControlsStrings.ru.xlf Adds localized tooltip/action text for the “click to set parameter value” affordance.
src/Aspire.Dashboard/Resources/xlf/ControlsStrings.pt-BR.xlf Adds localized tooltip/action text for the “click to set parameter value” affordance.
src/Aspire.Dashboard/Resources/xlf/ControlsStrings.pl.xlf Adds localized tooltip/action text for the “click to set parameter value” affordance.
src/Aspire.Dashboard/Resources/xlf/ControlsStrings.ko.xlf Adds localized tooltip/action text for the “click to set parameter value” affordance.
src/Aspire.Dashboard/Resources/xlf/ControlsStrings.ja.xlf Adds localized tooltip/action text for the “click to set parameter value” affordance.
src/Aspire.Dashboard/Resources/xlf/ControlsStrings.it.xlf Adds localized tooltip/action text for the “click to set parameter value” affordance.
src/Aspire.Dashboard/Resources/xlf/ControlsStrings.fr.xlf Adds localized tooltip/action text for the “click to set parameter value” affordance.
src/Aspire.Dashboard/Resources/xlf/ControlsStrings.es.xlf Adds localized tooltip/action text for the “click to set parameter value” affordance.
src/Aspire.Dashboard/Resources/xlf/ControlsStrings.de.xlf Adds localized tooltip/action text for the “click to set parameter value” affordance.
src/Aspire.Dashboard/Resources/xlf/ControlsStrings.cs.xlf Adds localized tooltip/action text for the “click to set parameter value” affordance.
src/Aspire.Dashboard/Resources/Resources.resx Adds the new resource strings for filter clear + “View parameters (N)”.
src/Aspire.Dashboard/Resources/Resources.Designer.cs Regenerates strongly-typed accessors for the new resource strings.
src/Aspire.Dashboard/Resources/ControlsStrings.resx Adds the new control string for the “click to set parameter value” tooltip.
src/Aspire.Dashboard/Resources/ControlsStrings.Designer.cs Regenerates strongly-typed accessors for the new control string.
src/Aspire.Dashboard/Model/ResourceMenuBuilder.cs Adds “View parameters (N)” menu item and optional callback wiring.
src/Aspire.Dashboard/Model/ResourceGraph/ResourceGraphMapper.cs Suppresses endpoint URL/text for parameter nodes in graph DTOs.
src/Aspire.Dashboard/Components/Pages/Resources.razor.cs Implements parameter filtering by related resource and URL/state persistence changes.
src/Aspire.Dashboard/Components/Pages/Resources.razor Adds filter indicator/clear button and clickable “Value not set” affordance.
src/Aspire.Dashboard/Components/Dialogs/InteractionsInputDialog.razor Disables browser autocomplete for dialog input.
src/Aspire.Dashboard/Components/Controls/ResourceFilters.razor Adds a flag to hide the resource-type filter section on Parameters view.
src/Aspire.Dashboard/Components/Controls/ResourceActions.razor.cs Plumbs “View related parameters” callback into resource action menus.
playground/Stress/Stress.AppHost/AppHost.cs Adds parameters and env var wiring to exercise the feature in Stress playground.
.vscode/launch.json Adds Aspire launch configurations for TestShop and Stress playground AppHosts.
.github/skills/dashboard-e2e-testing/SKILL.md Adds a Playwright CLI workflow doc for interactive dashboard E2E validation.
Files not reviewed (2)
  • src/Aspire.Dashboard/Resources/ControlsStrings.Designer.cs: Language not supported
  • src/Aspire.Dashboard/Resources/Resources.Designer.cs: Language not supported

Comment thread src/Aspire.Dashboard/Components/Pages/Resources.razor Outdated
Comment thread src/Aspire.Dashboard/Components/Pages/Resources.razor.cs
Comment thread src/Aspire.Dashboard/Components/Pages/Resources.razor.cs Outdated
Comment thread .github/skills/dashboard-e2e-testing/SKILL.md Outdated
Comment thread src/Aspire.Dashboard/Components/Pages/Resources.razor Outdated
Comment on lines +171 to +190
// Add "View parameters" for non-parameter resources that reference parameters
var parameterCount = CountParameterRelationships(resource, resourceByName);
if (!resource.IsParameter && parameterCount > 0)
{
var capturedResource = resource;
menuItems.Add(new MenuButtonItem
{
Text = string.Format(CultureInfo.CurrentCulture, _loc[nameof(Resources.Resources.ResourcesViewRelatedParameters)], parameterCount),
Icon = s_keyIcon,
OnClick = onViewRelatedParameters is not null
? () => onViewRelatedParameters(capturedResource)
: () =>
{
_navigationManager.NavigateTo(DashboardUrls.ResourcesUrl(
view: "Parameters",
resource: capturedResource.Name));
return Task.CompletedTask;
}
});
}
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.

I'd prefer not to add this to the context menu. There are a lot of menu options already. I don't think this makes the cut.

Instead people can view the resource detail, see the parameter in the relationships and click on View to open it.

Comment thread src/Aspire.Dashboard/Components/Pages/Resources.razor.cs Outdated
Comment thread src/Aspire.Dashboard/Components/Pages/Resources.razor.cs Outdated
Comment thread src/Aspire.Dashboard/Components/Pages/Resources.razor.cs Outdated
Comment thread src/Aspire.Dashboard/Components/Pages/Resources.razor.cs Outdated
Comment thread src/Aspire.Dashboard/Components/Pages/Resources.razor.cs Outdated
Comment thread src/Aspire.Dashboard/Components/Pages/Resources.razor Outdated
Copy link
Copy Markdown
Member

@JamesNK JamesNK left a comment

Choose a reason for hiding this comment

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

2 comments on the GetSetParameterCommand method.

Comment thread src/Aspire.Dashboard/Components/Pages/Resources.razor.cs Outdated
Comment thread src/Aspire.Dashboard/Components/Pages/Resources.razor.cs Outdated
- Remove dashboard-e2e-testing SKILL.md and revert .vscode/launch.json
  additions (move to a different PR)
- Remove 'View parameters (N)' context menu item and revert
  ResourceMenuBuilder + tests
- Remove related-resource filter on Parameters tab (chip, Filter() path,
  ResourceFilters ShowResourceTypes, URL state for resource param)
- Add CommandViewModel.SetParameterCommand constant and use it in place
  of the literal 'parameter-set' string
- Hide Set Value affordance when command State is Hidden; render the
  button as disabled when command State is Disabled
- Extract reusable ParameterValueDisplay control and use it in
  Resources.razor

Follow-up: wire ParameterValueDisplay into the resource details
property grid via PropertyGrid.ValueComponents (the extension point
exists but full integration requires a value component that can also
handle the masked / sensitive value rendering and was deferred).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@JamesNK
Copy link
Copy Markdown
Member

JamesNK commented Apr 21, 2026

I see this inconsistency:

image

I think if "Value not set" button is displayed in the grid then it should also be displayed in the details.

I got this result by running the stress app and viewing parameters.

When viewing a parameter resource whose value is unset, the resource
details panel now renders the same 'Value not set' button shown in the
parameters grid, keeping the two views consistent.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@JamesNK
Copy link
Copy Markdown
Member

JamesNK commented Apr 21, 2026

No change:
image

adamint and others added 3 commits April 23, 2026 17:30
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
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.

Copy link
Copy Markdown
Member

@JamesNK JamesNK left a comment

Choose a reason for hiding this comment

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

1 issue flagged (correctness/maintainability).

Comment thread src/Aspire.Dashboard/Extensions/ResourceViewModelExtensions.cs Outdated
Copy link
Copy Markdown
Member

@JamesNK JamesNK left a comment

Choose a reason for hiding this comment

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

Address comment then LGTM

@adamint
Copy link
Copy Markdown
Member Author

adamint commented Apr 24, 2026

Addressed the ValueMissing state comment. I promoted the missing-parameter state to a shared known state (KnownResourceStates.ValueMissing in hosting and KnownResourceState.ValueMissing in the dashboard), updated ParameterProcessor to emit the shared value, and switched the dashboard check to use the typed KnownState instead of string matching. Targeted dashboard and hosting tests are passing.

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.

Follow up on parameters page

3 participants