mirror of
https://github.com/rennf93/roboco.git
synced 2026-08-03 07:23:24 +02:00
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:
@@ -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;
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user