feat(ui): conflict resolver shows why Continue is disabled
Continue was already gated on CanContinue (all files resolved); surface a footer hint counting the still-unresolved conflicts/files so the disabled state is explained, not just for binary files.
This commit is contained in:
@@ -103,9 +103,19 @@ public sealed partial class ConflictResolverViewModel : ObservableObject
|
||||
}
|
||||
}
|
||||
|
||||
public string ContinueHint => HasBinaryFiles
|
||||
? "Binary conflicts must be resolved externally — abort and resolve in your editor."
|
||||
: "";
|
||||
public string ContinueHint
|
||||
{
|
||||
get
|
||||
{
|
||||
if (HasBinaryFiles)
|
||||
return "Binary conflicts must be resolved externally — abort and resolve in your editor.";
|
||||
var openFiles = Files.Count(f => !f.AllResolved);
|
||||
if (openFiles == 0) return "";
|
||||
var openConflicts = _flat.Count(x => !x.Block.IsResolved);
|
||||
return $"{openConflicts} {(openConflicts == 1 ? "conflict" : "conflicts")} in " +
|
||||
$"{openFiles} {(openFiles == 1 ? "file" : "files")} still unresolved.";
|
||||
}
|
||||
}
|
||||
|
||||
private bool InRange => CurrentIndex >= 0 && CurrentIndex < _flat.Count;
|
||||
|
||||
@@ -188,6 +198,7 @@ public sealed partial class ConflictResolverViewModel : ObservableObject
|
||||
OnPropertyChanged(nameof(HasBinaryFiles));
|
||||
OnPropertyChanged(nameof(HasMultipleFiles));
|
||||
OnPropertyChanged(nameof(FilesSummary));
|
||||
OnPropertyChanged(nameof(ContinueHint));
|
||||
RecomputeCanContinue();
|
||||
if (_flat.Count > 0)
|
||||
MoveTo(0); // also sets ActiveFile via MoveTo
|
||||
@@ -211,6 +222,7 @@ public sealed partial class ConflictResolverViewModel : ObservableObject
|
||||
OnPropertyChanged(nameof(PositionText));
|
||||
OnPropertyChanged(nameof(ActiveResultText));
|
||||
OnPropertyChanged(nameof(FilesSummary));
|
||||
OnPropertyChanged(nameof(ContinueHint));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user