From 003e1eac4ab69705f2c42e194c72ff8a7b961af7 Mon Sep 17 00:00:00 2001 From: BigSimmo <87357024+BigSimmo@users.noreply.github.com> Date: Wed, 19 Aug 2026 00:03:25 +0800 Subject: [PATCH 1/2] feat(mockups): add the Development page the Settings entry opens MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Settings → Development now opens a real page rather than linking straight into a prototype, so there is one place that lists what is being built. - `/mockups/development` indexes the in-progress surfaces. Each carries a summary, a primary button into it, and direct links to its key routes — for Caring Contact: Today, Patients, Schedule, Templates and System states. - It lives under `/mockups` on purpose: the namespace layout already applies `mockupsEnabled()`, so the page inherits the production gate and 404s in a production deploy exactly like the surfaces it links to, rather than needing a second gate of its own. - The page states plainly that everything on these surfaces is synthetic and that none of it is validated clinical decision support. - The Settings card now points at the page and is renamed accordingly. Verified on the running app: `/mockups/development` and `/mockups/caring-contacts` both return 200, the page renders its five outbound prototype links, and the settings entry resolves to `/mockups/development`. Co-Authored-By: Claude Opus 5 --- docs/site-map.md | 1 + src/app/mockups/development/page.tsx | 97 +++++++++++++++++++ .../clinical-dashboard/settings-dialog.tsx | 12 +-- tests/settings-dialog-actions.dom.test.tsx | 8 +- 4 files changed, 108 insertions(+), 10 deletions(-) create mode 100644 src/app/mockups/development/page.tsx diff --git a/docs/site-map.md b/docs/site-map.md index 77f2c93e8f..9bd77fe332 100644 --- a/docs/site-map.md +++ b/docs/site-map.md @@ -1017,6 +1017,7 @@ This file is generated by `npm run docs:update` (or `npm run sitemap:update` dir - `/mockups/caring-contacts/team` - Route discovered from app directory Source: `src/app/mockups/caring-contacts/team/page.tsx`. - `/mockups/caring-contacts/templates` - Route discovered from app directory Source: `src/app/mockups/caring-contacts/templates/page.tsx`. - `/mockups/caring-contacts/templates/[pathwayId]` - Route discovered from app directory Source: `src/app/mockups/caring-contacts/templates/[pathwayId]/page.tsx`. +- `/mockups/development` - Route discovered from app directory Source: `src/app/mockups/development/page.tsx`. - `/mockups/document-navigation-contract` - Route discovered from app directory Source: `src/app/mockups/document-navigation-contract/page.tsx`. - `/mockups/document-navigation-final` - Route discovered from app directory Source: `src/app/mockups/document-navigation-final/page.tsx`. - `/mockups/document-navigation-final-review` - Route discovered from app directory Source: `src/app/mockups/document-navigation-final-review/page.tsx`. diff --git a/src/app/mockups/development/page.tsx b/src/app/mockups/development/page.tsx new file mode 100644 index 0000000000..29f4abc737 --- /dev/null +++ b/src/app/mockups/development/page.tsx @@ -0,0 +1,97 @@ +import type { Metadata } from "next"; +import Link from "next/link"; +import { ArrowRight, FlaskConical, ShieldAlert } from "lucide-react"; + +import { CARING_CONTACT_MOCKUP_ROUTES } from "@/components/caring-contacts/mockups/routes"; + +export const metadata: Metadata = { + title: "Development · Clinical KB", + description: "In-progress surfaces reachable only in development builds.", +}; + +// The index of what is being built. It lives under /mockups so it inherits the +// namespace's production gate (`mockupsEnabled()` in the mockups layout) rather +// than needing a second one, and so it 404s in a production deploy exactly like +// the surfaces it links to. +const DEVELOPMENT_SURFACES = [ + { + id: "caring-contacts", + name: "Caring Contact", + summary: + "Linked prototype of the one-way caring-contacts coordination workflow: 13 routes, the activation flow, and the offline, permission, session-expiry, conflict and recovery states.", + href: CARING_CONTACT_MOCKUP_ROUTES.today, + status: "Synthetic prototype", + entries: [ + { label: "Today", href: CARING_CONTACT_MOCKUP_ROUTES.today }, + { label: "Patients", href: CARING_CONTACT_MOCKUP_ROUTES.patients }, + { label: "Schedule", href: CARING_CONTACT_MOCKUP_ROUTES.schedule }, + { label: "Templates", href: CARING_CONTACT_MOCKUP_ROUTES.templates }, + { label: "System states", href: CARING_CONTACT_MOCKUP_ROUTES.systemStates }, + ], + }, +] as const; + +export default function DevelopmentIndexPage() { + return ( +
+
+

+

+

In-progress surfaces

+

+ Work being built, reachable from Settings while it is in development. These routes are not part of the + clinical product and 404 in a production deploy. +

+
+ +

+

+ + +
+ ); +} diff --git a/src/components/clinical-dashboard/settings-dialog.tsx b/src/components/clinical-dashboard/settings-dialog.tsx index f26f0f46b7..4a6e3ab301 100644 --- a/src/components/clinical-dashboard/settings-dialog.tsx +++ b/src/components/clinical-dashboard/settings-dialog.tsx @@ -1043,19 +1043,19 @@ export function SettingsDialog({ note="In-progress surfaces, reachable only in development builds. Not clinical content." >
-

Caring Contact

+

Development page

- Linked prototype of the caring-contacts workflow. Synthetic data only — no patient record, message - or schedule here is real. + Index of the surfaces being built, including the Caring Contact prototype. Synthetic data only — no + patient record, message or schedule on them is real.

diff --git a/tests/settings-dialog-actions.dom.test.tsx b/tests/settings-dialog-actions.dom.test.tsx index acb2cd509c..6e350d6773 100644 --- a/tests/settings-dialog-actions.dom.test.tsx +++ b/tests/settings-dialog-actions.dom.test.tsx @@ -101,16 +101,16 @@ describe("SettingsDialog — destructive and account actions", () => { // built. It is gated to development builds, matching `mockupsEnabled()`, and the // rail must not advertise a section the body does not render. The route is a // mockup, so the entry navigates through and closes the sheet behind it. - it("opens the Caring Contact prototype from a gated Development section", () => { + it("opens the Development page from a gated Development section", () => { renderDialog(); const development = document.querySelector('[data-settings-section="development"]'); expect(development).not.toBeNull(); expect(development).toHaveTextContent("Development"); expect(development).toHaveTextContent("Synthetic data only"); - const prototypeLink = screen.getByTestId("settings-row-caring-contact-prototype"); - expect(prototypeLink).toHaveAttribute("href", "/mockups/caring-contacts"); - expect(prototypeLink).toHaveTextContent("Open Caring Contact prototype"); + const prototypeLink = screen.getByTestId("settings-row-development-page"); + expect(prototypeLink).toHaveAttribute("href", "/mockups/development"); + expect(prototypeLink).toHaveTextContent("Open Development page"); expect(prototypeLink).toHaveTextContent("Temporary"); expect(development?.contains(prototypeLink)).toBe(true); From 8690c79addc82a27dab865229e75ba08b9873115 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 18 Aug 2026 16:43:33 +0000 Subject: [PATCH 2/2] fix(mockups): state the mockups production gate accurately on the Development page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The page claimed these routes are "reachable only in development builds" and "404 in a production deploy". `mockupsEnabled()` is not that absolute: it returns true whenever NODE_ENV !== "production", and in a production deploy it returns true when NEXT_PUBLIC_MOCKUPS_ENABLED === "true". A production deploy can therefore opt these surfaces in. Reword the metadata description, the header copy and the source comment to describe the gate as it is implemented — off by default in production, on when that deploy explicitly opts in. Raised in review on PR #2135. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01KbTpfE7enAJogpY66PiFmP --- src/app/mockups/development/page.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/app/mockups/development/page.tsx b/src/app/mockups/development/page.tsx index 29f4abc737..351486e922 100644 --- a/src/app/mockups/development/page.tsx +++ b/src/app/mockups/development/page.tsx @@ -6,13 +6,14 @@ import { CARING_CONTACT_MOCKUP_ROUTES } from "@/components/caring-contacts/mocku export const metadata: Metadata = { title: "Development · Clinical KB", - description: "In-progress surfaces reachable only in development builds.", + description: "In-progress surfaces, off by default in a production deploy.", }; // The index of what is being built. It lives under /mockups so it inherits the // namespace's production gate (`mockupsEnabled()` in the mockups layout) rather -// than needing a second one, and so it 404s in a production deploy exactly like -// the surfaces it links to. +// than needing a second one: always on outside production, and 404 in a +// production deploy unless that deploy sets NEXT_PUBLIC_MOCKUPS_ENABLED=true — +// exactly like the surfaces it links to. const DEVELOPMENT_SURFACES = [ { id: "caring-contacts", @@ -42,7 +43,7 @@ export default function DevelopmentIndexPage() {

In-progress surfaces

Work being built, reachable from Settings while it is in development. These routes are not part of the - clinical product and 404 in a production deploy. + clinical product, and a production deploy 404s them unless it explicitly opts in.