fix(worker,ui): clean up three review leftovers from the list-handler run

Remove the redundant TaskUpdated broadcast in TaskRunner.ContinueAsync's
queue-claim path, consolidate InteractiveLaunchSpecService's seven
MCP_TOOL_TIMEOUT literals into one constant (fixing the merge-helper handoff
spec's stale 200000ms value), and surface OpenQuickClaudeSession's two
failure cases via ErrorReported/footer instead of a silent no-op, with a
less ambiguous icon.
This commit is contained in:
mika kuns
2026-08-06 11:31:03 +02:00
parent b66ce580de
commit b54a133c16
10 changed files with 220 additions and 17 deletions
@@ -79,4 +79,46 @@ public sealed class QueueClaimTaskUpdatedBroadcastTests : IDisposable
releaseProcess.TrySetResult();
await runTask;
}
[Fact]
public async Task ContinueAsync_with_alreadyClaimed_broadcasts_TaskUpdated_exactly_once_before_the_run_finishes()
{
string listId = Guid.NewGuid().ToString(), taskId = Guid.NewGuid().ToString();
using (var ctx = _db.CreateContext())
{
ctx.Lists.Add(new ListEntity { Id = listId, Name = "L", WorkingDir = null, CreatedAt = DateTime.UtcNow });
ctx.Tasks.Add(new TaskEntity
{
Id = taskId, ListId = listId, Title = "T", Status = TaskStatus.Running,
StartedAt = DateTime.UtcNow, CreatedAt = DateTime.UtcNow,
});
ctx.TaskRuns.Add(new TaskRunEntity
{
Id = Guid.NewGuid().ToString(), TaskId = taskId, RunNumber = 1, IsRetry = false,
Prompt = "p", SessionId = "sess-1",
StartedAt = DateTime.UtcNow.AddMinutes(-5), FinishedAt = DateTime.UtcNow.AddMinutes(-1),
ExitCode = 0, ResultMarkdown = "ok",
});
await ctx.SaveChangesAsync();
}
var processStarted = new TaskCompletionSource();
var releaseProcess = new TaskCompletionSource();
var fake = new FakeClaudeProcess(async (_, _, _, _, _) =>
{
processStarted.TrySetResult();
await releaseProcess.Task;
return new RunResult { ExitCode = 0, ResultMarkdown = "ok" };
});
var runner = BuildRunner(fake);
var runTask = runner.ContinueAsync(taskId, "follow up", "queue", CancellationToken.None, alreadyClaimed: true);
await processStarted.Task;
Assert.Single(_hubContext.Proxy.Calls, c => c.Method == "TaskUpdated" && (string)c.Args[0]! == taskId);
releaseProcess.TrySetResult();
await runTask;
}
}