Skip to content

Support re-triggering a failed run from the Hackbot UI - #6449

Open
suhaibmujahid wants to merge 1 commit into
mozilla:masterfrom
suhaibmujahid:worktree-hackbot-retrigger-run
Open

Support re-triggering a failed run from the Hackbot UI#6449
suhaibmujahid wants to merge 1 commit into
mozilla:masterfrom
suhaibmujahid:worktree-hackbot-retrigger-run

Conversation

@suhaibmujahid

Copy link
Copy Markdown
Member

Resolves #6413

Failed runs previously had to be retried by re-entering every input in the
trigger form, which is tedious for agents with non-trivial inputs such as
build-repair's failure_tasks JSON.

Add a "Re-run with same inputs" button to the run detail page for failed and
timed-out runs. It posts to a new /api/runs/:runId/retrigger route that reads
the stored run server-side and starts a fresh run with the same agent and
inputs, attributed to the signed-in user. The original run is left untouched,
and the new run gets its own id and results prefix.

Key RunDetail on the run id so following the new run remounts with fresh state
instead of rendering the previous run's doc, error and actions.
@suhaibmujahid
suhaibmujahid requested a review from a team as a code owner August 2, 2026 04:02
Copilot AI review requested due to automatic review settings August 2, 2026 04:02

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds “re-run” support to Hackbot UI for failed runs by introducing a dedicated API endpoint that creates a new run using the failed run’s stored inputs, and wiring that up to the run detail UI.

Changes:

  • Add an isFailed helper for consistent “failed or timed out” status checks across UI and API code.
  • Add POST /api/runs/:runId/retrigger to create a new run with the same inputs as a failed run (attributed to the currently signed-in user).
  • Add a “Re-run with same inputs” button on the run detail page and ensure state resets cleanly when navigating to the newly created run.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
services/hackbot-ui/lib/types.ts Adds isFailed helper and reuses existing RunStatus/RunRef types for retrigger flow.
services/hackbot-ui/components/RunDetail.tsx Adds UI/button + client-side POST to retrigger endpoint and navigates to the newly created run.
services/hackbot-ui/components/RecentRuns.tsx Refactors failed-status checks to use isFailed helper.
services/hackbot-ui/app/runs/[runId]/page.tsx Forces RunDetail remount on runId changes to clear transient UI state after navigation.
services/hackbot-ui/app/api/runs/[runId]/retrigger/route.ts Implements the retrigger API route that re-creates a run from a failed run’s stored inputs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

Support re-trigerring a faild run from Hackbot UI

2 participants