From 9400f5214aba5157f44efe87dd5ec292f830c9ad Mon Sep 17 00:00:00 2001 From: BigSimmo <87357024+BigSimmo@users.noreply.github.com> Date: Tue, 28 Jul 2026 10:31:11 +0800 Subject: [PATCH 1/7] Implement audit design fixes and fallback improvements --- .../differentials/[id]/not-found.tsx | 22 +++++++++++ .../(search-app)/documents/[id]/not-found.tsx | 22 +++++++++++ src/app/(search-app)/dsm/error.tsx | 7 ++++ src/app/(search-app)/formulation/error.tsx | 7 ++++ src/app/(search-app)/medications/error.tsx | 7 ++++ .../(search-app)/therapy-compass/error.tsx | 7 ++++ src/app/global-error.tsx | 39 ++++++++++++++++++- src/components/DocumentViewer.tsx | 3 +- .../clinical-dashboard/answer-status.tsx | 2 +- .../clinical-dashboard/image-lightbox.tsx | 17 ++++++-- .../clinical-dashboard/search-utils.ts | 31 +++++++++++++++ .../clinical-dashboard/signed-image.tsx | 9 ++++- src/components/mode-home-page-skeleton.tsx | 6 +-- src/components/route-error-boundary.tsx | 30 +++++++++++++- src/components/ui-primitives.tsx | 2 +- 15 files changed, 196 insertions(+), 15 deletions(-) create mode 100644 src/app/(search-app)/differentials/[id]/not-found.tsx create mode 100644 src/app/(search-app)/documents/[id]/not-found.tsx create mode 100644 src/app/(search-app)/dsm/error.tsx create mode 100644 src/app/(search-app)/formulation/error.tsx create mode 100644 src/app/(search-app)/medications/error.tsx create mode 100644 src/app/(search-app)/therapy-compass/error.tsx diff --git a/src/app/(search-app)/differentials/[id]/not-found.tsx b/src/app/(search-app)/differentials/[id]/not-found.tsx new file mode 100644 index 0000000000..74109796be --- /dev/null +++ b/src/app/(search-app)/differentials/[id]/not-found.tsx @@ -0,0 +1,22 @@ +"use client"; + +import Link from "next/link"; +import { EmptyState } from "@/components/ui-primitives"; +import { FileQuestion } from "lucide-react"; + +export default function NotFound() { + return ( +
No indexed clinically useful tables or diagrams.
++ The requested differential diagnosis could not be found or has been deleted. +
++ The requested document could not be found or has been deleted. +
+