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 && ( +
+ + Watch it build + + + People on it + +
+ )} +
+ ); +} 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,