Skip to content

Commit 8828539

Browse files
authored
Run page: a run waiting on a person shows what it waits for (#325)
A needs_input run now carries a named wait (waiting_on): the run page shows its action as the title, what is open, and the pull request (or where to act), instead of "needs more detail" with nothing asked.
1 parent af2847c commit 8828539

3 files changed

Lines changed: 39 additions & 5 deletions

File tree

‎dashboard/src/app/runs/detail/page.tsx‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -962,6 +962,27 @@ function RunDetailInner() {
962962
),
963963
actions: undefined,
964964
}
965+
: run.status === "needs_input" && run.waiting_on?.action
966+
? {
967+
// A named wait: what to do, why, and where.
968+
tone: "waiting",
969+
title: run.waiting_on.action,
970+
body: run.waiting_on.detail ? <span className="whitespace-pre-wrap [overflow-wrap:anywhere]">{sanitizeError(run.waiting_on.detail)}</span> : null,
971+
actions: (
972+
<>
973+
{prLinks.length > 0
974+
? openPrButtons("primary")
975+
: run.waiting_on.url && (
976+
<a href={run.waiting_on.url} target="_blank" rel="noopener noreferrer" className={`${buttonClass("primary")} gap-1.5`}>
977+
Open
978+
<ExternalLinkIcon />
979+
<span className="sr-only"> (opens in a new tab)</span>
980+
</a>
981+
)}
982+
{retryButton}
983+
</>
984+
),
985+
}
965986
: run.status === "needs_input"
966987
? {
967988
tone: "waiting",

‎dashboard/src/lib/api.ts‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1998,6 +1998,18 @@ export interface CodegenVar {
19981998
}
19991999

20002000
/** A run stopped before its pull request: a generator needed public values the repo doesn't set. */
2001+
/** What a run waiting on a person (`needs_input`) waits for: one named action. */
2002+
export interface RunWaitingOn {
2003+
/** What to do, in plain words ("Review pull request #12"). */
2004+
action: string;
2005+
/** Why, or what is still open. May be empty. */
2006+
detail: string;
2007+
/** Where to do it (the pull request, the ticket), when known. */
2008+
url?: string | null;
2009+
/** When the wait started. */
2010+
since?: string | null;
2011+
}
2012+
20012013
export interface CodegenEnvMissing {
20022014
repo: string;
20032015
command: string;
@@ -2082,6 +2094,8 @@ export interface RunDetail extends Run {
20822094
closed_from?: string | null;
20832095
/** What the run asked when it stopped to wait on a person (`needs_input`). */
20842096
questions?: RunQuestion[];
2097+
/** While `needs_input`: what it waits for from a person, by name. */
2098+
waiting_on?: RunWaitingOn | null;
20852099
/** The comment with those questions on the ticket or issue. */
20862100
questions_url?: string | null;
20872101
/** Answers people gave to them in Coderhelm. */

‎dashboard/src/lib/openapi-fields.ts‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// docs/api/openapi.json. Do not edit; run `npm run openapi:fields` instead.
33

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

77
/** The fields each public API schema has. */
88
export interface OpenApiFields {
@@ -61,18 +61,17 @@ export interface OpenApiFields {
6161
RotateBody: "overlap_hours";
6262
RotatedSecret: "previous_secret_expires_at" | "secret";
6363
RoundIncomplete: "at" | "can_resume" | "files" | "kind" | "number" | "pushed" | "reason" | "summary" | "wip_branch";
64-
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";
64+
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";
6565
RunActionResult: "status";
6666
RunAnswer: "answer" | "answered_at" | "author" | "question" | "question_id";
67-
RunCoveredBy: "author" | "carried" | "note" | "number" | "open_items" | "outcome" | "own" | "reason" | "repo" | "superseded" | "title" | "url";
68-
RunCoveredCarried: "branch" | "commits" | "files" | "head" | "rebuilt";
67+
RunCoveredBy: "author" | "number" | "reason" | "repo" | "title" | "url";
6968
RunNote: "message" | "timestamp";
7069
RunPass: "pass" | "started_at";
7170
RunQuestion: "decision" | "evidence" | "id" | "question" | "suggestions" | "why";
7271
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";
73-
RunSupersededPr: "closed" | "closed_by" | "number" | "repo" | "title" | "url";
7472
RunToolingFailure: "command" | "error" | "tried";
7573
RunTrigger: "by" | "kind" | "label" | "ref" | "ref_url";
74+
RunWaitingOn: "action" | "detail" | "since" | "url";
7675
RunsPage: "next" | "runs" | "scanned";
7776
SecretView: "previous_secret_expires_at" | "secret";
7877
SessionStep: "at" | "detail" | "text";

0 commit comments

Comments
 (0)