fix(ui): early-return in ResetAsync when ConfirmAsync is unwired

This commit is contained in:
Mika Kuns
2026-04-21 17:42:36 +02:00
parent b03e858a8f
commit f90d3d8375

View File

@@ -427,12 +427,12 @@ public sealed partial class DetailsIslandViewModel : ViewModelBase
private async System.Threading.Tasks.Task ResetAsync()
{
if (Task == null) return;
if (ConfirmAsync != null)
{
if (ConfirmAsync == null) return;
var branchName = $"claudedo/{Task.Id.Replace("-", "")}";
var ok = await ConfirmAsync($"Discard worktree and reset task?\nThis deletes branch {branchName} and all uncommitted changes.");
if (!ok) return;
}
await _worker.ResetTaskAsync(Task.Id);
}