Skip to content

Apply #916 popup-wedge fix to CorrelatedCrosshairManager#922

Merged
erikdarlingdata merged 1 commit into
devfrom
feature/916-correlated-crosshair-tooltip
May 2, 2026
Merged

Apply #916 popup-wedge fix to CorrelatedCrosshairManager#922
erikdarlingdata merged 1 commit into
devfrom
feature/916-correlated-crosshair-tooltip

Conversation

@erikdarlingdata
Copy link
Copy Markdown
Owner

Summary

Sweep for repeats of the WPF Popup wedge bug from #916 found CorrelatedCrosshairManager has the same shape as ChartHoverHelper — multiple charts feed a single tooltip popup, IsOpen = true is set on every mouse move with no re-anchor toggle, and no Loaded / Unloaded / IsVisibleChanged subscriptions on the chart lanes.

CorrelatedTimelineLanesControl is hosted inside Resource Metrics → Server Trends (a TabItem inside a TabItem), so the same wedge applies: WPF unloads the parent on tab switch without firing MouseLeave, leaving _tooltip.IsOpen stuck at true with a stale anchor.

Both Dashboard and Lite copies updated in lockstep per the file's own SYNC WARNING.

  • Subscribe to chart Loaded / Unloaded / IsVisibleChanged in AddLane and force _tooltip.IsOpen = false on each event.
  • In OnMouseMove, toggle IsOpen off then on so WPF re-evaluates placement even when the popup believes it is already open.
  • Unhook the new event handlers in Dispose.

Related to #916

Test plan

  • Build Dashboard and Lite
  • In Dashboard: open a server, navigate to Resource Metrics → Server Trends, hover the timeline lanes, switch to another top-level tab, switch back → tooltip should still appear on hover
  • Same scenario in Lite
  • Sanity-check the existing chart hover tooltips still behave on Memory tab and elsewhere

🤖 Generated with Claude Code

… Lite)

Sweeping for repeats of the WPF Popup wedge bug found CorrelatedCrosshairManager
has the same shape as ChartHoverHelper — multiple charts feed a single tooltip
popup, IsOpen = true is set on every mouse move with no re-anchor toggle, and
no Loaded/Unloaded/IsVisibleChanged subscriptions on the chart lanes.

CorrelatedTimelineLanesControl is hosted inside Resource Metrics → Server
Trends (a TabItem inside a TabItem), so the same wedge applies: WPF unloads
the parent on tab switch without firing MouseLeave, leaving _tooltip.IsOpen
stuck at true with a stale anchor.

Both Dashboard and Lite copies updated in lockstep per the file's own SYNC
WARNING:

- Subscribe to chart Loaded / Unloaded / IsVisibleChanged in AddLane and
  force _tooltip.IsOpen = false on each event.
- In OnMouseMove, toggle IsOpen off then on so WPF re-evaluates placement
  even when the popup believes it is already open.
- Unhook the new event handlers in Dispose.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@erikdarlingdata erikdarlingdata merged commit 7410bc5 into dev May 2, 2026
1 of 2 checks passed
@erikdarlingdata erikdarlingdata deleted the feature/916-correlated-crosshair-tooltip branch May 2, 2026 14:46
erikdarlingdata added a commit that referenced this pull request May 6, 2026
)

PR #919 / #921 / #922 addressed the WPF Popup wedge but missed the
underlying bug: MemoryContent, ResourceMetricsContent, and
QueryPerformanceContent all called DisposeChartHelpers() from their
per-control Unloaded event handler. WPF fires Unloaded on every
TabControl tab switch, not just on destruction, so switching away from
the Memory tab unsubscribed every chart's MouseMove handlers — which
were never re-registered when the user came back. The popup-wedge fixes
were running inside helpers that had already torn themselves down.

ServerTab_Unloaded had the same comment warning future maintainers,
but the inner UserControls didn't follow that rule.

Changes:
- MemoryContent / ResourceMetricsContent / QueryPerformanceContent:
  drop DisposeChartHelpers() (and ThemeManager unsubscribe) from the
  tab-switch Unloaded handler. Move the ThemeManager unsubscribe into
  DisposeChartHelpers() so it runs only on real cleanup.
- SystemEventsContent: same pattern — add a DisposeChartHelpers()
  method that disposes the 19 hover helpers, unsubscribes filter-popup
  events, and unsubscribes ThemeManager. Empty out OnUnloaded.
- ServerTab.CleanupOnClose: add SystemEventsContent.DisposeChartHelpers()
  to the cleanup chain (its hovers leaked on tab close before this).

Final disposal still happens correctly via ServerTab.CleanupOnClose,
which only fires when a server tab is actually removed. Lite is
unaffected — its Unloaded handler never disposed hovers.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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