From 8e816eed148f4026f5c3775c0a33ff4e80fd7add Mon Sep 17 00:00:00 2001 From: Dave Date: Mon, 21 Sep 2026 14:32:03 +0200 Subject: [PATCH] fix(admin): also list client-bound Phase 9 links on the project page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The project admin page used to show only the legacy per-project intake links (Phase 8 shape). After Phase 9 minting moved the default to per-client links, owners navigating from a project no longer saw its request link there — only the BackgroundMdEditor and other panels. They'd find the link on the client admin page but the project page suddenly looked empty of intake context. Fix: query links where link.client == this project's client (the Phase 9 shape) and render them through the existing panel in mode='client'. The Phase 8 panel stays too — both shapes coexist during the migration window. Same data, two views. --- src/app/admin/projects/[projectId]/page.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/app/admin/projects/[projectId]/page.tsx b/src/app/admin/projects/[projectId]/page.tsx index 7c4cb6c..bf9dca8 100644 --- a/src/app/admin/projects/[projectId]/page.tsx +++ b/src/app/admin/projects/[projectId]/page.tsx @@ -45,6 +45,16 @@ export default async function ProjectAdminPage({ sort: "-created", }); + // Phase 9: also show client-bound links targeting this project's client. + // Owners navigating from a project expect to see its request link + // here, not just on the client admin page. + const clientLinks = await pb + .collection("intake_links") + .getFullList({ + filter: `client = "${project.client}"`, + sort: "-created", + }); + const appUrl = process.env.NEXT_PUBLIC_APP_URL ?? "http://localhost:3000"; const summary = await summaryStatus(project.id); @@ -66,6 +76,7 @@ export default async function ProjectAdminPage({ /> +