Skip to content

feature: Add jump arc visualization to disassembly view#1961

Open
maximilien-noal wants to merge 9 commits intomasterfrom
feature/better_step_into
Open

feature: Add jump arc visualization to disassembly view#1961
maximilien-noal wants to merge 9 commits intomasterfrom
feature/better_step_into

Conversation

@maximilien-noal
Copy link
Member

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

Visualize control flow with jump lines/arrows for branches. Introduced JumpLinesControl and JumpLineCalculator for lane assignment. DebuggerLineViewModel tracks jump arc segments and lane counts. Updated DisassemblyView layout and resource brushes for jump lines.

image

Visualize control flow with jump lines/arrows for branches.
Introduced JumpLinesControl and JumpLineCalculator for lane assignment.
DebuggerLineViewModel tracks jump arc segments and lane counts.
Updated DisassemblyView layout and resource brushes for jump lines.
Copilot AI review requested due to automatic review settings March 11, 2026 19:18
@maximilien-noal maximilien-noal self-assigned this Mar 11, 2026
@maximilien-noal maximilien-noal added the UI UI work label Mar 11, 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

Adds jump-arc (control-flow) visualization to the disassembly list, enabling users to see branch/jump relationships directly in the debugger UI.

Changes:

  • Introduces JumpLinesControl to render per-line jump lane segments (lines/corners/arrowheads).
  • Adds JumpLineCalculator plus supporting JumpArcSegment/JumpSegmentType models to compute lane assignments and segments.
  • Updates DisassemblyView layout/resources and extends the disassembly view model with a ShowJumpLines toggle.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/Spice86/Views/Styles/DisassemblyResources.axaml Adds theme brushes for jump lines and arrowheads.
src/Spice86/Views/DisassemblyView.axaml Adds toolbar toggle and a new grid column hosting JumpLinesControl.
src/Spice86/Views/Controls/JumpLinesControl.cs New custom-drawn control for rendering jump lane segments and arrows.
src/Spice86/ViewModels/Services/JumpLineCalculator.cs Computes jump arcs and assigns non-overlapping lanes for visible lines.
src/Spice86/ViewModels/JumpSegmentType.cs Defines segment roles (top/bottom/middle) for rendering.
src/Spice86/ViewModels/JumpArcSegment.cs Defines per-line segment data (lane/type/target flag).
src/Spice86/ViewModels/IDisassemblyViewModel.cs Adds ShowJumpLines to the disassembly VM contract.
src/Spice86/ViewModels/DisassemblyViewModel.cs Implements the toggle and triggers arc computation when enabled.
src/Spice86/ViewModels/DebuggerLineViewModel.cs Tracks per-line jump segments + lane count; adds unconditional-branch detection.

You can also share your feedback on Copilot code review. Take the survey.

maximilien-noal and others added 7 commits March 11, 2026 20:26
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>
Improved performance by caching Pen objects and reusing a static arrow geometry for drawing. Refactored arrow drawing to use a single geometry instance, translated as needed, reducing allocations and memory usage during rendering.
Jump arcs in the disassembly view now use a theme-aware color palette to visually distinguish overlapping arcs. Each segment selects its color via a ColorIndex, and arrowheads match the arc color. ArrowBrush has been removed. Palette brushes are defined in DisassemblyResources.axaml for both light and dark themes, improving clarity and usability.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

UI UI work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants