Skip to content

Plan viewer: the Wait Stats header's tooltip matches PerformanceStudio - #4591

Merged
erikdarlingdata merged 6 commits into
devfrom
viewer/4571-wait-card-collapsible
Sep 28, 2026
Merged

erikdarlingdata merged 6 commits into
devfrom
viewer/4571-wait-card-collapsible

Conversation

@erikdarlingdata

@erikdarlingdata erikdarlingdata commented Sep 28, 2026 •

Copy link
Copy Markdown
Owner

Part of #4511

Why

PerformanceStudio's desktop plan viewer keeps Wait Stats inside the plan's one collapsible panel, with no separate expander per card. It also shows a tooltip on the Wait Stats header giving the total wait time and wait-type count. This PR brings the tooltip over and drops an earlier attempt at a per-card collapsible expander, which was a web-viewer-only feature that doesn't belong on the desktop-parity surface.

What changes

  • PlanViewerControl.Properties.cs: the Wait Stats header's ToolTip is now set to PlanDisplayText.WaitStatsHeaderTooltip(waitCount, totalWaitMs) wherever the header text itself is set — null (no tooltip) when there are no waits, otherwise the total wait time in milliseconds and the wait-type count.
  • PlanViewerControl.xaml: reverted to its prior structure (one ScrollViewer/StackPanel, no Expander around the Wait Stats card).
  • PlanDisplayText.cs: removed the WaitStatsHeader helper and its doc comment, since nothing calls it any more; the header text is set directly in the code-behind as it was on dev.
  • Viewer4571Tests.cs: kept only the tooltip pins (null when no waits; total + count string when there are), removed the header-text pins that pointed at the now-removed helper.

Test plan

  • dotnet build Darling/Darling.Tests/Darling.Tests.csproj -c Release -p:EnableWindowsTargeting=true — 0 warnings, 0 errors.
  • dotnet build PerformanceMonitor.Ui/PerformanceMonitor.Ui.csproj -c Release -p:EnableWindowsTargeting=true — 0 warnings, 0 errors.
  • Ran in-process on macOS (Microsoft.WindowsDesktop.App framework entry stripped from the runtimeconfig): Darling.Tests.Viewer4571Tests — 2/2 passed.
  • Census family: CommentFilterAdoptionTests (4/4), DocCommentHygieneTests (77/77), McpPayloadContractCensusTests (68/68) — all passed. The remaining *Census* classes are unaffected by this diff (no new source files, no MCP payload or migration changes) and were not run.

CHANGELOG entry

SECTION: Changed
ENTRY: - The plan viewer's Wait Stats header shows the total wait time and wait-type count on hover ([#4591]) - Matches the desktop viewer's tooltip behavior; no visible layout change otherwise.
REF: [#4591]: #4591

erikdarlingdata and others added 6 commits September 28, 2026 10:01
Ports erikdarlingdata/PerformanceStudio@9b8252e to the shared WPF plan
viewer (PerformanceMonitor.Ui/PlanViewerControl.xaml, hosted by both
the Darling Viewer and Lite). The Wait Stats card gets its own nested
Expander, closed by default, instead of always showing alongside
Runtime Summary and Missing Index Suggestions inside the outer
Insights expander.

The header text moves to a pure helper, PlanDisplayText.WaitStatsHeader,
matching PS's format: "Wait Stats" alone when there's nothing to show,
or "Wait Stats N ms" with the total wait time when there is.
…#4571)

The collapsible Wait Stats card's header now reads "Wait Stats" when
empty, or "Wait Stats — N ms total" when there is a total wait time,
matching PlanViewerControl.WaitStats.cs in the desktop viewer.
…der tooltip

Matches PerformanceStudio desktop's Wait Stats header tooltip, shown only
when there are waits to describe.
@erikdarlingdata erikdarlingdata changed the title Plan viewer: make the Wait Stats card collapsible, closed by default Plan viewer: the Wait Stats header's tooltip matches PerformanceStudio Sep 28, 2026
@erikdarlingdata
erikdarlingdata marked this pull request as ready for review September 28, 2026 15:38
@erikdarlingdata
erikdarlingdata merged commit cd81d55 into dev Sep 28, 2026
17 of 18 checks passed
@erikdarlingdata
erikdarlingdata deleted the viewer/4571-wait-card-collapsible branch September 28, 2026 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant