Skip to content

site: Stop and Resume on the workflow run card, Resume in the Workflows panel #323

Closed

Description

@ibetitsmike

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). The run_workflow and await_workflow card 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_workflow and resume_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

  1. 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.
  2. 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 calls run_workflow with resume_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.
  3. 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-workflows on, 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-workflows off, nothing changes.

Constraints

Fork files only, behind fork-workflows. About 500 changed lines per PR at most.

Activity

  1. added
    enhancement
    followup
    on Nov 14, 2026
  2. ibetitsmike commented on Nov 15, 2026

    @ibetitsmike
    OwnerAuthor

    Coder Agents acted on behalf of @ibetitsmike.

    Claimed. Branch: mike/issue-323-workflow-stop-resume, base main. Goal: Stop button on the live run_workflow/await_workflow card in the chat, Resume button on the card and in the Workflows panel run detail for interrupted runs. Shared pieces go into components/ForkWorkflows/ so the card and the panel use the same confirm dialog, mutation and cache updates. Tests and stories per the issue acceptance.

  3. ibetitsmike commented on Nov 16, 2026

    @ibetitsmike
    OwnerAuthor

    Coder Agents acted on behalf of @ibetitsmike.

    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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementfollowup

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions