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:
soroush.asadi
2026-06-16 22:38:34 +03:30
parent 1f562fd633
commit 63fef8799d
2 changed files with 17 additions and 6 deletions
+9 -5
View File
@@ -512,14 +512,18 @@ function TaskDrawer({
<Button <Button
disabled={busy || !seatId} disabled={busy || !seatId}
onClick={() => onClick={() =>
act( act(async () => {
() => api.post('/api/assembler/runs', { seatId, workItemId: task.id }), await api.post('/api/assembler/runs', { seatId, workItemId: task.id })
'Dispatched — it will appear in the review inbox shortly.', // Visible feedback: the task leaves Backlog for In Progress while the agent works.
).then(() => { if (task.status === 'Backlog') {
// The proposal lands ~a few seconds later; nudge the review badge to refetch. 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)) window.dispatchEvent(new Event(REVIEWS_CHANGED))
setTimeout(() => window.dispatchEvent(new Event(REVIEWS_CHANGED)), 4000) setTimeout(() => window.dispatchEvent(new Event(REVIEWS_CHANGED)), 4000)
setTimeout(() => window.dispatchEvent(new Event(REVIEWS_CHANGED)), 9000) 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) var item = await db.WorkItems.FirstOrDefaultAsync(w => w.Id == workItemId, cancellationToken)
?? throw new InvalidOperationException($"Work item {workItemId} not found."); ?? 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); await db.SaveChangesAsync(cancellationToken);
} }
} }