Skip to content

Fix dashboard SVG tooltips and restore rich trace previews - #22138

Merged
James Newton-King (JamesNK) merged 3 commits into
mainfrom
jamesnk/dashboard-tooltip-improvements
Nov 12, 2026
Merged

James Newton-King (JamesNK) merged 3 commits into
mainfrom
jamesnk/dashboard-tooltip-improvements

Conversation

@JamesNK

@JamesNK James Newton-King (JamesNK) commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Description

Relationship graph tooltips can appear in the browser's top-left corner, and log-entry dots on the new trace detail page are missing the rich previews available in the legacy dashboard. Long text-only tooltips also wrap too narrowly.

  • Position SVG tooltips using a temporary HTML anchor matching the SVG element's bounds, while retaining the actual SVG element as the accessibility and event anchor. Clean up the positioning anchor on dismissal and dismiss on resize.
  • Restore trace-log previews with the legacy heading, scope subtitle, and Level/Timestamp/Message table. Render the content in hidden Razor HTML and clone it into the shared on-demand tooltip instead of creating a Fluent tooltip component for every marker.
  • Reuse the legacy content markup and move its CSS into shared controls styles, used by both trace-detail implementations. Rich log previews retain their natural width with a 350px maximum; long headings truncate with ellipsis.
  • Allow text-only tooltips to use the greater of 300px and 50% of the viewport width.
  • Cover SVG positioning, rich-content cloning and updates, keyboard accessibility, and trace-log preview rendering.

Fixes # (issue)

User-facing usage

Hover or keyboard-focus a resource in the Relationships card to see its tooltip positioned above the resource. On the trace detail page, hover or keyboard-focus a log-entry dot to see its event name, scope, level, timestamp, and message. Clicking the dot still opens the log details.

Screenshots / Recordings

This PR includes UI changes. The comparisons below show the actual legacy and new trace-detail implementations using the same trace. Long title/scope text was temporarily substituted in the browser to exercise ellipsis.

Scenario Legacy trace detail New trace detail
Long event title Legacy log tooltip with a long title New log tooltip with a long title
Long scope subtitle Legacy log tooltip with a long subtitle New log tooltip with a long subtitle

SVG resource tooltip positioned above its relationship graph node:

Relationship graph resource tooltip positioned above its SVG anchor

Validation

Dashboard resource rebuild and readiness check: passed.

$env:MSBUILDTERMINALLOGGER = 'false'
aspire resource aspire-dashboard rebuild --apphost C:\Development\Source\aspire\playground\TestShop\TestShop.AppHost\TestShop.AppHost.csproj --non-interactive
aspire wait aspire-dashboard --apphost C:\Development\Source\aspire\playground\TestShop\TestShop.AppHost\TestShop.AppHost.csproj --non-interactive

Trace-detail component tests: passed, 16 tests.

$env:MSBUILDTERMINALLOGGER = 'false'
dotnet test --project tests\Aspire.Dashboard.Components.Tests\Aspire.Dashboard.Components.Tests.csproj --no-launch-profile -- --filter-class '*.TraceDetailsTests' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'

Targeted tooltip browser tests: passed, 4 tests. Only these specific outerloop cases were opted into; quarantined tests remained excluded.

$env:MSBUILDTERMINALLOGGER = 'false'
$env:PLAYWRIGHT_NODEJS_PATH = (Get-Command node).Source
$env:PLAYWRIGHT_DRIVER_SEARCH_PATH = 'C:\Development\Source\aspire\artifacts\bin\Aspire.Dashboard.Playwright.Tests\Debug\net11.0'
dotnet test --project tests\Aspire.Dashboard.Playwright.Tests\Aspire.Dashboard.Playwright.Tests.csproj --no-launch-profile -p:InstallBrowsersForPlaywright=false -- --filter-method '*.Tooltips_HiddenContentIsClonedAndUpdates' --filter-method '*.Tooltips_SvgAnchorsPositionAndCleanUp' --filter-not-trait 'quarantined=true'

Syntax and whitespace checks: passed.

node --check src\Aspire.Dashboard\wwwroot\js\app-tooltips.js
git diff --check

Playwright comparison of both actual trace-detail pages: passed. Normalized content HTML, compared computed styles, and element dimensions matched. Nine paired scenarios covered long titles, long subtitles, and short content at viewport widths of 400px, 600px, and 1440px. Both implementations capped long previews at 350px, shrank short previews to approximately 181px, and ellipsized long headings without overflowing.

Text-only tooltip sizing was also verified at viewport widths of 400px, 600px, 1000px, and 1440px: maximum widths were 300px, 300px, 500px, and 720px respectively.

The test build emitted an existing NU1903 warning for the pinned Microsoft.DotNet.ILCompiler package.

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

Or

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

@aspire-repo-bot
aspire-repo-bot Bot requested a balanced review from Copilot November 11, 2026 08:58
@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.

🟡 Changes recommended

The tooltip proxy retains stale bounds when SVG targets move or ancestor transforms change, leaving visible tooltips misplaced and requiring geometry-change handling plus a browser regression test.

1 open issue
What changed in this PR

This PR fixes initial SVG tooltip placement in the dashboard’s relationship graph and gives long tooltip text more room.

Changes:

  • Use a temporary HTML positioning anchor for SVG tooltips while retaining the SVG element for accessibility and events.
  • Remove temporary anchors on dismissal and dismiss SVG tooltips on window resize.
  • Increase tooltip maximum width to 300px and add browser coverage for SVG positioning and lifecycle behavior.
File Description
tests/​Aspire.Dashboard.Playwright.Tests/​Integration/​Playwright/​DashboardInteractionsTests.cs Tests SVG links, groups, and paths for placement, accessibility, interaction, and cleanup.
src/​Aspire.Dashboard/​wwwroot/​js/​app-tooltips.js Adds temporary SVG positioning anchors and resize cleanup.
src/​Aspire.Dashboard/​wwwroot/​css/​controls.css Increases tooltip maximum width to 300px while preserving wrapping.

Review effort: Balanced

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

@aspire-repo-bot
aspire-repo-bot Bot requested a balanced review from Copilot November 11, 2026 11:30
@JamesNK James Newton-King (JamesNK) changed the title Fix dashboard SVG tooltips and increase tooltip width Fix dashboard SVG tooltips and restore rich trace previews Nov 11, 2026
@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.

🔵 Needs a closer look

Tooltip positioning uses stale SVG bounds when graph zoom or layout updates move nodes, leaving open tooltips detached from their anchors.

1 open issue

Review effort: Balanced

@github-actions

Copy link
Copy Markdown
Contributor

Tests selector

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

Selected PR test projects (13 / 101)

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

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

Job reasons

Job Triggered by
extension-e2e • src/Aspire.Dashboard/Components/Legacy/Pages/TraceDetail.razor, src/Aspire.Dashboard/Components/Legacy/Pages/TraceDetail.razor.css, src/Aspire.Dashboard/Components/Pages/TraceDetail.razor, src/Aspire.Dashboard/wwwroot/css/controls.css, src/Aspire.Dashboard/wwwroot/js/app-tooltips.js
• affected project Aspire.Dashboard
native-dashboard-validation affected project Aspire.Dashboard

Selection computed for commit 0583631.

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.

🔵 Needs a closer look

The geometry observer misses descendant coordinate changes within SVG anchors, which can leave a keyboard-focused node’s tooltip at a stale position after relationship graph updates.

No open issues 🎉

1 previously missed issue

In code that hasn't changed since last review

Medium severity Observe SVG descendants to keep focused-node tooltips positioned

src/​Aspire.Dashboard/​wwwroot/​js/​app-tooltips.js:176

The geometry observer misses changes to descendants of the SVG anchor, so a keyboard-focused node's tooltip can remain at its old position after the relationship graph updates. ResourceRelationshipGraph positions nodes using descendant rect and text coordinates; those can change without changing the anchor or ancestor attributes when the opposite column still determines the graph's height. Observe the anchor's subtree as well, while keeping ancestor observations non-recursive.

1 resolved since last review

Review effort: Balanced

@IEvangelist

Copy link
Copy Markdown
Member

Was this like that before this change?

image

Also, I can't tell the difference between the old and the new from the screenshots:

@JamesNK

Copy link
Copy Markdown
Member Author

Was this like that before this change?

image Also, I can't tell the difference between the old and the new from the screenshots:

Before:

  • Trace detail log entry tool tips didn't work at all.
  • The SVG tooltip appears in the top left of the screen

@JamesNK

Copy link
Copy Markdown
Member Author

Was this like that before this change?

I can't repo it. Might be a playwright screenshot thing.

@JamesNK
James Newton-King (JamesNK) merged commit 0ae5148 into main Nov 12, 2026
161 checks passed
@microsoft-github-policy-service microsoft-github-policy-service Bot added this to the 17.1 milestone Nov 12, 2026
@aspire-repo-bot

Copy link
Copy Markdown
Contributor

✅ No documentation update needed.

Skipped: proven false positive. This is a dashboard UI bug fix (SVG tooltip positioning, restoring rich log-entry previews on the trace detail page, tooltip width/CSS). It restores legacy behavior and adds no new flag, option, API or setting.

Triggered signals:

  • dashboard_user_facing_page_changed (TraceDetail.razor)
  • pr_body_has_user_facing_section (the "User-facing usage" heading)
  • pr_body_has_cli_flag_mention (the --apphost hit is only a local repro command in the PR body, not a shipped flag)

Searching src/frontend/src/content/docs finds no dashboard docs page that describes relationship-graph or trace-log tooltips, so there is no documented behavior to correct. The --apphost text comes from a local repro command and no CLI change is involved.

Maddy Montaquila (maddymontaquila) added a commit that referenced this pull request Nov 13, 2026
…22149, #22135, #22136, #22138, #22192, #22147) (#22230)

Brings the remaining dashboard changes from `main` to `release/17.0`, so
`release/17.0` matches `main`'s dashboard. The commits are cherry-picked
with `-x` in the order they merged to `main`, one per source PR, onto
the current `release/17.0` tip:

1. #22145: Match dashboard All
resources content and sidebar icons
2. #22134: Align resource
endpoint details and link display names
3. #22137: Use smaller labels
and more text width in relationship graphs
4. #22149: Unify dashboard
telemetry footer counts and pause indicators
5. #22135: Use standard font
sizes in the resource selector
6. #22136: Right-align metadata
and actions in the compact resource sidebar
7. #22138: Fix dashboard SVG
tooltips and restore rich trace previews
8. #22192: Fix resource graph
overview padding
9. #22147: Simplify expanded
resource grid actions

All nine applied cleanly, with no conflict resolution.

#22188 (the dashboard home page)
is stacked on this branch. Once both are in `release/17.0`,
`release/17.0` merges back into `main`.

## Customer Impact

The dashboard in 17.0 would otherwise ship without these fixes and
refinements to the resource list, the overview, tooltips and
relationship graphs, all already merged and reviewed on `main`.

## Testing

- `Aspire.Dashboard.Components.Tests` on this branch: 1,440 passed, 0
failed.
- The same changes have been on `main`, with their original tests.

## Risk

Low. Dashboard-only changes that already merged to `main`, applied
without modification.

## Regression?

No.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: James Newton-King <[email protected]>
Co-authored-by: Copilot <[email protected]>
Maddy Montaquila (maddymontaquila) added a commit that referenced this pull request Nov 13, 2026
… the top (#22188)

## Description

The home-page and "list goes to the top" layout from the dashboard IA
discussion.

**The table is its own page.** The table of every resource is the
resource list at full width, not a view of a selection, so it is no
longer a state of the Overview tab. It is the home page at `/`.
`/resources` is only the overview of all resources. Reload, back and
links to `/` show the table without the history-entry marker and per-tab
session value that used to decide between the two.

**No page has a close button.** A tab's content is a page, scoped by the
list beside it, not a pane over the table. The page-level X on Overview
pages (and Escape to close) is removed. The table is reached from the
brand or the browser's back button. The brand is the home button: it has
a house after the application name, filled in while home is showing. The
whole head of the list's column is the button, with the house at its far
end. The table itself has no width control: it is left by choosing a
row, "All resources" or a tab.

**The list goes to the top.** The header's brand is the top of the
list's column, exactly as wide as the docked list, and the tabs start
where the page they switch starts. The brand keeps that width when the
list is hidden or fills the page as the table, so the header doesn't
move when the list does.

### Behavior

| Place | What it shows |
|---|---|
| `/` | The table. No tab is active. Tabs stay visible and open their
view for all resources. |
| `/resources` | The overview of all resources, beside the docked list.
|
| Brand (logo, name, house) | Goes to `/`. The whole cell is clickable.
|
| Collapse button | Beside the page title, as before. Not shown on the
table. |
| `/` on a narrow layout | Redirects to `/resources`, since narrow
layouts have no full-page list. |
| `/?resource=…`, `/?view=Graph`, no resource service | Redirect as
before. |

### Judgment calls worth a look

- **Banners moved above the header.** Under the header they cut the
list's column in two. The alternative is to put them in the content
column only, which makes the list jump when it docks.
- **Tabs have less room.** They share the header with a brand as wide as
the list in every state, so at 1280px with a resource that has a
Terminal tab, Metrics moves into the overflow menu, and at the narrowest
desktop width (769px) only the first tab fits. Hiding the list does not
give the tabs more room.
- **The header uses the page background with hairlines** instead of its
own darker band, so the brand reads as part of the list's column.
- **Home does not restore the last selection.** "All resources" on the
table always lands on the overview of all resources.

### Also fixed

- **Parameter rows in the full-page table keep their "..." menu.**
#22147 showed only the Set parameter button there, which left Delete
parameter unreachable from the table. Restoring the menu also fixes
`ResourcePaneResponsiveTests.Rows_KeepDensityRhythmAndProtectedSidebarActions`,
which fails on main.

### Behavior kept from the close button

The page close button handled two edge cases that the brand now handles:

- **A tab chosen while home is loading** waits for home to land, then
opens for all resources, instead of racing it with a URL for the
previously selected resources. If home lands between focusing a tab and
choosing it, keyboard focus moves to the same tab in the re-created
strip.
- **Motion:** the list grows across the page when the brand is clicked,
and docks with motion from the table's "All resources" row. Arriving
home with the back button or a link shows the table at once.

### Validation

- `Aspire.Dashboard.Components.Tests`: 1,436 passed, 0 failed (after
merging the latest main).
- `Aspire.Dashboard.Playwright.Tests`, including outerloop: everything
passes except 5 tests that also fail on a clean checkout of main:
- `MobileNavMenuTests.MobileNavMenuClosesWhenFocusLeavesMenu` and
`MobileNavFocusRemainsVisibleAtHighZoomViewport`.
-
`DesktopNavMenuTests.MainNavigation_NavigatesBetweenSectionsAndMarksActiveItem`.
-
`ResourcePaneInteractionTests.ResourceRowModifierClicks_SelectSeveralResources`
(Windows/MacIntel case).
-
`BrowserTokenAuthenticationTests.BrowserToken_LoginPage_SuccessWithWhitespaceToken_RedirectToResources`
failed once in the full run, then passed 3 of 3 on its own.
- The timing-sensitive tests this change touches (home then tab,
selection-reveal interruptions, canvas motion, tooltips) passed 3 runs
in a row.
- Checked by hand in TestShop: `/` and reload, row selection from the
table, back, a tab from the table, a click in the empty part of the
brand cell, the home mark at home, and hiding and showing the list.

### Release/17.0

This PR targets `release/17.0`. The dashboard PRs from `main` that it
builds on (#22145, #22134, #22137, #22149, #22135, #22136, #22138,
#22192 and #22147) reached `release/17.0` in
#22230. Once this merges,
`release/17.0` merges back into `main`.

The branch is one commit on the current `release/17.0`. It passes
`Aspire.Dashboard.Components.Tests` (1,443 of 1,443) and
`Aspire.Dashboard.Playwright.Tests` apart from 3 tests that also fail on
`main` (two mobile nav menu tests and one modifier-click case).

## 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
  - [x] No
- Does the change make any security assumptions or guarantees?
  - [ ] Yes
  - [x] No

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Maddy Montaquila <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants