Skip to content

Fix stale overflow indexes in trace resource tooltips - #20840

Merged
James Newton-King (JamesNK) merged 1 commit into
mainfrom
fix/traces-overflow-tooltip
Oct 12, 2026
Merged

James Newton-King (JamesNK) merged 1 commit into
mainfrom
fix/traces-overflow-tooltip

Conversation

@JamesNK

Copy link
Copy Markdown
Member

Description

The dashboard Traces page can throw ArgumentOutOfRangeException while rendering a resource overflow tooltip when a delayed browser measurement references an index outside the current resource list.

Use FluentOverflow<TraceResourceSummary> with typed source items so the overflow component filters invalid indexes and the tooltip renders resource summaries directly. Preserve the resource tags, span counts, and tooltip presentation, and build the accessible label from the current overflow items.

Add regression coverage for negative indexes, indexes at and beyond the list boundary, mixtures of valid and stale indexes, and resource lists becoming empty. The regression tests reproduced the reported Traces.BuildRenderTree / FluentTooltip.BuildRenderTree exception before the fix. No new dependencies are required.

User-facing usage

On the dashboard Traces page, resource tags that do not fit in the Spans column appear in the overflow tooltip. Delayed overflow measurements after a resource-list update no longer crash tooltip rendering; valid resource tags remain visible in the tooltip.

Validation

  • Passed: all 7 Traces page tests, including the 3 new regression cases:

    $env:MSBUILDTERMINALLOGGER='false'
    .\.dotnet\dotnet.exe test --project tests\Aspire.Dashboard.Components.Tests\Aspire.Dashboard.Components.Tests.csproj --configuration Release --no-launch-profile --filter-class '*.TracesTests' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'
  • The Debug rerun below was blocked during build by the running dashboard locking its executable (MSB3027 / MSB3021). The Release command above rebuilt and passed without stopping the running app:

    $env:MSBUILDTERMINALLOGGER='false'
    .\.dotnet\dotnet.exe test --project tests\Aspire.Dashboard.Components.Tests\Aspire.Dashboard.Components.Tests.csproj --no-launch-profile --filter-class '*.TracesTests' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'
  • Passed: git --no-pager diff --check.

  • Manual browser verification was not run.

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 <223556219+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Oct 9, 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 -- 20840

Or

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

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Tests selector

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

Selected PR test projects (13 / 98)

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/Pages/Traces.razor.

🔧 src/Aspire.Dashboard/Components/Pages/Traces.razor (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/Pages/TracesTests.cs (changed test)
→ 1 directly: Aspire.Dashboard.Components.Tests

Job reasons

Job Triggered by
extension-e2e • src/Aspire.Dashboard/Components/Pages/Traces.razor
• affected project Aspire.Dashboard
native-dashboard-validation affected project Aspire.Dashboard

Selection computed for commit 7287832.

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

The focused fix preserves existing presentation and includes comprehensive regression coverage.

0 open findings

What changed in this PR

Fixes stale overflow indexes crashing trace resource tooltips.

Changes:

  • Uses typed overflow items and filters invalid indexes.
  • Adds regression coverage for stale, boundary, and empty-list cases.
File Description
src/​Aspire.Dashboard/​Components/​Pages/​Traces.razor Safely renders current resource summaries.
tests/​Aspire.Dashboard.Components.Tests/​Pages/​TracesTests.cs Covers stale overflow measurements.

🧠 Review effort: Balanced


💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

@JamesNK
James Newton-King (JamesNK) merged commit 1c99352 into main Oct 12, 2026
157 checks passed
@microsoft-github-policy-service microsoft-github-policy-service Bot added this to the 17.0 milestone Oct 12, 2026
@aspire-repo-bot

Copy link
Copy Markdown
Contributor

Pull request created: #1876

Generated by PR Documentation Check · copilot · auto · 60.7 AIC · ⌖ 10.5 AIC · ⊞ 20.4K

@aspire-repo-bot

Copy link
Copy Markdown
Contributor

📝 Documentation has been drafted in microsoft/aspire.dev#1876 targeting release/17.0.

Triggered signals: dashboard_user_facing_page_changed (Traces.razor overflow-tooltip fix), pr_body_has_user_facing_section (PR body's "User-facing usage" section describing the Spans column tooltip), pr_body_has_cli_flag_mention (test-command snippet in the PR body, not an actual CLI flag). Updated src/frontend/src/content/docs/dashboard/explore.mdx to document that overflowing resource tags in the Traces page's Spans column collapse into a +N indicator with a hover tooltip showing the remaining resources and span counts — reflecting the fixed, now-crash-safe tooltip behavior described in the source PR.

Note

This draft PR needs human review before merging.

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

Maddy Montaquila (maddymontaquila) added a commit to microsoft/aspire.dev that referenced this pull request Nov 17, 2026
## Summary

Documents microsoft/aspire#20840. Expands the **Spans** column
description on the dashboard Traces page (`dashboard/explore.mdx`) to
explain that resource tags that don't fit collapse into a `+N`
indicator, and hovering it shows the remaining resources and their span
counts in a tooltip.

Replaces #1876, whose branch picked up unrelated `main` commits during a
conflict-resolution merge (showing ~10k spurious deletions) and was
still conflicting with `release/17.0`. This is a clean single-line
change on top of the current `release/17.0`.

## Third-party links and affiliations

None

## Validation

Single-line prose change to an existing bullet; no new components,
links, or code samples. Not built locally; relying on CI.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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