diff --git a/src/ClaudeDo.Ui/ViewModels/Modals/DiffModels.cs b/src/ClaudeDo.Ui/ViewModels/Modals/DiffModels.cs index 17a7d1c1..9f9dd0b5 100644 --- a/src/ClaudeDo.Ui/ViewModels/Modals/DiffModels.cs +++ b/src/ClaudeDo.Ui/ViewModels/Modals/DiffModels.cs @@ -54,6 +54,14 @@ public sealed class DiffFileViewModel /// A text file that produced no diff hunks (e.g. a newly added empty file). public bool IsEmptyContent => !IsBinary && Lines.Count == 0; + + /// A rename with no content change — showing "+0 −0" for it is misleading. + public bool IsPureRename => Status == DiffFileStatus.Renamed && Additions == 0 && Deletions == 0; + + /// Header path label: for a rename, spell out old → new; otherwise just the path. + public string HeaderPath => Status == DiffFileStatus.Renamed && !string.IsNullOrEmpty(OldPath) + ? $"{OldPath} → {Path}" + : Path; } /// One row in the planning subtask list (left pane in Planning mode). @@ -72,7 +80,7 @@ public sealed partial class DiffTreeNodeViewModel : ViewModelBase [ObservableProperty] private bool _isExpanded = true; public string? StatusCode => File?.StatusCode; - public bool ShowStats => File is { IsBinary: false }; + public bool ShowStats => File is { IsBinary: false, IsPureRename: false }; public int Additions => File?.Additions ?? 0; public int Deletions => File?.Deletions ?? 0; } diff --git a/src/ClaudeDo.Ui/Views/Modals/DiffViewerView.axaml b/src/ClaudeDo.Ui/Views/Modals/DiffViewerView.axaml index 6e19cb84..45f494d6 100644 --- a/src/ClaudeDo.Ui/Views/Modals/DiffViewerView.axaml +++ b/src/ClaudeDo.Ui/Views/Modals/DiffViewerView.axaml @@ -131,7 +131,7 @@ FontFamily="{DynamicResource MonoFont}" FontSize="{StaticResource FontSizeEyebrow}" Foreground="{DynamicResource TextBrush}"/> -