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:
mika kuns
2026-07-24 11:14:06 +02:00
parent 85d0f9dcec
commit da6a70aec1
2 changed files with 16 additions and 4 deletions
@@ -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));
}
}