Tasks visibly progress: Run → In Progress (+ close drawer); approve → In Review
A task assigned to an agent never moved, so it looked like nothing happened. Now: - Clicking Run moves the task from Backlog to In Progress and closes the drawer. - When an approved artifact lands on a task, it moves to In Review (unless already Done), so the delivered result is visible on the board instead of sitting in Backlog. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -512,14 +512,18 @@ function TaskDrawer({
|
||||
<Button
|
||||
disabled={busy || !seatId}
|
||||
onClick={() =>
|
||||
act(
|
||||
() => api.post('/api/assembler/runs', { seatId, workItemId: task.id }),
|
||||
'Dispatched — it will appear in the review inbox shortly.',
|
||||
).then(() => {
|
||||
// The proposal lands ~a few seconds later; nudge the review badge to refetch.
|
||||
act(async () => {
|
||||
await api.post('/api/assembler/runs', { seatId, workItemId: task.id })
|
||||
// Visible feedback: the task leaves Backlog for In Progress while the agent works.
|
||||
if (task.status === 'Backlog') {
|
||||
await api.patch(`/api/orgboard/tasks/${task.id}/move`, { status: 'InProgress' })
|
||||
}
|
||||
}, 'Sent to the agent — moved to In Progress; its result will land in the review inbox.').then(() => {
|
||||
// The proposal lands a few seconds later; nudge the review badge, then close.
|
||||
window.dispatchEvent(new Event(REVIEWS_CHANGED))
|
||||
setTimeout(() => window.dispatchEvent(new Event(REVIEWS_CHANGED)), 4000)
|
||||
setTimeout(() => window.dispatchEvent(new Event(REVIEWS_CHANGED)), 9000)
|
||||
onClose()
|
||||
})
|
||||
}
|
||||
>
|
||||
|
||||
@@ -35,7 +35,14 @@ internal sealed class BoardWriter(OrgBoardDbContext db, TimeProvider clock) : IB
|
||||
var item = await db.WorkItems.FirstOrDefaultAsync(w => w.Id == workItemId, cancellationToken)
|
||||
?? throw new InvalidOperationException($"Work item {workItemId} not found.");
|
||||
|
||||
item.AttachArtifact(content, clock.GetUtcNow());
|
||||
var now = clock.GetUtcNow();
|
||||
item.AttachArtifact(content, now);
|
||||
// Surface the delivered artifact on the board: move it into review (unless already done).
|
||||
if (item.Status is WorkItemStatus.Backlog or WorkItemStatus.InProgress)
|
||||
{
|
||||
item.MoveTo(WorkItemStatus.InReview, now);
|
||||
}
|
||||
|
||||
await db.SaveChangesAsync(cancellationToken);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user