fix(merge): pass the stash consent to the conflict resolver so it opens on a dirty target

The resolver restarts the merge via StartConflictMerge, which had no autostash.
After a stash-retry approve reported 'conflict', the restart hit the same dirty
target, got 'dirty_target' and the resolver silently never opened. Thread the
consent through the hub, client, coordinator and resolver; surface a refusal in
the footer instead of dropping it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
mika kuns
2026-10-02 17:25:52 +02:00
co-authored by Claude Sonnet 5.5
parent ff7197c410
commit feb0afa33a
16 changed files with 173 additions and 20 deletions
@@ -109,13 +109,15 @@ public sealed partial class IslandsShellViewModel : ViewModelBase, IDisposable
BringToFront?.Invoke();
}
public async Task RequestConflictResolutionAsync(string taskId, string targetBranch)
public async Task RequestConflictResolutionAsync(string taskId, string targetBranch, bool autostash = false)
{
if (ConflictResolverFactory is null || Dialogs is null) return;
var vm = ConflictResolverFactory(taskId);
var hasConflicts = await vm.OpenAsync(targetBranch);
var hasConflicts = await vm.OpenAsync(targetBranch, autostash);
if (hasConflicts)
await Dialogs.ShowConflictResolverAsync(vm);
else if (vm.Error is { } error)
FlashFooterError(error);
}
[ObservableProperty] private bool _isUpdateBannerVisible;