Skip to content

Keep telemetry navigation stable for resources without data - #21690

Merged
David Pine (IEvangelist) merged 1 commit into
mainfrom
ievangelist-stable-telemetry-navigation
Nov 4, 2026
Merged

David Pine (IEvangelist) merged 1 commit into
mainfrom
ievangelist-stable-telemetry-navigation

Conversation

@IEvangelist

@IEvangelist David Pine (IEvangelist) commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

Description

Selecting a resource that has not sent telemetry should not unexpectedly move users from Traces or Structured logs to Overview. Keep the current telemetry page and let its existing empty state explain the absence of data, matching Metrics.

UX-30 only. This updates selection URL routing in ResourcesLayout; it does not change telemetry arrival handling or chart scope in #21431, or redesign Home/Details. Selecting a single parameter still opens Overview.

Based on freshly fetched microsoft/aspire upstream main at 9f0961d0c7173732f45ce88d571c8b53f8059934.

User-facing usage

While on Traces or Structured logs, select a resource with no telemetry. The resource selection updates without leaving the page. Traces shows its existing "No traces" empty state. Ctrl/Cmd-click to select multiple resources, or select all to clear the explicit selection, without changing telemetry pages.

Validation

  • .\restore.cmd - passed.

  • Before the production fix, the following command reproduced two failures: Traces and Structured logs generated /resources/cache instead of their telemetry URLs. Four cases passed, including Metrics and the single-parameter exception:

    dotnet test --project tests\Aspire.Dashboard.Components.Tests\Aspire.Dashboard.Components.Tests.csproj --no-launch-profile -- --filter-method '*.Telemetry_ChangingTheSelectionStaysOnTheCurrentTabEvenWithoutTelemetry' --filter-method '*.Telemetry_SelectingOnlyAParameterNavigatesToOverview' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'
  • After the fix, the following command passed all 87 cases, including no-telemetry single/multiple/no selection, parameter-only navigation, and the rendered Traces empty state:

    dotnet test --project tests\Aspire.Dashboard.Components.Tests\Aspire.Dashboard.Components.Tests.csproj --no-launch-profile -- --filter-class '*.ResourcesLayoutTests' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'
  • git diff --check - passed.

  • Real-browser verification against this branch's build passed using a temporary Playwright fixture, with six interactions covering both pages at all three viewport sizes. The fixture seeded one trace and one structured log for api, and no telemetry for cache. It navigated through the normal tab UI, verified the populated api page, then selected cache at each target viewport. Assertions checked the scoped URL, resource title, selected tab, explicit empty message, and absence of document horizontal overflow. The fixture and browser were disposed after capture; the capture harness is not part of this PR.

    dotnet test --project tests\Aspire.Dashboard.Playwright.Tests\Aspire.Dashboard.Playwright.Tests.csproj --no-launch-profile -- --filter-method '*.CaptureAffectedStates' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'

Screenshots / Recordings

Actual Chromium viewport captures from this branch, using synthetic test resources only. Each screenshot shows cache selected after switching from a resource with data. Traces remains at /traces/resource/cache with No traces found; Structured logs remains at /structuredlogs/resource/cache with No structured logs found.

At 390 x 844 and 768 x 1024, selection used the responsive resource picker: open the drawer, select cache, and verify it closes. At 1440 x 900, selection used the persistent resource pane. All six images were visually inspected: resource scope and empty-state text remain readable, the empty message stays within the viewport, and document/body width equals viewport width. At mobile width, the existing tab strip truncates trailing labels and exposes its overflow action; the page heading identifies the current telemetry view.

Viewport (pixels) Traces: selected no-data resource Structured logs: selected no-data resource
Mobile 390 x 844 Traces no-data resource - mobile 390x844 Structured logs no-data resource - mobile 390x844
Tablet 768 x 1024 Traces no-data resource - tablet 768x1024 Structured logs no-data resource - tablet 768x1024
Desktop 1440 x 900 Traces no-data resource - desktop 1440x900 Structured logs no-data resource - desktop 1440x900

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

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Nov 2, 2026

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 -- 21690

Or

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

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Tests selector

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

Selected PR test projects (13 / 100)

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

⚠️ 11 of the 13 selected test projects come from a single change — src/Aspire.Dashboard/Components/Layout/ResourcesLayout.razor.cs.

🔧 src/Aspire.Dashboard/Components/Layout/ResourcesLayout.razor.cs (changed source)
→ 11 via the project graph: Aspire.Dashboard.Tests, 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

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

Job reasons

Job Triggered by
extension-e2e • src/Aspire.Dashboard/Components/Layout/ResourcesLayout.razor.cs
• affected project Aspire.Dashboard
native-dashboard-validation affected project Aspire.Dashboard

Selection computed for commit 59ce748.

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.

🟢 Approval recommended

No active review issues remain for the change preserving telemetry-page navigation when selected resources lack telemetry.

No open issues 🎉

What changed in this PR

Keeps dashboard navigation on Traces or Structured logs when users select resources without telemetry, matching the existing Metrics behavior. Selecting a single parameter still opens Overview. Telemetry-arrival handling and chart scope remain outside this PR.

Changes:

  • Preserve the current telemetry page when resource selection changes.
  • Extend selection-routing tests across all three telemetry pages, including the single-parameter exception.
  • Add coverage for the existing Traces empty state when a selected resource has no telemetry.
File Description
tests/​Aspire.Dashboard.Components.Tests/​Layout/​ResourcesLayoutTests.cs Expands routing regression tests and verifies the Traces empty state.
src/​Aspire.Dashboard/​Components/​Layout/​ResourcesLayout.razor.cs Preserves Traces and Structured logs navigation for selections without telemetry.

Review effort: Balanced

@IEvangelist
David Pine (IEvangelist) merged commit 5ecdbd4 into main Nov 4, 2026
167 checks passed
@microsoft-github-policy-service microsoft-github-policy-service Bot added this to the 17.0 milestone Nov 4, 2026
@aspire-repo-bot

Copy link
Copy Markdown
Contributor

✅ No documentation update needed.

Proven false positive; no docs PR needed.

  • Triggered signals: pr_body_has_cli_flag_mention (evidence: --filter-method flags in the PR's dotnet test validation command, not a product flag) and pr_body_has_user_facing_section (evidence: the "User-facing usage" heading).
  • The only changed files are src/Aspire.Dashboard/Components/Layout/ResourcesLayout.razor.cs and tests/Aspire.Dashboard.Components.Tests/Layout/ResourcesLayoutTests.cs. There are no new options, APIs, strings, or pages.
  • The change is a small dashboard navigation fix. Selecting a resource with no telemetry on Traces or Structured logs now stays on that page and shows its normal empty state, instead of redirecting to Overview. This matches the existing Metrics behavior.
  • Searching src/frontend/src/content/docs/dashboard found no page that describes the old redirect-to-Overview behavior, so there is no documented text to correct.

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.

3 participants