From 7d020665443e3a2c3d08a500dc12745f5fc25844 Mon Sep 17 00:00:00 2001 From: BigSimmo <87357024+BigSimmo@users.noreply.github.com> Date: Fri, 3 Jul 2026 16:20:41 +0800 Subject: [PATCH 1/2] fix(dashboard): prune dead #quotes/#images evidence nav anchors The evidence UI was redesigned into UnifiedEvidenceDrawerContent (a drawer with its own in-panel pill nav), which dropped the #quotes and #images section ids. The top section-jump nav (navigationHashes), its scroll-spy, and the Quotes/Images nav items still referenced those hashes, so both were dead jump targets: getElementById returns null and the scroll is a no-op. - Drop #quotes/#images from navigationHashes and the scroll-spy section list - Remove the now-dead Quotes/Images nav items (Search + Sources remain) - Remove the orphaned visualEvidence memo (only the Images item consumed it) - Strip the leftover id="images" from VisualEvidenceStrip's two non-embedded return branches (never rendered since all call sites pass embedded, but a latent duplicate-id hazard) typecheck + eslint clean; no new warnings. Co-Authored-By: Claude Opus 4.8 --- src/components/ClinicalDashboard.tsx | 29 ++++------------------------ 1 file changed, 4 insertions(+), 25 deletions(-) diff --git a/src/components/ClinicalDashboard.tsx b/src/components/ClinicalDashboard.tsx index d9b523bfc..593ff85b9 100644 --- a/src/components/ClinicalDashboard.tsx +++ b/src/components/ClinicalDashboard.tsx @@ -261,7 +261,7 @@ import { shouldPollForUpdates, } from "@/lib/ward-output"; -const navigationHashes = ["#search", "#quotes", "#images", "#sources"] as const; +const navigationHashes = ["#search", "#sources"] as const; const mobileSectionFabMediaQuery = "(max-width: 768px), ((max-width: 1023px) and (hover: none) and (pointer: coarse))"; export const recentQueryStorageKey = "clinical-kb-recent-queries"; @@ -585,7 +585,7 @@ function VisualEvidenceStrip({ if (collapsed) { return ( -
+
{content}; return ( -
+
{content}
); @@ -5096,7 +5096,7 @@ export function ClinicalDashboard({ const mainTop = main.getBoundingClientRect().top; const marker = mainTop + 96; - const sections = ["#quotes", "#images", "#sources"]; + const sections = ["#sources"]; const current = sections .map((section) => { @@ -5151,7 +5151,6 @@ export function ClinicalDashboard({ () => (answer ? buildAnswerRenderModel(answer, { sources, includeDebugReasons: true }) : null), [answer, sources], ); - const visualEvidence = useMemo(() => answerRenderModel?.visualEvidence ?? [], [answerRenderModel]); const relatedDocuments = useMemo(() => answerRenderModel?.relatedDocuments ?? [], [answerRenderModel]); const currentRelevance = answer?.relevance ?? answer?.smartPanel?.relevance ?? searchRelevance; const weakEvidence = answerRenderModel @@ -5261,26 +5260,6 @@ export function ClinicalDashboard({ : null, empty: activeModeResultKind === "documents" && documentMatches.length === 0, }, - { - label: "Quotes", - description: answer - ? answerRenderModel?.quoteCards.length - ? "Exact source excerpts" - : "No quotes yet" - : "No quotes yet", - icon: Quote, - href: "#quotes", - count: answer ? (answerRenderModel?.quoteCards.length ?? 0) : null, - empty: !answer || (answerRenderModel?.quoteCards.length ?? 0) === 0, - }, - { - label: "Images", - description: answer ? (visualEvidence.length ? "Tables and diagrams" : "No images yet") : "No images yet", - icon: FileImage, - href: "#images", - count: answer ? visualEvidence.length : null, - empty: !answer || visualEvidence.length === 0, - }, { label: "Sources", description: answer From bbe8b713e629f9d7c30931c4ad59ed8921a2d004 Mon Sep 17 00:00:00 2001 From: BigSimmo <87357024+BigSimmo@users.noreply.github.com> Date: Fri, 3 Jul 2026 16:24:05 +0800 Subject: [PATCH 2/2] style: prettier-format collapsed section return Removing id="images" shortened the VisualEvidenceStrip default-branch
enough for prettier to collapse it onto one line. Fixes the format:check verify gate. Co-Authored-By: Claude Opus 4.8 --- src/components/ClinicalDashboard.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/components/ClinicalDashboard.tsx b/src/components/ClinicalDashboard.tsx index 593ff85b9..c19be59c6 100644 --- a/src/components/ClinicalDashboard.tsx +++ b/src/components/ClinicalDashboard.tsx @@ -694,11 +694,7 @@ function VisualEvidenceStrip({ if (embedded) return
{content}
; - return ( -
- {content} -
- ); + return
{content}
; } function InlineTableCard({ item }: { item: VisualEvidenceCard }) {