diff --git a/src/ClaudeDo.Ui/Services/Interfaces/IWorkerClient.cs b/src/ClaudeDo.Ui/Services/Interfaces/IWorkerClient.cs index 5ea64aa..8303fa0 100644 --- a/src/ClaudeDo.Ui/Services/Interfaces/IWorkerClient.cs +++ b/src/ClaudeDo.Ui/Services/Interfaces/IWorkerClient.cs @@ -56,8 +56,8 @@ public interface IWorkerClient : INotifyPropertyChanged Task StartConflictMergeAsync(string taskId, string targetBranch); Task GetMergeConflictsAsync(string taskId); Task WriteConflictResolutionAsync(string taskId, string path, string resolvedContent); - Task ContinueMergeAsync(string taskId); - Task AbortMergeAsync(string taskId); + Task ContinueConflictMergeAsync(string taskId); + Task AbortConflictMergeAsync(string taskId); Task StartPlanningSessionAsync(string taskId, CancellationToken ct = default); Task OpenInteractiveTerminalAsync(string taskId, CancellationToken ct = default); Task ResumePlanningSessionAsync(string taskId, CancellationToken ct = default); diff --git a/src/ClaudeDo.Ui/Services/WorkerClient.cs b/src/ClaudeDo.Ui/Services/WorkerClient.cs index c04998d..08a274d 100644 --- a/src/ClaudeDo.Ui/Services/WorkerClient.cs +++ b/src/ClaudeDo.Ui/Services/WorkerClient.cs @@ -278,11 +278,11 @@ public partial class WorkerClient : ObservableObject, IAsyncDisposable, IWorkerC public Task WriteConflictResolutionAsync(string taskId, string path, string resolvedContent) => _hub.InvokeAsync("WriteConflictResolution", taskId, path, resolvedContent); - public Task ContinueMergeAsync(string taskId) - => _hub.InvokeAsync("ContinueMerge", taskId); + public Task ContinueConflictMergeAsync(string taskId) + => _hub.InvokeAsync("ContinueConflictMerge", taskId); - public Task AbortMergeAsync(string taskId) - => _hub.InvokeAsync("AbortMerge", taskId); + public Task AbortConflictMergeAsync(string taskId) + => _hub.InvokeAsync("AbortConflictMerge", taskId); public Task GetMergeTargetsAsync(string taskId) => TryInvokeAsync("GetMergeTargets", taskId); diff --git a/src/ClaudeDo.Ui/ViewModels/Conflicts/ConflictResolverViewModel.cs b/src/ClaudeDo.Ui/ViewModels/Conflicts/ConflictResolverViewModel.cs index c0c15a8..549760c 100644 --- a/src/ClaudeDo.Ui/ViewModels/Conflicts/ConflictResolverViewModel.cs +++ b/src/ClaudeDo.Ui/ViewModels/Conflicts/ConflictResolverViewModel.cs @@ -88,7 +88,7 @@ public sealed partial class ConflictResolverViewModel : ObservableObject foreach (var file in Files) await _worker.WriteConflictResolutionAsync(_taskId, file.Path, file.ComposeResolvedContent()); - var result = await _worker.ContinueMergeAsync(_taskId); + var result = await _worker.ContinueConflictMergeAsync(_taskId); if (string.Equals(result.Status, "merged", StringComparison.Ordinal)) CloseRequested?.Invoke(); else @@ -105,7 +105,7 @@ public sealed partial class ConflictResolverViewModel : ObservableObject private async Task AbortAsync() { IsBusy = true; - try { await _worker.AbortMergeAsync(_taskId); } + try { await _worker.AbortConflictMergeAsync(_taskId); } catch (Exception ex) { Error = ex.Message; } finally { diff --git a/src/ClaudeDo.Worker/Hub/WorkerHub.cs b/src/ClaudeDo.Worker/Hub/WorkerHub.cs index 0bb6d54..f87a550 100644 --- a/src/ClaudeDo.Worker/Hub/WorkerHub.cs +++ b/src/ClaudeDo.Worker/Hub/WorkerHub.cs @@ -357,7 +357,7 @@ public sealed class WorkerHub : Microsoft.AspNetCore.SignalR.Hub => HubGuard(() => _mergeService.WriteResolutionAsync( taskId, path, resolvedContent ?? "", CancellationToken.None)); - public Task ContinueMerge(string taskId) + public Task ContinueConflictMerge(string taskId) => HubGuard(async () => { var r = await _mergeService.ContinueMergeAsync(taskId, CancellationToken.None); @@ -366,7 +366,7 @@ public sealed class WorkerHub : Microsoft.AspNetCore.SignalR.Hub return new MergeResultDto(r.Status, r.ConflictFiles, r.ErrorMessage); }); - public Task AbortMerge(string taskId) + public Task AbortConflictMerge(string taskId) => HubGuard(async () => { var r = await _mergeService.AbortMergeAsync(taskId, CancellationToken.None); diff --git a/tests/ClaudeDo.Ui.Tests/StubWorkerClient.cs b/tests/ClaudeDo.Ui.Tests/StubWorkerClient.cs index e331be9..233cfe1 100644 --- a/tests/ClaudeDo.Ui.Tests/StubWorkerClient.cs +++ b/tests/ClaudeDo.Ui.Tests/StubWorkerClient.cs @@ -67,8 +67,8 @@ public abstract class StubWorkerClient : IWorkerClient public virtual Task StartConflictMergeAsync(string taskId, string targetBranch) => Task.FromResult(new MergeResultDto("conflict", System.Array.Empty(), null)); public virtual Task GetMergeConflictsAsync(string taskId) => Task.FromResult(new MergeConflictsDto(taskId, System.Array.Empty())); public virtual Task WriteConflictResolutionAsync(string taskId, string path, string resolvedContent) => Task.CompletedTask; - public virtual Task ContinueMergeAsync(string taskId) => Task.FromResult(new MergeResultDto("merged", System.Array.Empty(), null)); - public virtual Task AbortMergeAsync(string taskId) => Task.CompletedTask; + public virtual Task ContinueConflictMergeAsync(string taskId) => Task.FromResult(new MergeResultDto("merged", System.Array.Empty(), null)); + public virtual Task AbortConflictMergeAsync(string taskId) => Task.CompletedTask; public virtual Task StartPlanningSessionAsync(string taskId, CancellationToken ct = default) => Task.CompletedTask; public virtual Task OpenInteractiveTerminalAsync(string taskId, CancellationToken ct = default) => Task.CompletedTask; public virtual Task ResumePlanningSessionAsync(string taskId, CancellationToken ct = default) => Task.CompletedTask; diff --git a/tests/ClaudeDo.Ui.Tests/ViewModels/ConflictResolverViewModelTests.cs b/tests/ClaudeDo.Ui.Tests/ViewModels/ConflictResolverViewModelTests.cs index 842f95a..da88a88 100644 --- a/tests/ClaudeDo.Ui.Tests/ViewModels/ConflictResolverViewModelTests.cs +++ b/tests/ClaudeDo.Ui.Tests/ViewModels/ConflictResolverViewModelTests.cs @@ -30,13 +30,13 @@ public class ConflictResolverViewModelTests WrittenPath = path; WrittenContent = resolvedContent; return Task.CompletedTask; } - public override Task ContinueMergeAsync(string taskId) + public override Task ContinueConflictMergeAsync(string taskId) { Continued = true; return Task.FromResult(new MergeResultDto(ContinueStatus, System.Array.Empty(), null)); } - public override Task AbortMergeAsync(string taskId) { Aborted = true; return Task.CompletedTask; } + public override Task AbortConflictMergeAsync(string taskId) { Aborted = true; return Task.CompletedTask; } } [Fact] diff --git a/tests/ClaudeDo.Worker.Tests/UiVm/TasksIslandViewModelPlanningTests.cs b/tests/ClaudeDo.Worker.Tests/UiVm/TasksIslandViewModelPlanningTests.cs index 320f93e..b338a47 100644 --- a/tests/ClaudeDo.Worker.Tests/UiVm/TasksIslandViewModelPlanningTests.cs +++ b/tests/ClaudeDo.Worker.Tests/UiVm/TasksIslandViewModelPlanningTests.cs @@ -53,8 +53,8 @@ sealed class FakeWorkerClient : IWorkerClient public Task StartConflictMergeAsync(string taskId, string targetBranch) => Task.FromResult(new MergeResultDto("conflict", System.Array.Empty(), null)); public Task GetMergeConflictsAsync(string taskId) => Task.FromResult(new MergeConflictsDto(taskId, System.Array.Empty())); public Task WriteConflictResolutionAsync(string taskId, string path, string resolvedContent) => Task.CompletedTask; - public Task ContinueMergeAsync(string taskId) => Task.FromResult(new MergeResultDto("merged", System.Array.Empty(), null)); - public Task AbortMergeAsync(string taskId) => Task.CompletedTask; + public Task ContinueConflictMergeAsync(string taskId) => Task.FromResult(new MergeResultDto("merged", System.Array.Empty(), null)); + public Task AbortConflictMergeAsync(string taskId) => Task.CompletedTask; public Task RejectReviewToQueueAsync(string taskId, string feedback) => Task.CompletedTask; public Task RejectReviewToIdleAsync(string taskId) => Task.CompletedTask; public Task CancelReviewAsync(string taskId) => Task.CompletedTask;