chore(claude-do): refactor(hub): Konflikt-Merge-Methoden eindeutig benennen (C
Kontext: Auf der Hub/Client-Ebene existieren zwei fast gleichnamige Methodenpaare mit unterschiedlicher Semantik: ContinueMerge/AbortMerge (Single-Task-Konflikt-Resolver, Layer C) vs. ContinuePlanningMerge/AbortPlanningMerge (Unit-Merge eines Parents mit Kindern). Verwechslungsgefahr. Änderungen (NUR die Hub/Client/UI-Ebene umbenennen): 1. src/ClaudeDo.Worker/Hub/WorkerHub.cs: ContinueMerge → Con ClaudeDo-Task: 5f2e0f88-d4c9-490b-95a7-46244465dbb6
This commit is contained in:
@@ -56,8 +56,8 @@ public interface IWorkerClient : INotifyPropertyChanged
|
||||
Task<MergeResultDto> StartConflictMergeAsync(string taskId, string targetBranch);
|
||||
Task<MergeConflictsDto> GetMergeConflictsAsync(string taskId);
|
||||
Task WriteConflictResolutionAsync(string taskId, string path, string resolvedContent);
|
||||
Task<MergeResultDto> ContinueMergeAsync(string taskId);
|
||||
Task AbortMergeAsync(string taskId);
|
||||
Task<MergeResultDto> 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);
|
||||
|
||||
@@ -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<MergeResultDto> ContinueMergeAsync(string taskId)
|
||||
=> _hub.InvokeAsync<MergeResultDto>("ContinueMerge", taskId);
|
||||
public Task<MergeResultDto> ContinueConflictMergeAsync(string taskId)
|
||||
=> _hub.InvokeAsync<MergeResultDto>("ContinueConflictMerge", taskId);
|
||||
|
||||
public Task AbortMergeAsync(string taskId)
|
||||
=> _hub.InvokeAsync("AbortMerge", taskId);
|
||||
public Task AbortConflictMergeAsync(string taskId)
|
||||
=> _hub.InvokeAsync("AbortConflictMerge", taskId);
|
||||
|
||||
public Task<MergeTargetsDto?> GetMergeTargetsAsync(string taskId)
|
||||
=> TryInvokeAsync<MergeTargetsDto>("GetMergeTargets", taskId);
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -357,7 +357,7 @@ public sealed class WorkerHub : Microsoft.AspNetCore.SignalR.Hub
|
||||
=> HubGuard(() => _mergeService.WriteResolutionAsync(
|
||||
taskId, path, resolvedContent ?? "", CancellationToken.None));
|
||||
|
||||
public Task<MergeResultDto> ContinueMerge(string taskId)
|
||||
public Task<MergeResultDto> 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);
|
||||
|
||||
@@ -67,8 +67,8 @@ public abstract class StubWorkerClient : IWorkerClient
|
||||
public virtual Task<MergeResultDto> StartConflictMergeAsync(string taskId, string targetBranch) => Task.FromResult(new MergeResultDto("conflict", System.Array.Empty<string>(), null));
|
||||
public virtual Task<MergeConflictsDto> GetMergeConflictsAsync(string taskId) => Task.FromResult(new MergeConflictsDto(taskId, System.Array.Empty<ConflictFileDto>()));
|
||||
public virtual Task WriteConflictResolutionAsync(string taskId, string path, string resolvedContent) => Task.CompletedTask;
|
||||
public virtual Task<MergeResultDto> ContinueMergeAsync(string taskId) => Task.FromResult(new MergeResultDto("merged", System.Array.Empty<string>(), null));
|
||||
public virtual Task AbortMergeAsync(string taskId) => Task.CompletedTask;
|
||||
public virtual Task<MergeResultDto> ContinueConflictMergeAsync(string taskId) => Task.FromResult(new MergeResultDto("merged", System.Array.Empty<string>(), 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;
|
||||
|
||||
@@ -30,13 +30,13 @@ public class ConflictResolverViewModelTests
|
||||
WrittenPath = path; WrittenContent = resolvedContent; return Task.CompletedTask;
|
||||
}
|
||||
|
||||
public override Task<MergeResultDto> ContinueMergeAsync(string taskId)
|
||||
public override Task<MergeResultDto> ContinueConflictMergeAsync(string taskId)
|
||||
{
|
||||
Continued = true;
|
||||
return Task.FromResult(new MergeResultDto(ContinueStatus, System.Array.Empty<string>(), null));
|
||||
}
|
||||
|
||||
public override Task AbortMergeAsync(string taskId) { Aborted = true; return Task.CompletedTask; }
|
||||
public override Task AbortConflictMergeAsync(string taskId) { Aborted = true; return Task.CompletedTask; }
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
@@ -53,8 +53,8 @@ sealed class FakeWorkerClient : IWorkerClient
|
||||
public Task<MergeResultDto> StartConflictMergeAsync(string taskId, string targetBranch) => Task.FromResult(new MergeResultDto("conflict", System.Array.Empty<string>(), null));
|
||||
public Task<MergeConflictsDto> GetMergeConflictsAsync(string taskId) => Task.FromResult(new MergeConflictsDto(taskId, System.Array.Empty<ConflictFileDto>()));
|
||||
public Task WriteConflictResolutionAsync(string taskId, string path, string resolvedContent) => Task.CompletedTask;
|
||||
public Task<MergeResultDto> ContinueMergeAsync(string taskId) => Task.FromResult(new MergeResultDto("merged", System.Array.Empty<string>(), null));
|
||||
public Task AbortMergeAsync(string taskId) => Task.CompletedTask;
|
||||
public Task<MergeResultDto> ContinueConflictMergeAsync(string taskId) => Task.FromResult(new MergeResultDto("merged", System.Array.Empty<string>(), 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;
|
||||
|
||||
Reference in New Issue
Block a user