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
3 changes: 3 additions & 0 deletions dashboard/src/app/reviewer/status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const LOOKS: Record<string, StatusLook> = {
waiting_people: { label: "Waiting for approval", tone: "waiting" },
ci_failing: { label: "CI failing", tone: "danger" },
merge_blocked: { label: "Merge blocked", tone: "danger" },
merge_conflict: { label: "Merge conflict", tone: "danger" },
paused: { label: "Auto-merge paused", tone: "neutral" },
stopped: { label: "Auto-merge stopped", tone: "neutral" },
failed: { label: "Review failed", tone: "danger" },
Expand Down Expand Up @@ -121,6 +122,8 @@ export function summaryLine(pr: LivePr | undefined): string {
return gateSummary(pr);
case "merge_blocked":
return `GitHub refused the merge${pr.gate?.detail ? ` · ${pr.gate.detail}` : ""}`;
case "merge_conflict":
return pr.gate?.detail || "The pull request conflicts with its base · auto-merge starts again with the review of the next commit";
case "paused":
return "Auto-merge paused · picks up on the next CI run or review";
case "stopped": {
Expand Down
8 changes: 6 additions & 2 deletions dashboard/src/app/runs/detail/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@
if (idx > max) max = idx;
});
return max;
}, [run?.current_pass, run?.pass_history]);

Check warning on line 448 in dashboard/src/app/runs/detail/page.tsx

View workflow job for this annotation

GitHub Actions / Lint & Build

React Hook useMemo has a missing dependency: 'run'. Either include it or remove the dependency array

if (!runId) {
return (
Expand Down Expand Up @@ -517,7 +517,9 @@
const closeAsButton = closable && runCloseIsLikely(run.status);
const closeInMenu = closable && !closeAsButton;
// The PR the dialog offers to close as well: open, so not merged or closed already.
const openPrs = run.pr_number && run.status !== "merged" ? [...new Set([run.pr_number, ...(run.pr_numbers ?? [])])] : [];
// Each with its own repository: two repositories can each have a #12.
const runPrs = run.prs ?? [];
const openPrs = run.status === "merged" ? [] : runPrs.length > 0 ? runPrs.filter((p) => !p.outcome).map((p) => p.pr_number) : run.pr_number ? [...new Set([run.pr_number, ...(run.pr_numbers ?? [])])] : [];
const limitTitle = limitHit ? `The monthly ${limitName(limitHit.kind)} limit is reached` : undefined;

// The pull request is open but its last fix round didn't finish: Retry
Expand Down Expand Up @@ -625,7 +627,9 @@

// ── What happened, in one sentence, and the one thing to do next ──
const prLinks: { url: string; label: string }[] =
run.pr_urls && run.pr_urls.length > 1
runPrs.length > 1
? runPrs.map((p) => ({ url: p.url, label: `Open ${p.repo}#${p.pr_number}` }))
: run.pr_urls && run.pr_urls.length > 1
? run.pr_urls.map((url, i) => ({ url, label: `Open pull request #${run.pr_numbers?.[i] ?? i + 1}` }))
: run.pr_url
? [{ url: run.pr_url, label: run.pr_number ? `Open pull request #${run.pr_number}` : "Open pull request" }]
Expand Down
15 changes: 14 additions & 1 deletion dashboard/src/lib/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1708,7 +1708,7 @@ export interface LivePr {
repo: string;
pr_number: number;
pr_title?: string;
/** reviewing · queued · retrying · waiting_ci · ci_failing · waiting_people · merge_blocked · paused · failed · stalled · merged · closed · new_commits · skipped · reviewed */
/** reviewing · queued · retrying · waiting_ci · ci_failing · waiting_people · merge_blocked · merge_conflict · paused · failed · stalled · merged · closed · new_commits · skipped · reviewed */
status?: string;
/** active (being reviewed or queued) · waiting · done */
group?: "active" | "waiting" | "done" | string;
Expand Down Expand Up @@ -1888,6 +1888,16 @@ export interface RoundIncomplete {
can_resume: boolean;
}

/** One pull request a run opened. */
export interface RunPr {
repo: string;
pr_number: number;
branch: string;
url: string;
/** "merged" or "closed" once it ended. */
outcome?: string;
}

export interface RunDetail extends Run {
/** Why an agent loop stopped (agents paused, an approval nobody answered). */
policy_note?: string | null;
Expand All @@ -1900,6 +1910,9 @@ export interface RunDetail extends Run {
pr_urls?: string[];
pr_numbers?: number[];
branches?: string[];
/** Every pull request, each with its own repository (a run across several
* repositories pairs `repo` with only one of them). */
prs?: RunPr[];
files_modified?: string[];
mcp_servers?: string[];
cache_read_tokens?: number;
Expand Down
4 changes: 2 additions & 2 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 = "2be1858fafcf8530adf42ee3a01167ca8bd6e434";
export const OPENAPI_REF = "a24df100f84bb755cfe15a3dc7f1e1a62fdeb7fb";

/** The fields each public API schema has. */
export interface OpenApiFields {
Expand Down Expand Up @@ -56,7 +56,7 @@ 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" | "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" | "questions" | "questions_url" | "repo" | "round_incomplete" | "run_id" | "sign_in_prompts" | "status" | "ticket_id" | "ticket_source" | "title" | "tokens_in" | "tokens_out" | "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" | "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" | "ticket_id" | "ticket_source" | "title" | "tokens_in" | "tokens_out" | "trigger" | "updated_at";
RunActionResult: "status";
RunAnswer: "answer" | "answered_at" | "author" | "question" | "question_id";
RunNote: "message" | "timestamp";
Expand Down
Loading