You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File Diff should provide clickable markers for individual changes, with the same precise jump-to-line interaction as the IR Code overview ruler. This would make it easier to navigate long IR files containing many changes far apart.
Related: #422, which introduced the overview ruler for mapped IR line highlights.
Expected behavior
Show a marker for each contiguous change in the current diff, without requiring the user to select a line first.
Represent deleted ranges on the original/left track in red and inserted ranges on the modified/right track in green. Replacements should retain their paired original and modified ranges.
Clicking or keyboard-activating a marker reveals its corresponding change and centers the target when possible. A deletion targets the original editor; an insertion targets the modified editor. Keep the two panes aligned through Monaco's existing scroll synchronization. For a change larger than the viewport, reveal its beginning.
Hover text and accessible labels identify the change type and its original/modified line ranges, as applicable.
Work in both Single IR mode and every expanded comparison in All IR mode.
Update or clear markers when either input, selected kernel, or IR changes. Identical content must leave no stale markers.
Implementation considerations
Use Monaco's existing diff results, for example through onDidUpdateDiff and getLineChanges(), so the markers agree with the changes shown in the editor.
Reuse the shared OverviewRuler presentation and interaction where appropriate. Its current interface accepts individual highlighted line numbers; diff navigation needs change ranges, side information, and change types.
Account for actual editor layout when positioning markers: word wrapping, hidden unchanged regions and their context, and blank rows inserted to align the two panes all affect vertical positions. The existing IR ruler's raw line-number percentage is insufficient for matching the diff's scroll geometry.
Render ranges as blocks with a usable minimum hit area, avoiding one DOM element per changed line. Dense changes should remain individually reachable, for example through a list when markers overlap.
Provide one coherent ruler experience, with the current viewport indication, and keep the scrollbar usable. Dispose subscriptions with their associated diff editor.
Acceptance criteria
Widely separated changes in a long IR are individually reachable by clicking or keyboard-activating their markers.
Pure insertions, pure deletions, replacements, changes at the first/last line, and an empty file on either side navigate to valid targets.
Marker positions and navigation remain correct with Wrap on/off, Only changed on/off, context changes, manual expansion of hidden regions, and panel resizing.
Changing files, kernels, or IR stages refreshes the markers without stale destinations; identical inputs clear them.
Multiple expanded comparisons in All IR mode maintain independent markers and navigation.
Large changes and dense diffs remain usable without noticeable rendering or scrolling regressions.
Opened by @FindHao's AI agent on their behalf, following their request for this feature.
File Diff should provide clickable markers for individual changes, with the same precise jump-to-line interaction as the IR Code overview ruler. This would make it easier to navigate long IR files containing many changes far apart.
File Diff already enables Monaco's native overview ruler. Its pointer interaction uses scrollbar navigation. IR Code has explicit marker clicks that center the target line. Bring that precise navigation experience to File Diff, using the computed changes as the markers.
Related: #422, which introduced the overview ruler for mapped IR line highlights.
Expected behavior
Implementation considerations
onDidUpdateDiffandgetLineChanges(), so the markers agree with the changes shown in the editor.Acceptance criteria
Opened by @FindHao's AI agent on their behalf, following their request for this feature.