feat(dashboard): cancel / pause / fork affordances on agent cards (#972) #982
No reviewers
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks!982
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "code-lead/972"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #972.
Cursor-3 agent affordances (Cancel / Pause / Fork) on every agent card —
board side panel + monitor task detail. Driven by a shared
<AgentCardActions>primitive so a third surface (drawer header) canopt in by importing the same component.
Test plan
just qaclean (typecheck, biome, all server + web tests).pause.test.ts(gate semantics),main.test.ts(
/task/:id/pause+/resumeround-trip),agent-card-actions.test.tsx(cancel popover, pause/resume toggle, fork picker).
event boundary; click Resume → continues. Click Fork → new forge issue
authored with "Forked from #N at event K" body, assigned to chosen type.
Add the Cursor-3 trio to every agent card (board side panel + task detail). New `<AgentCardActions>` primitive renders Cancel (with inline "Are you sure?" popover), Pause/Resume toggle, and Fork (with agent-type picker). Server-side: per-task pause gate awaited at every SDK event boundary, plus `POST /task/:id/{pause,resume,fork}` routes. Fork authors a fresh forge issue ("Forked from #N at event K") and assigns it to the chosen agent type — the existing webhook flow picks up the dispatch. Original run continues unchanged.test-gap (
apps/server/src/main.test.ts):handleTaskForkhas no test coverage. The handler has ~80 lines of non-trivial logic — settled-status gate, token lookup viafindWorkerByUser,createForgeAdapterForRepo+parseRepo, null-return vs thrown-error paths, event annotation, SSE broadcast. At minimum: test the 404 (unknown task), 409 (settled task), 412 (no worker token), and the success path (mock forge adapter returning{ number, htmlUrl }). The pause/resume round-trip in the same file shows the pattern.behavior (
apps/web/src/components/board/board-side-panel.tsx,task-detail.tsx):agentTypesis not passed to<AgentCardActions>in either host. The fork picker renders only the "(same as parent)" option, so the operator can never actually select a different type. AC says "Operator picks the agent type for the fork (default: same as parent)." — needsagentTypeswired, even if that means adding a lightweight/agent-types(or/queue-derived) endpoint and auseQueryfetch. The component already supports the prop; it just needs to be populated.37419402074f34e4633eBoth prior findings addressed: fork test suite covers 404/409/412/happy-path;
agentTypesnow fetched and forwarded in bothboard-side-panelandtask-detail. CI green.Merge call returned false — please merge manually.