Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 4 additions & 29 deletions src/components/ClinicalDashboard.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -62,9 +62,9 @@
answerSurface,
chatMicroAction,
clinicalDivider,
clinicalNotesRow,

Check warning on line 65 in src/components/ClinicalDashboard.tsx

View workflow job for this annotation

GitHub Actions/ verify

'clinicalNotesRow' is defined but never used
cn,
evidenceRow,

Check warning on line 67 in src/components/ClinicalDashboard.tsx

View workflow job for this annotation

GitHub Actions/ verify

'evidenceRow' is defined but never used
EmptyState,
fieldControlPlain,
fieldControlWithIcon,
Expand DownExpand Up@@ -255,13 +255,13 @@
import {
type AnswerEvidenceMapRow,
type AnswerViewMode,
buildAnswerEvidenceMap,

Check warning on line 258 in src/components/ClinicalDashboard.tsx

View workflow job for this annotation

GitHub Actions/ verify

'buildAnswerEvidenceMap' is defined but never used
buildClinicalOutputSections,

Check warning on line 259 in src/components/ClinicalDashboard.tsx

View workflow job for this annotation

GitHub Actions/ verify

'buildClinicalOutputSections' is defined but never used
buildHighYieldClinicalOutputSections,

Check warning on line 260 in src/components/ClinicalDashboard.tsx

View workflow job for this annotation

GitHub Actions/ verify

'buildHighYieldClinicalOutputSections' is defined but never used
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";
Expand DownExpand Up@@ -478,7 +478,7 @@
return navigationHashes.includes(hash as (typeof navigationHashes)[number]) ? hash : "#search";
}

function WhyThisMatchedPanel({ sources }: { sources: SearchResult[] }) {

Check warning on line 481 in src/components/ClinicalDashboard.tsx

View workflow job for this annotation

GitHub Actions/ verify

'WhyThisMatchedPanel' is defined but never used
const visibleSources = sources.slice(0, 3);
if (visibleSources.length === 0) return null;

Expand DownExpand Up@@ -585,7 +585,7 @@

if (collapsed) {
return (
<section id="images" className="space-y-3 scroll-mt-4 sm:scroll-mt-6">
<section className="space-y-3 scroll-mt-4 sm:scroll-mt-6">
<UtilityDrawer
icon={FileImage}
title="Nearby visual evidence"
Expand DownExpand Up@@ -694,11 +694,7 @@

if (embedded) return <div className="space-y-3">{content}</div>;

return (
<section id="images" className="space-y-3 scroll-mt-4 sm:scroll-mt-6">
{content}
</section>
);
return <section className="space-y-3 scroll-mt-4 sm:scroll-mt-6">{content}</section>;
}

function InlineTableCard({ item }: { item: VisualEvidenceCard }) {
Expand DownExpand Up@@ -1056,7 +1052,7 @@
function MobileEvidenceTabPanel({
tab,
renderModel,
query,

Check warning on line 1055 in src/components/ClinicalDashboard.tsx

View workflow job for this annotation

GitHub Actions/ verify

'query' is defined but never used
visualEvidence,
answerEvidenceMapRows,
copiedQuotes,
Expand DownExpand Up@@ -1129,7 +1125,7 @@
return <EvidenceGapsPanel warnings={renderModel.warnings} />;
}

function UnifiedEvidenceDrawerContent({

Check warning on line 1128 in src/components/ClinicalDashboard.tsx

View workflow job for this annotation

GitHub Actions/ verify

'UnifiedEvidenceDrawerContent' is defined but never used
answer,
renderModel,
query,
Expand DownExpand Up@@ -1322,8 +1318,8 @@
query,
safeAnswerText,
bestSource,
currentRelevance,

Check warning on line 1321 in src/components/ClinicalDashboard.tsx

View workflow job for this annotation

GitHub Actions/ verify

'currentRelevance' is defined but never used
queryMode,

Check warning on line 1322 in src/components/ClinicalDashboard.tsx

View workflow job for this annotation

GitHub Actions/ verify

'queryMode' is defined but never used
sourceGovernanceWarnings,
sourceSummary,
renderModel,
Expand DownExpand Up@@ -5096,7 +5092,7 @@

const mainTop = main.getBoundingClientRect().top;
const marker = mainTop + 96;
const sections = ["#quotes", "#images", "#sources"];
const sections = ["#sources"];
const current =
sections
.map((section) => {
Expand DownExpand Up@@ -5151,7 +5147,6 @@
() => (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
Expand DownExpand Up@@ -5261,26 +5256,6 @@
: 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
Expand Down
Loading