Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions dashboard/src/app/runs/detail/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -962,6 +962,27 @@ function RunDetailInner() {
),
actions: undefined,
}
: run.status === "needs_input" && run.waiting_on?.action
? {
// A named wait: what to do, why, and where.
tone: "waiting",
title: run.waiting_on.action,
body: run.waiting_on.detail ? <span className="whitespace-pre-wrap [overflow-wrap:anywhere]">{sanitizeError(run.waiting_on.detail)}</span> : null,
actions: (
<>
{prLinks.length > 0
? openPrButtons("primary")
: run.waiting_on.url && (
<a href={run.waiting_on.url} target="_blank" rel="noopener noreferrer" className={`${buttonClass("primary")} gap-1.5`}>
Open
<ExternalLinkIcon />
<span className="sr-only"> (opens in a new tab)</span>
</a>
)}
{retryButton}
</>
),
}
: run.status === "needs_input"
? {
tone: "waiting",
Expand Down
14 changes: 14 additions & 0 deletions dashboard/src/lib/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1998,6 +1998,18 @@ export interface CodegenVar {
}

/** A run stopped before its pull request: a generator needed public values the repo doesn't set. */
/** What a run waiting on a person (`needs_input`) waits for: one named action. */
export interface RunWaitingOn {
/** What to do, in plain words ("Review pull request #12"). */
action: string;
/** Why, or what is still open. May be empty. */
detail: string;
/** Where to do it (the pull request, the ticket), when known. */
url?: string | null;
/** When the wait started. */
since?: string | null;
}

export interface CodegenEnvMissing {
repo: string;
command: string;
Expand Down Expand Up @@ -2082,6 +2094,8 @@ export interface RunDetail extends Run {
closed_from?: string | null;
/** What the run asked when it stopped to wait on a person (`needs_input`). */
questions?: RunQuestion[];
/** While `needs_input`: what it waits for from a person, by name. */
waiting_on?: RunWaitingOn | null;
/** The comment with those questions on the ticket or issue. */
questions_url?: string | null;
/** Answers people gave to them in Coderhelm. */
Expand Down
9 changes: 4 additions & 5 deletions dashboard/src/lib/openapi-fields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// docs/api/openapi.json. Do not edit; run `npm run openapi:fields` instead.

/** The platform commit this was generated from. */
export const OPENAPI_REF = "1c295b2fccaa0bc86b3ce72cf2598d1154948ff3";
export const OPENAPI_REF = "8e88509e274d1f7c993420e65d77a0381a9d9079";

/** The fields each public API schema has. */
export interface OpenApiFields {
Expand Down Expand Up @@ -61,18 +61,17 @@ export interface OpenApiFields {
RotateBody: "overlap_hours";
RotatedSecret: "previous_secret_expires_at" | "secret";
RoundIncomplete: "at" | "can_resume" | "files" | "kind" | "number" | "pushed" | "reason" | "summary" | "wip_branch";
Run: "answers" | "answers_url" | "applied_standards" | "branch" | "branches" | "cache_read_tokens" | "cache_write_tokens" | "close_reason" | "closed_at" | "closed_by" | "closed_from" | "codegen_env_missing" | "continued_run_id" | "cost_usd" | "covered_by" | "created_at" | "current_pass" | "duration_s" | "error" | "files_modified" | "fix_location" | "lesson" | "mcp_servers" | "outside_change_report" | "pass_history" | "policy_approval" | "policy_note" | "pr_number" | "pr_numbers" | "pr_url" | "pr_urls" | "progress_notes" | "prs" | "questions" | "questions_url" | "repo" | "round_incomplete" | "run_id" | "sign_in_prompts" | "status" | "stop_kind" | "ticket_id" | "ticket_source" | "title" | "tokens_in" | "tokens_out" | "tooling_failure" | "trigger" | "updated_at";
Run: "answers" | "answers_url" | "applied_standards" | "branch" | "branches" | "cache_read_tokens" | "cache_write_tokens" | "close_reason" | "closed_at" | "closed_by" | "closed_from" | "codegen_env_missing" | "continued_run_id" | "cost_usd" | "covered_by" | "created_at" | "current_pass" | "duration_s" | "error" | "files_modified" | "fix_location" | "lesson" | "mcp_servers" | "outside_change_report" | "pass_history" | "policy_approval" | "policy_note" | "pr_number" | "pr_numbers" | "pr_url" | "pr_urls" | "progress_notes" | "prs" | "questions" | "questions_url" | "repo" | "round_incomplete" | "run_id" | "sign_in_prompts" | "status" | "stop_kind" | "ticket_id" | "ticket_source" | "title" | "tokens_in" | "tokens_out" | "tooling_failure" | "trigger" | "updated_at" | "waiting_on";
RunActionResult: "status";
RunAnswer: "answer" | "answered_at" | "author" | "question" | "question_id";
RunCoveredBy: "author" | "carried" | "note" | "number" | "open_items" | "outcome" | "own" | "reason" | "repo" | "superseded" | "title" | "url";
RunCoveredCarried: "branch" | "commits" | "files" | "head" | "rebuilt";
RunCoveredBy: "author" | "number" | "reason" | "repo" | "title" | "url";
RunNote: "message" | "timestamp";
RunPass: "pass" | "started_at";
RunQuestion: "decision" | "evidence" | "id" | "question" | "suggestions" | "why";
RunSummary: "cost_usd" | "created_at" | "current_pass" | "duration_s" | "pr_number" | "pr_url" | "repo" | "run_id" | "status" | "ticket_id" | "ticket_source" | "title" | "tokens_in" | "tokens_out" | "trigger";
RunSupersededPr: "closed" | "closed_by" | "number" | "repo" | "title" | "url";
RunToolingFailure: "command" | "error" | "tried";
RunTrigger: "by" | "kind" | "label" | "ref" | "ref_url";
RunWaitingOn: "action" | "detail" | "since" | "url";
RunsPage: "next" | "runs" | "scanned";
SecretView: "previous_secret_expires_at" | "secret";
SessionStep: "at" | "detail" | "text";
Expand Down
Loading