fix(ui): offload UnifiedDiffParser.Parse off the UI thread in DiffViewerViewModel

Both call sites (LoadFilesAsync, OnDisplayedDiffChanged) ran the parser
synchronously on the dispatcher, freezing the window on a large diff. The
Files-mode parse+tree-build now runs via Task.Run behind a ParseOp
OperationStatus wired to the toolbar; the planning-mode parse is
fire-and-forget with a generation counter so a fast second DisplayedDiff
change can't write stale PlanningFiles.
This commit is contained in:
Mika Kuns
2026-08-12 13:19:20 +02:00
parent b9827eac01
commit 9fc8ed391e
5 changed files with 69 additions and 3 deletions
@@ -48,6 +48,7 @@
ToolTip.Tip="{loc:Tr modals.diff.wrapLines}">
<PathIcon Data="{StaticResource Icon.Wrap}" Width="14" Height="14"/>
</ToggleButton>
<ctl:OperationIndicator Status="{Binding ParseOp}"/>
</StackPanel>
<!-- Planning toolbar: combined-mode toggle + warning/loading -->