Repository navigation
Closed
Labels
Description
Coder Agents acted on behalf of @ibetitsmike.
Part of #226 (scope item 5). Follow-up to the workflows UI PRs #246, #256, #260 and #264. Line references are at main ba26490b51.
Problem
The #226 run card needs Stop and Resume buttons. Neither is on the card today, and Resume exists nowhere in the UI.
- Stop is only in the Workflows panel run detail (
ForkWorkflowRunDetail.tsx). Therun_workflowandawait_workflowcard in the chat (ChatElements/tools/ForkWorkflowTool.tsx) shows live status but has no Stop button. - An interrupted run shows the text "The server restarted during this run. Resume it by asking the agent." (
ForkWorkflowRunDetail.tsx:145). The user has to type that request by hand and know the run ID. - Resuming today works only through the agent, with
run_workflowandresume_run_id(coderd/x/chatd/fork_workflow.go:91-108). The stop route answers 409 for an interrupted run on purpose (feat: workflow run list, detail, and stop API #258).
Scope
- A Stop button on the live run card of a running run. It reuses the confirm dialog, the mutation and the cache updates of the panel (feat(site): stop workflow runs from the Workflows panel #260, fix(site/src): close workflow UI edge paths from the stop-run review #264). The panel and the card must not show stale state after a stop from either place.
- A Resume button on the card and in the panel detail of an interrupted run. Recommended design: no new route. The button puts a prefilled request into the composer, for example "Resume workflow run
<run_id>", and the user sends it. The agent then callsrun_workflowwithresume_run_id, and the card follows the resumed run as it does today. If the implementer finds that a server-side resume route is clearly better, write down why in the PR. Do not add a route that runs the script outside the agent's turn without that. - Show the buttons only to a viewer who may stop or resume the run (the run API answers 403 or 404 for others, feat: let members run workflows in their own chats #261).
Acceptance
- In a dev build with
fork-workflowson, the Stop button on the card stops a running run. The card and the panel both show "stopped" without a page reload. - After a server restart during a run, the card and the panel show Resume. Clicking it and sending the message resumes the run. The finished steps show as Reused when the run is awaited.
- Vitest tests cover each button, the hidden state for a viewer without access, and the 409 path. Stories cover the new states.
- With
fork-workflowsoff, nothing changes.
Constraints
Fork files only, behind fork-workflows. About 500 changed lines per PR at most.
Activity
ibetitsmike commentedon Nov 15, 2026
Claimed. Branch:
mike/issue-323-workflow-stop-resume, basemain. Goal: Stop button on the liverun_workflow/await_workflowcard in the chat, Resume button on the card and in the Workflows panel run detail for interrupted runs. Shared pieces go intocomponents/ForkWorkflows/so the card and the panel use the same confirm dialog, mutation and cache updates. Tests and stories per the issue acceptance.fix(site): address Codex review findings on workflow stop/resume (issue
fix(site): append resume prompt without blank lines on an empty compo…
feat(site): stop and resume workflow runs from the card and panel (is…
fix(site): address Codex review findings on workflow stop/resume (issue
fix(site): append resume prompt without blank lines on an empty compo…
fix(site): workflow stop/resume review fixes (#323)
fix(site): drop unused Resume label prop, narrow CustomEvent, inline …
fix(site): let Resume prefill the same run again after consumption (#323
fix(site): gate the resume prefill on the composer's text, drop the m…
fix(site): hide Resume in plan mode, keep Stop's focus ring visible (#…
ibetitsmike commentedon Nov 16, 2026
Done by #346, merged as c71b3ab on 2026-11-16 03:45Z. Stop and Resume are on the live card and the run detail panel. Resume is hidden in plan mode and on archived chats. Gates and what was not exercised are in #346 (comment).