feat(external-pr): CEO decision surface — panel PR-review queue

The panel half of the PR-review gate. A PrReviewQueue card on the Command
Center lists external PRs the org has reviewed and awaiting the CEO's call,
each with Supersede / Dismiss / View-on-GitHub. Hidden when empty.

- tasksApi.getExternalPrReviews / supersedeExternalPr / dismissExternalPr,
  typed to the exact backend response shapes (GET /tasks/external-pr-reviews,
  POST /tasks/{id}/supersede-external-pr, POST .../dismiss-external-pr).
- Mock mode returns [] so the queue hides and the actions are unreachable —
  no mock-masked contract (the #194 trap avoided; verified FE paths/shapes
  against the real routes + route ordering).
This commit is contained in:
Renn F
2026-06-17 02:23:49 +02:00
parent 98c2a1f25f
commit 49188d1c8e
4 changed files with 284 additions and 0 deletions
+30
View File
@@ -697,4 +697,34 @@ export const tasksApi = {
});
return data;
},
// Inbound external PRs that were reviewed and await the CEO's decision
// (the PR-review decision queue).
getExternalPrReviews: async (): Promise<Task[]> => {
if (isMockMode()) return [];
const { data } = await api.get<Task[]>("/tasks/external-pr-reviews");
return data;
},
// CEO authorizes the org to take over a reviewed external PR.
supersedeExternalPr: async (
taskId: string,
): Promise<{ ok: boolean; supersede_task_id?: string; branch?: string }> => {
const { data } = await api.post<{
ok: boolean;
supersede_task_id?: string;
branch?: string;
}>("/tasks/" + taskId + "/supersede-external-pr");
return data;
},
// CEO declines to act on a reviewed external PR (drops it from the queue).
dismissExternalPr: async (
taskId: string,
): Promise<{ ok: boolean; task_id: string }> => {
const { data } = await api.post<{ ok: boolean; task_id: string }>(
"/tasks/" + taskId + "/dismiss-external-pr",
);
return data;
},
};