fix: fix both pause/unpause and step into with lots of tests#1968
fix: fix both pause/unpause and step into with lots of tests#1968maximilien-noal wants to merge 13 commits intomasterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes a UI/Core synchronization edge case where DisassemblyViewModel could remain inactive when DisassemblyView is attached to the visual tree before its DataContext is assigned, causing stale pause/unpause state in the disassembly UI.
Changes:
- Track visual-tree attachment state in
DisassemblyViewand activate/deactivate the view model appropriately onDataContextChanged. - Add an Avalonia headless UI test that reproduces the attach-before-DataContext lifecycle ordering and verifies pause state updates.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/Spice86.Tests/UI/DisassemblyViewUiTests.cs | Adds a headless UI regression test for attach-before-DataContext ordering and pause event propagation. |
| src/Spice86/Views/DisassemblyView.axaml.cs | Ensures view model activation/deactivation is consistent even when DataContext is set after visual-tree attachment. |
You can also share your feedback on Copilot code review. Take the survey.
…iewModel and MainWindowViewModel
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
You can also share your feedback on Copilot code review. Take the survey.
|
@copilot implement changes based on this feedback #1968 (review) |
|
@maximilien-noal I've opened a new pull request, #1969, to work on those changes. Once the pull request is ready, I'll request review from you. |
* Initial plan * fix: use Stopwatch instead of DateTime.UtcNow in WaitUntil helpers Co-authored-by: maximilien-noal <1087524+maximilien-noal@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: maximilien-noal <1087524+maximilien-noal@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
You can also share your feedback on Copilot code review. Take the survey.
Description of Changes
Fixes stale pause/unpause state between UI and Core, and internal debugger UI step Into function.
Rationale behind Changes
Depending on timings, the disassembly was disabled when the emulator was paused.
Step into was not using the right kind of breakpoints, making it leave breakpoints that stayed after being hit.
Suggested Testing Steps
TDD and manual tests ensure this is fixed. But tests are welcome.