Skip to content

feat(web): stop a team run, archive and delete ended launches (#440) - #509

Open
mblaauw wants to merge 1 commit into
mainfrom
fix/440-stop-run-archive-launch
Open

mblaauw wants to merge 1 commit into
mainfrom
fix/440-stop-run-archive-launch

Conversation

@mblaauw

@mblaauw mblaauw commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator

Closes #440.

Summary

The API had POST /team-runs/{id}/cancel, POST /worker-launches/{id}/archive
and DELETE /worker-launches/{id}, but the web app never called them, so a
looping workflow run could only be stopped through the API.

  • Team run page: Stop run while the run is running and the caller has
    executions:cancel. A confirmation says the run ends as cancelled with its
    running step executions; the response replaces the cached run, so the run
    and its steps show cancelled without a reload, and the run and execution
    lists are refreshed.
  • Workers → Launches: ended (stopped/failed) launches get Archive and
    Delete (confirmed) for callers with settings:write; the switch gains
    "Archived", and History now hides archived launches.
  • lib/run-controls.ts holds the rules (run status + permission, ended launch +
    permission, history/archived split) with unit tests.
  • Guides (executions, worker profiles) and the UI test plan describe the
    controls.

Testing

  • pnpm --filter @orbit/web typecheck: passed; test: 97 passed (3 new in lib/run-controls.test.ts)
  • pnpm docs:check: passed

Not checked in a browser. No Stop action in the run list's rows (the list has no row menu; the run page covers it). Team runs have no archive endpoint, so none is added.

🤖 Generated with Claude Code

The API had POST /team-runs/{id}/cancel, POST /worker-launches/{id}/archive
and DELETE /worker-launches/{id}, but the web app never called them, so a
looping workflow run could only be stopped through the API.

- Team run page: **Stop run** while the run is running and the caller has
  executions:cancel. A confirmation says the run ends as cancelled with its
  running step executions; the response replaces the cached run, so the run
  and its steps show cancelled without a reload, and the run and execution
  lists are refreshed.
- Workers → Launches: ended (stopped/failed) launches get **Archive** and
  **Delete** (confirmed) for callers with settings:write; the switch gains
  "Archived", and History now hides archived launches.
- lib/run-controls.ts holds the rules (run status + permission, ended launch +
  permission, history/archived split) with unit tests.
- Guides (executions, worker profiles) and the UI test plan describe the
  controls.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A running team run cannot be stopped from the web app, and worker launches cannot be archived or deleted there

1 participant