Skip to content

Fix dashboard filter badges and toolbar navigation - #20471

Merged
James Newton-King (JamesNK) merged 4 commits into
mainfrom
fix/dashboard-filter-badge-toolbar-navigation
Sep 25, 2026
Merged

James Newton-King (JamesNK) merged 4 commits into
mainfrom
fix/dashboard-filter-badge-toolbar-navigation

Conversation

@JamesNK

@JamesNK James Newton-King (JamesNK) commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

Description

Dashboard filter badges could remain visible with an empty count when every filter was disabled, and toggling a badge changed toolbar height. In narrow resource details panes, Filter and Options could wrap over the property grid. The Structured Logs clear-menu wrapper could stretch a wrapped toolbar row below its grid track. Also, a mobile Resources tab change could leave a navigation to /?view=Parameters queued until the filter panel closed, even when it was not open; a queued navigation could run while the page was being torn down.

Filter badges now disappear at zero without replacing the menu button, and their container no longer shifts the toolbar when shown. The resource details toolbar grows to fit wrapped controls. The shared menu-button wrapper now sizes to its button instead of stretching to the parent's full height, so wrapped filter-toolbar rows stay within their grid track. Mobile tab changes update the URL immediately unless the filter panel is open; pending panel changes are discarded on navigation away or disposal rather than navigating from a closing page.

The Structured Logs summary pane no longer has a special wrapping rule for its right-hand toolbar group. At narrow split-pane widths, that group remains on one line and the search field can extend outside the summary pane.

User-facing usage

On Structured Logs, Traces, and Trace Detail, disable every filter to hide the count badge while keeping the Filters button in place. The full-width Structured Logs toolbar still wraps as space permits, but with log details open its right-hand group may extend beyond the narrower summary pane. On Resources, switch to Parameters on mobile without opening the filter panel: the URL updates to /?view=Parameters. In a narrow resource details pane, the Filter and Options controls wrap without overlapping properties.

Screenshots / Recordings

This PR includes UI changes. Please add screenshots or screen recordings so reviewers can evaluate the visual changes without running locally.

  • For before/after comparisons, place them side-by-side or label them clearly.
  • For interactive changes (animations, transitions, new flows), prefer a short screen recording (GIF or video).
  • If you cannot capture visuals now, note what scenario to test and mark this section as TODO.

Structured Logs with the same filter enabled, then disabled. The count badge disappears while the Filters button remains:

Filter enabled Filter disabled
Filters button with a count badge of one Filters button with its count badge hidden

TestShop at 1024px after removing the global menu-wrapper height:

Structured Logs full-width toolbar

Resources toolbar and row actions Resource details toolbar
Resource options and aligned row-action menus Resource details filter and options
Traces toolbar and row actions Span details toolbar
Traces clear and row-action menus Span details filter and options

Validation: browser/Playwright measurements confirmed a constant 48px filter toolbar with no button shift and a resource-details toolbar that expands for wrapped controls. On Structured Logs, enabling and disabling a filter kept the two-row desktop toolbar at 88px while hiding the empty badge and retaining the Filters button. After the global height removal, the live dashboard served the updated CSS; clear-menu, row-action, header run-selector, and detail-pane menu wrappers stayed centered on their buttons, and the Structured Logs clear menu opened correctly. A split-pane experiment at 1024px showed that without the Structured Logs-specific wrapping rule, the search field starts 10px outside the toolbar's left edge when details are open. Resources and dialog-provider component tests passed (40 tests) before the CSS-only follow-ups. The Dashboard Release build passed with zero warnings or errors before the CSS-only follow-ups.

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

@github-actions

Copy link
Copy Markdown
Contributor

🚀 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 -- 20471

Or

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

@github-actions

This comment has been minimized.

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.

Copilot review overview

🟡 Changes recommended

The zero-count badge regression lacks automated component coverage across the affected dashboard pages.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 1 Low severity

Open (1)
What changed in this PR

Fixes dashboard filter badge rendering, responsive toolbar layout, and mobile navigation timing.

Changes:

  • Hides zero-count filter badges without removing filter controls.
  • Allows resource detail toolbars to grow when controls wrap.
  • Prevents stale deferred navigation during page navigation or disposal, with regression tests.
File Description
tests/​Aspire.Dashboard.Components.Tests/​Pages/​ResourcesTests.cs Tests mobile navigation and disposal behavior.
src/​Aspire.Dashboard/​wwwroot/​css/​layout.css Stabilizes badge container layout.
src/​Aspire.Dashboard/​Components/​Pages/​Traces.razor Hides empty filter badges.
src/​Aspire.Dashboard/​Components/​Pages/​TraceDetail.razor Hides empty badges in trace detail toolbars.
src/​Aspire.Dashboard/​Components/​Pages/​StructuredLogs.razor Hides empty filter badges.
src/​Aspire.Dashboard/​Components/​Pages/​IPageWithSessionAndUrlState.cs Defers navigation only while the mobile panel is open.
src/​Aspire.Dashboard/​Components/​Layout/​AspirePageContentLayout.razor.cs Discards stale callbacks on navigation or disposal.
src/​Aspire.Dashboard/​Components/​Controls/​ResourceDetails.razor.css Permits wrapped toolbar height growth.

@github-actions

This comment has been minimized.

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.

Copilot review overview

🟢 Approval recommended

The focused lifecycle tests cover the behavioral changes, and no unresolved correctness issues were identified.

Review effort: Balanced
Findings: 1 Low severity

Open (1)

@github-actions

This comment has been minimized.

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.

Copilot review overview

🟢 Approval recommended

The lifecycle behavior is covered by focused tests, and no unresolved correctness issues were identified.

Review effort: Balanced
Findings: 1 Low severity

Open (1)

This removes the scoped flex-wrap rule; at narrow split-pane widths, the search field can extend outside the summary pane.

Co-authored-by: Copilot <[email protected]>

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.

Copilot review overview

🟢 Approval recommended

The navigation lifecycle changes are focused, regression-tested, and consistent with the described behavior.

Review effort: Balanced
Findings: 1 Low severity

Open (1)

@github-actions

Copy link
Copy Markdown
Contributor

Tests selector

13 / 99 PR test projects · 2 PR jobs, from 9 changed files.

Selected PR test projects (13 / 99)

Aspire.Dashboard.Components.Tests, Aspire.Dashboard.Tests, Aspire.Hosting.Azure.Kubernetes.Tests, Aspire.Hosting.Azure.Tests, Aspire.Hosting.Blazor.Tests, Aspire.Hosting.Dotnet.Tests, Aspire.Hosting.DotnetTool.Tests, Aspire.Hosting.JavaScript.Tests, Aspire.Hosting.Radius.Tests, Aspire.Hosting.Testing.Tests, Aspire.Hosting.Tests, Aspire.Playground.Tests, Aspire.Templates.Tests

Selected PR jobs (2)

extension-e2e, native-dashboard-validation


How these were chosen — grouped by what changed

⚠️ 10 of the 13 selected test projects come from a single change — src/Aspire.Dashboard/Components/Controls/ResourceDetails.razor.css.

🔧 src/Aspire.Dashboard/Components/Controls/ResourceDetails.razor.css (changed source)
→ 10 via the project graph: Aspire.Hosting.Azure.Kubernetes.Tests (3 hops), Aspire.Hosting.Azure.Tests (2 hops), Aspire.Hosting.Blazor.Tests (2 hops), Aspire.Hosting.Dotnet.Tests (2 hops), Aspire.Hosting.DotnetTool.Tests (2 hops), Aspire.Hosting.JavaScript.Tests, Aspire.Hosting.Radius.Tests (2 hops), Aspire.Hosting.Testing.Tests, Aspire.Hosting.Tests, Aspire.Playground.Tests (2 hops)

📦 affected project Aspire.Dashboard
→ 1 test: Aspire.Templates.Tests

🔧 src/Aspire.Dashboard/wwwroot/css/controls.css (changed source)
→ 1 via the project graph: Aspire.Dashboard.Tests

🧪 tests/Aspire.Dashboard.Components.Tests/Pages/ResourcesTests.cs (changed test)
→ 1 directly: Aspire.Dashboard.Components.Tests

Job reasons

Job Triggered by
extension-e2e • src/Aspire.Dashboard/Components/Controls/ResourceDetails.razor.css, src/Aspire.Dashboard/Components/Layout/AspirePageContentLayout.razor.cs, src/Aspire.Dashboard/Components/Pages/IPageWithSessionAndUrlState.cs, src/Aspire.Dashboard/Components/Pages/StructuredLogs.razor, src/Aspire.Dashboard/Components/Pages/TraceDetail.razor, src/Aspire.Dashboard/Components/Pages/Traces.razor, src/Aspire.Dashboard/wwwroot/css/controls.css, src/Aspire.Dashboard/wwwroot/css/layout.css
• affected project Aspire.Dashboard
native-dashboard-validation affected project Aspire.Dashboard

Selection computed for commit 944ba86.

@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

@JamesNK
James Newton-King (JamesNK) merged commit be7bc88 into main Sep 25, 2026
302 of 305 checks passed
@microsoft-github-policy-service microsoft-github-policy-service Bot added this to the 14.0 milestone Sep 25, 2026
@aspire-repo-bot

Copy link
Copy Markdown
Contributor

✅ No documentation update needed.

Step 5 branch taken: docs_optional? No — actually recommendation is docs_required, so this uses the sole allowed exception path: docs_required → bug_fix_restores_documented_behavior (treated as equivalent to the docs_optional allowlist category since no signal represents a new capability).

Triggered signals (3): dashboard_user_facing_page_changed, new_public_type, pr_body_has_user_facing_section.

Why no docs update is needed, per signal:

  1. dashboard_user_facing_page_changed — The 4 matched pages (StructuredLogs.razor, TraceDetail.razor, Traces.razor, IPageWithSessionAndUrlState.cs) only change: (a) FluentCounterBadge Count="..." ShowEmpty="false" to hide a zero-count badge — a CSS/visual polish of an already-documented filter badge (explore.mdx already describes error-count badges and the filter icon/dialog at lines ~133, 245, 312-318); and (b) a one-line condition change (layout is { IsToolbarPanelOpen: true }) fixing a stale-navigation bug in the mobile filter-dialog defer logic — an internal timing fix, not a new documented behavior.
  2. new_public_type — AspirePageContentLayout gained IDisposable purely to clear pending dialog-close listeners on component disposal (defensive cleanup for the stale-navigation bug). This is an internal Blazor code-behind class in src/Aspire.Dashboard/Components/Layout/, not part of the public NuGet API surface tracked in src/*/api/*.cs, and is never referenced by the docs site.
  3. pr_body_has_user_facing_section — The "User-facing usage" section in the PR body describes only cosmetic/bug-fix outcomes (badge disappears at zero while the Filters button stays; toolbar wraps without overlap; mobile tab URL updates immediately). None of these describe a new feature, flag, option, or capability — they restore the dashboard's existing, already-documented filter/toolbar/tab-navigation behavior to work correctly. explore.mdx already documents filter badges (line 133, 245), the

(summary truncated)

@JamesNK

Copy link
Copy Markdown
Member Author

/backport to release/13.6

@github-actions

Copy link
Copy Markdown
Contributor

Started backporting to release/13.6 (link to workflow run)

@aspire-repo-bot

Copy link
Copy Markdown
Contributor

James Newton-King (@JamesNK) an error occurred while backporting to release/13.6. See the workflow output for details.

Jose Perez Rodriguez (joperezr) pushed a commit that referenced this pull request Sep 26, 2026
…0511)

Backport of #20471 to release/13.6

/cc @JamesNK

## Description

Dashboard filter badges could remain visible with an empty count, narrow
resource-details controls could overlap properties, and mobile Resources
tab changes could leave navigation queued until the filter panel
closed—even after leaving the page. This backport hides zero-count
badges without replacing their button, lets narrow controls wrap, and
updates the mobile URL immediately unless the filter panel is open.
Pending changes are discarded after navigation or disposal.

At narrow Structured Logs split-pane widths, the search field can still
extend outside the summary pane, as noted on the source PR.

### User-facing usage

Disable every filter on Structured Logs, Traces, or Trace Detail to hide
the count badge while retaining the Filters button. On mobile Resources,
switch to Parameters without opening the filter panel to update the URL
to `/?view=Parameters`.

### Screenshots / Recordings

> **This PR includes UI changes.** Please add screenshots or screen
recordings so reviewers can evaluate the visual changes without running
locally.
>
> - For before/after comparisons, place them side-by-side or label them
clearly.
> - For interactive changes (animations, transitions, new flows), prefer
a short screen recording (GIF or video).
> - If you cannot capture visuals now, note what scenario to test and
mark this section as TODO.

Screenshots from #20471:

| Filter enabled | Filter disabled |
| --- | --- |
| ![Filters button with a count badge of
one](https://github.com/user-attachments/assets/5ddf6f3c-fce6-487f-834f-57cd91e394bf)
| ![Filters button with its count badge
hidden](https://github.com/user-attachments/assets/afdd0fc5-165f-4941-aa8e-6c42e581fa25)
|

| Resources toolbar and row actions | Resource details toolbar |
| --- | --- |
| ![Resource options and aligned row-action
menus](https://github.com/user-attachments/assets/ddf36274-c845-4d30-a395-24a6939b4f9b)
| ![Resource details filter and
options](https://github.com/user-attachments/assets/4d6b3c72-a6d9-41a5-b4d7-5955e14dbbea)
|

Fixes # (issue)

## Checklist

- Is this feature complete?
  - [x] Yes. Ready to ship.
  - [ ] No. Follow-up changes expected.
- Are you including unit tests for the changes and scenario tests if
relevant?
  - [x] 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
  - [x] 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
  - [x] No

## Customer Impact

Empty filter badges can remain visible, narrow toolbar controls can
overlap, and mobile Resources tab changes can be delayed until the
filter panel closes or navigate after leaving the page. The backport
corrects these behaviors.

## Testing

On `release/13.6`, 40/40 Resources and dialog-provider tests passed; the
source PR also reports browser/Playwright toolbar measurements and
manual dashboard checks.

## Risk

Medium — shared mobile navigation lifecycle and toolbar CSS affect
several Dashboard pages; in a narrow Structured Logs split pane, the
search field can still extend outside the summary pane, as noted in the
source PR.

## Regression?

Yes — confirmed by the requester; the introducing version is not
documented.
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants