Skip to content

fix: fix both pause/unpause and step into with lots of tests#1969

Merged
maximilien-noal merged 2 commits intofix/pause_unpause_notiffrom
copilot/sub-pr-1968
Mar 14, 2026
Merged

fix: fix both pause/unpause and step into with lots of tests#1969
maximilien-noal merged 2 commits intofix/pause_unpause_notiffrom
copilot/sub-pr-1968

Conversation

Copy link
Contributor

Copilot AI commented Mar 14, 2026

Fixes stale pause/unpause state between UI and Core, and replaces non-monotonic DateTime.UtcNow timeout measurement in test polling helpers with Stopwatch.

Description of Changes

  • DisassemblyView.axaml.cs: Track visual-tree attachment state; activate/deactivate view model on DataContextChanged to handle attach-before-DataContext lifecycle ordering.
  • StepOverAsmUiTests.cs / StepIntoAsmUiTests.cs: Replace DateTime.UtcNow with Stopwatch in WaitUntil polling helpers for monotonic elapsed-time measurement.
  • DisassemblyViewUiTests.cs: Regression test for attach-before-DataContext ordering and pause event propagation; uses runtime null guard instead of null-forgiving operator on reflected method.

Rationale behind Changes

DisassemblyView could be attached to the visual tree before its DataContext is set, leaving DisassemblyViewModel never activated and the disassembly panel unresponsive to pause events. DateTime.UtcNow in test timeout loops is susceptible to NTP/clock adjustments causing spurious timeouts; Stopwatch is monotonic.

Suggested Testing Steps

Run the UI headless tests — they cover the attach-before-DataContext ordering and step-into/step-over pause state transitions. The original race condition is non-deterministic and difficult to reproduce manually.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: maximilien-noal <1087524+maximilien-noal@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 14, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • av-build-tel-api-v1.avaloniaui.net
    • Triggering command: /usr/share/dotnet/dotnet dotnet exec --runtimeconfig /home/REDACTED/.nuget/packages/avalonia.buildservices/11.3.2/tools/netstandard2.0/runtimeconfig.json /home/REDACTED/.nuget/packages/avalonia.buildservices/11.3.2/tools/netstandard2.0/Avalonia.BuildServices.Collector.dll (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Fix pause/unpause state synchronization fix: fix both pause/unpause and step into with lots of tests Mar 14, 2026
Copilot AI requested a review from maximilien-noal March 14, 2026 15:03
@maximilien-noal maximilien-noal marked this pull request as ready for review March 14, 2026 15:04
@maximilien-noal maximilien-noal merged commit f97443c into fix/pause_unpause_notif Mar 14, 2026
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.

2 participants