Skip to content

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

Open
maximilien-noal wants to merge 13 commits intomasterfrom
fix/pause_unpause_notif
Open

fix: fix both pause/unpause and step into with lots of tests#1968
maximilien-noal wants to merge 13 commits intomasterfrom
fix/pause_unpause_notif

Conversation

@maximilien-noal
Copy link
Member

@maximilien-noal maximilien-noal commented Mar 13, 2026

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.

@maximilien-noal maximilien-noal self-assigned this Mar 13, 2026
Copilot AI review requested due to automatic review settings March 13, 2026 22:02
@maximilien-noal maximilien-noal added UI UI work bugfix fixes a bug labels Mar 13, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 DisassemblyView and activate/deactivate the view model appropriately on DataContextChanged.
  • 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.

maximilien-noal and others added 2 commits March 14, 2026 15:29
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@maximilien-noal maximilien-noal requested a review from Copilot March 14, 2026 14:30
@maximilien-noal maximilien-noal changed the title fix: implement pause/unpause notification handling in DisassemblyView fix: implement pause/unpause and step into with lots of tests Mar 14, 2026
@maximilien-noal maximilien-noal changed the title fix: implement pause/unpause and step into with lots of tests fix: $pause/unpause and step into with lots of tests Mar 14, 2026
@maximilien-noal maximilien-noal changed the title fix: $pause/unpause and step into with lots of tests fix: fix both pause/unpause and step into with lots of tests Mar 14, 2026
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@maximilien-noal
Copy link
Member Author

@copilot implement changes based on this feedback #1968 (review)

Copy link
Contributor

Copilot AI commented Mar 14, 2026

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

Copilot AI and others added 3 commits March 14, 2026 16:04
* 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>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix fixes a bug UI UI work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants