Skip to content

feat(runs): act as a run's team on its run page - #2944

Draft
camielvs wants to merge 1 commit into
cvs/submit-as-teamfrom
cvs/team-run-page
Draft

camielvs wants to merge 1 commit into
cvs/submit-as-teamfrom
cvs/team-run-page

Conversation

@camielvs

@camielvs camielvs commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Description

A run's team is the team of the projects it's filed under, read from its annotations by the new useRunTeam. The run page now uses it in three places.

  • Cancel and run notes. The backend only lets a run's creator cancel or annotate it. A run the team created can now be cancelled, and its notes edited, by a member who can write to the team, and both requests carry the team header. A run you created keeps working as before, without the header, even when it's filed under a team's project. The rule lives in runManagement.
  • Rerun. A rerun acts as the run's team, like a submit does (feat(runs): submit as the project's team #2943). A rerun that would run as you instead, or whose arguments use secrets the run won't see, asks first and says why. Rerun waits for the team and the secrets check, and is refused for projects on different teams.
  • One rerun implementation. The rerun button and the run menus had two copies of the rerun logic. The button now uses the menus' useRerunPipelineRun, so the team rules live in one place. The button's unused runId prop is gone.

Cancel and annotation failures now show the backend's reason instead of "Access denied (403)". They read the response the way creating a run does. A failed notes save used to be silent and now shows a toast.

useTeamForRunAnnotations (#2929) had no callers. useRunTeam replaces it, and also waits for the annotations and reports when they can't be read.

Related Issue and Pull requests

Type of Change

  • New feature
  • Cleanup/Refactor

Line Breakdown

Category Added Removed
Production code 250 162
Comments 0 1
Tests 414 37
Total 664 200

Checklist

  • I have tested this does not break current pipelines / runs functionality
  • I have tested the changes on staging

Screenshots (if applicable)

None yet.

Test Instructions

pnpm vitest run src/components/PipelineRun src/routes/v2/pages/RunView src/services/teams src/services/pipelineRunService.test.ts

With the same setup as #2941, open a run submitted as the team (#2943):

  1. While it runs, cancel it from the Run menu or the Run Tools window. The cancel goes through.
  2. Edit its run notes in Details. They save.
  3. When it's done, rerun it. The new run's "Created by" is the team's id.
  4. Open the same run as someone outside the team. There's no cancel, the notes are read-only, and rerun asks first, saying the rerun runs as them.
  5. Open a run you submitted yourself. It behaves as on master.

Additional Comments

The v1 run page (RunToolbar, RunDetails) isn't routed. It only picks up the shared rerun button.

🤖 Generated with Claude Code

A run's team is the team of the projects it's filed under, read from its
annotations. The run page now uses it in three places.

Cancel and run notes: the backend only lets a run's creator cancel or
annotate it. A run the team created can now be cancelled and its notes
edited by a member who can write to the team, and both requests carry the
team header. A run you created keeps working as before, without the header,
even when it's filed under a team's project.

Rerun: a rerun acts as the run's team, like a submit does. A rerun that
would run as you instead, or whose arguments use secrets the run won't
see, asks first and says why. Rerun waits for the team and the secrets
check, and is refused for projects on different teams. The rerun button
and the run menus shared two copies of the rerun logic. The button now
uses the menus' hook, so the team rules live in one place.

Cancel and annotation failures now show the backend's reason instead of
"Access denied (403)": they read the response the way creating a run
does. A failed notes save used to be silent and now shows a toast.

useTeamForRunAnnotations had no callers and is replaced by useRunTeam,
which also waits for the annotations and reports when they can't be read.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@camielvs
camielvs added this pull request to stack #2930 October 22, 2026 22:34
@github-actions

Copy link
Copy Markdown

🎩 Preview

A preview build has been created at: cvs/team-run-page/c38d3ad

This branch has not been deployed

No deployments
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.

1 participant