fix(review): propagate HubException from ApproveReviewAsync so blocked merges surface errors
TryInvokeAsync swallowed all exceptions including HubException, so a blocked merge (uncommitted changes in target, mid-merge state, inactive worktree) returned null silently — the task stayed WaitingForReview with no feedback shown. Switch to a direct _hub.InvokeAsync so both VM catch blocks (TasksIsland ErrorReported, DetailsIsland ShowErrorAsync) actually fire. Add regression tests for both call sites verifying that a throwing worker causes the error to be reported.
This commit is contained in:
@@ -450,10 +450,10 @@ public partial class WorkerClient : ObservableObject, IAsyncDisposable, IWorkerC
|
||||
await _hub.InvokeAsync("SetTaskStatus", taskId, status.ToString());
|
||||
}
|
||||
|
||||
public Task<MergeResultDto?> ApproveReviewAsync(string taskId, string targetBranch)
|
||||
public async Task<MergeResultDto?> ApproveReviewAsync(string taskId, string targetBranch)
|
||||
{
|
||||
LastApproveTarget = targetBranch;
|
||||
return TryInvokeAsync<MergeResultDto>("ApproveReview", taskId, targetBranch);
|
||||
return await _hub.InvokeAsync<MergeResultDto>("ApproveReview", taskId, targetBranch);
|
||||
}
|
||||
|
||||
public Task<MergePreviewDto?> PreviewMergeAsync(string taskId, string targetBranch)
|
||||
|
||||
Reference in New Issue
Block a user