Skip to content
Merged
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
9 changes: 7 additions & 2 deletions src/lib/graph-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1175,7 +1175,11 @@ export async function approveReview(
}
return { status: "Success", review }
}
const body = overridePayload ? { override_payload: overridePayload } : {}
// cancel_active_runs: an admin deciding here makes any in-flight
// human-review workflow moot, so ask the backend to stop it. Workflows
// deciding their own reviews omit this — cancelling would kill their run.
const body: Record<string, unknown> = { cancel_active_runs: true }
if (overridePayload) body.override_payload = overridePayload
return api.post<ReviewDecisionResponse>(
`/v2/reviews/${refId}/approve`,
body,
Expand All @@ -1200,9 +1204,10 @@ export async function dismissReview(
}
return { status: "Success", review }
}
// cancel_active_runs: same admin-decided semantics as approveReview above.
return api.post<ReviewDecisionResponse>(
`/v2/reviews/${refId}/dismiss`,
{ reason },
{ reason, cancel_active_runs: true },
undefined,
signal
)
Expand Down
Loading