From 8caeb300216ba48cbf57504837b40326a8ab40c4 Mon Sep 17 00:00:00 2001 From: Cato <41178744+catomean@users.noreply.github.com> Date: Thu, 26 Nov 2026 20:32:38 +0100 Subject: [PATCH] fix(approvals): an approved build says where it went (#1763) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(approvals): an approved build says where it went The card only said "Building at · code" — a link that is blank until the agent finishes, with no way back to the project. It now links to the project's watch page and its people, and says the requester already has a seat as client. Co-Authored-By: Claude Opus 5.5 Signed-off-by: Cato <41178744+catomean@users.noreply.github.com> * chore: re-run verify — widget-launcher-talk-browser timed out on a loaded runner (passes 3/3 alone) Co-Authored-By: Claude Opus 5.5 Signed-off-by: Cato <41178744+catomean@users.noreply.github.com> --------- Signed-off-by: Cato <41178744+catomean@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 --- src/app/(app)/approvals/page.tsx | 1 + .../build-requests/BuildRequestQueue.tsx | 58 ++++++++++++++----- src/config/build-requests.ts | 4 ++ 3 files changed, 49 insertions(+), 14 deletions(-) diff --git a/src/app/(app)/approvals/page.tsx b/src/app/(app)/approvals/page.tsx index 11f17b1b5..6ca97fec9 100644 --- a/src/app/(app)/approvals/page.tsx +++ b/src/app/(app)/approvals/page.tsx @@ -34,6 +34,7 @@ async function loadBuildRequests(userId: string): Promise { look: r.look, status: r.status, previewUrl: r.previewUrl, + projectId: r.projectId, accessCode: r.accessCode, note: r.note, createdAt: r.createdAt.toISOString(), diff --git a/src/components/build-requests/BuildRequestQueue.tsx b/src/components/build-requests/BuildRequestQueue.tsx index 259a94960..c8563e77d 100644 --- a/src/components/build-requests/BuildRequestQueue.tsx +++ b/src/components/build-requests/BuildRequestQueue.tsx @@ -17,6 +17,7 @@ export type BuildRequestCard = { look: { before: string; after: string; summary: string | null } | null; status: "waiting" | "building" | "declined"; previewUrl: string | null; + projectId: string | null; accessCode: string | null; note: string | null; createdAt: string; @@ -144,23 +145,52 @@ function BuildRequestRow({ request: r }: { request: BuildRequestCard }) { )} ) : r.status === "building" ? ( -

- Approved.{" "} - {r.previewUrl ? ( - <> - Building at{" "} - - {r.previewUrl} - - {r.accessCode ? ` · code ${r.accessCode}` : ""} - - ) : ( - "Building." - )} -

+ ) : (

Declined{r.note ? `: “${r.note}”` : "."}

)} ); } + +/** + * An approved build says where it went: the page where its agent can be + * watched, the preview and its code, and who already has a seat on it. A bare + * "Building at " left the operator with a link that is blank until the + * agent finishes and no way back to the work (George, 2026-11-20). + */ +function ApprovedBuild({ request: r }: { request: BuildRequestCard }) { + return ( +
+

+ Approved. Loki’s agent is building it now. + {r.email ? ( + <> + {" "} + {r.email} is on the project as client: their request page shows the link and code, and + they can ask for changes there. + + ) : null} +

+ {r.previewUrl && ( +

+ Preview:{" "} + + {r.previewUrl} + + {r.accessCode ? ` · code ${r.accessCode}` : ""} +

+ )} + {r.projectId && ( + + )} +
+ ); +} diff --git a/src/config/build-requests.ts b/src/config/build-requests.ts index 001581c5c..8e944236b 100644 --- a/src/config/build-requests.ts +++ b/src/config/build-requests.ts @@ -17,6 +17,10 @@ export const BUILD_REQUESTS = { pagePath: (id: string) => `/change/requests/${id}`, /** Where the operator decides. */ reviewPath: "/approvals#build-requests", + /** Where the operator watches an approved build's agent work. */ + watchPath: (projectId: string) => `/projects/${projectId}/watch`, + /** Where the operator sees who is on it (the requester is, as client). */ + peoplePath: (projectId: string) => `/projects/${projectId}#people`, /** A before/after picture as it arrives from the instant preview (data URL). */ lookMaxChars: 400_000, summaryMax: 240,