Repository navigation
Fix stale overflow indexes in trace resource tooltips - #20840
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 20840Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 20840" |
Tests selector13 / 98 PR test projects · 2 PR jobs, from 2 changed files. Selected PR test projects (13 / 98)
Selected PR jobs (2)
How these were chosen — grouped by what changed
🔧 📦 affected project 🧪 Job reasons
Selection computed for commit |
There was a problem hiding this comment.
🟢 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.
|
Pull request created: #1876
|
|
📝 Documentation has been drafted in microsoft/aspire.dev#1876 targeting Triggered signals: Note This draft PR needs human review before merging. |
|
/backport to release/13.6 |
|
Started backporting to |
## 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>
Description
The dashboard Traces page can throw
ArgumentOutOfRangeExceptionwhile 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.BuildRenderTreeexception 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:
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:Passed:
git --no-pager diff --check.Manual browser verification was not run.
Fixes # (issue)
Checklist
<remarks />and<code />elements on your triple slash comments?