Repository navigation
Keep telemetry navigation stable for resources without data - #21690
Conversation
Co-authored-by: Copilot App <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 -- 21690Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 21690" |
Tests selector13 / 100 PR test projects · 2 PR jobs, from 2 changed files. Selected PR test projects (13 / 100)
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
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
|
✅ No documentation update needed. Proven false positive; no docs PR needed.
|
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/aspireupstreammainat9f0961d0c7173732f45ce88d571c8b53f8059934.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/cacheinstead of their telemetry URLs. Four cases passed, including Metrics and the single-parameter exception: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:
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 forcache. It navigated through the normal tab UI, verified the populatedapipage, then selectedcacheat 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.Screenshots / Recordings
Actual Chromium viewport captures from this branch, using synthetic test resources only. Each screenshot shows
cacheselected after switching from a resource with data. Traces remains at/traces/resource/cachewith No traces found; Structured logs remains at/structuredlogs/resource/cachewith 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.Fixes # (issue)
Checklist
<remarks />and<code />elements on your triple slash comments?