chore(claude-do): fix(ui): DiffModal — Commit-Range ohne HeadCommit zeigt stil

Befund (bestätigt): src/ClaudeDo.Ui/ViewModels/Modals/DiffModalViewModel.cs, LoadAsync (~Zeile 116): bei FromCommitRange=true aber HeadCommit==null fällt der Ternary still auf GetBranchDiffAsync(WorktreePath, BaseRef) zurück. In diesem Modus ist WorktreePath aber das Listen-Working-Dir (Repo-Root, kein Worktree) — es wird ein falscher Diff angezeigt, ohne jeden Hinweis.

Änderungen:
1. Guard: From

ClaudeDo-Task: d667c80c-3f32-478c-8584-46aec78357b6
This commit is contained in:
mika kuns
2026-06-09 23:14:37 +02:00
parent ddeded988a
commit 7e739afafb
4 changed files with 62 additions and 2 deletions

View File

@@ -110,6 +110,12 @@ public sealed partial class DiffModalViewModel : ViewModelBase
Files.Clear();
StatusMessage = null;
if (FromCommitRange && (BaseRef is null || HeadCommit is null))
{
StatusMessage = Loc.T("vm.diff.unavailable");
return;
}
string raw;
try
{