diff --git a/apps/desktop/src/plugins/kanban/drawer.tsx b/apps/desktop/src/plugins/kanban/drawer.tsx index a59a24105e6..a5b3909850e 100644 --- a/apps/desktop/src/plugins/kanban/drawer.tsx +++ b/apps/desktop/src/plugins/kanban/drawer.tsx @@ -279,7 +279,23 @@ function AssigneeMenu({ // Mirrors the review pane's commit-message field: one row tall to start // (button-height), CSS field-sizing grows it with content, button hugs the // bottom edge as it grows. -function CommentComposer({ onSubmit, pending }: { onSubmit: (body: string) => void; pending: boolean }) { +// +// On a RUNNING task the worker polls its comment thread and folds new notes +// into the live turn (OUT-OF-BAND steer), so a plain note reaches the agent +// mid-run within a few seconds — no block/unblock dance. `onRequeue` is the +// heavier option: post the note AND reclaim so the task restarts from scratch +// with the note in context (use when the current run has gone off the rails). +function CommentComposer({ + onRequeue, + onSubmit, + pending, + running +}: { + onRequeue?: (body: string) => void + onSubmit: (body: string) => void + pending: boolean + running?: boolean +}) { const [body, setBody] = useState('') const submit = () => { @@ -291,31 +307,53 @@ function CommentComposer({ onSubmit, pending }: { onSubmit: (body: string) => vo } } + const requeue = () => { + const trimmed = body.trim() + + if (trimmed && !pending && onRequeue) { + onRequeue(trimmed) + setBody('') + } + } + return ( -
-