Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 1 addition & 3 deletions src/components/applications-launcher-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {
import { type FormEvent, useMemo, useState } from "react";

import { DesktopComposerPortalSlot } from "@/components/desktop-composer-portal-slot";
import { ModeHomeHero, ModeHomeVerificationFooter } from "@/components/mode-home-template";
import { ModeHomeHero } from "@/components/mode-home-template";
import {
MobileResultFilterControl,
SearchResultsHeaderBand,
Expand Down Expand Up @@ -890,8 +890,6 @@ export function ApplicationsLauncherWorkspace({
</Link>
</div>

<ModeHomeVerificationFooter icon={ShieldCheck} label="Clinical tools" body="Source-backed workflows" />

<DetailDialog app={selectedApp} open={detailOpen} onClose={() => setDetailOpen(false)} />
</main>
);
Expand Down
19 changes: 2 additions & 17 deletions src/components/clinical-dashboard/answer-status.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
"use client";

import type { CSSProperties } from "react";
import {
Check,
Circle,
Clipboard,
ClipboardCheck,
History,
Loader2,
MessageSquareText,
ShieldCheck,
Square,
} from "lucide-react";
import { Check, Circle, Clipboard, ClipboardCheck, History, Loader2, MessageSquareText, Square } from "lucide-react";

import {
answerProgressDisplayMessage,
Expand All @@ -22,7 +12,7 @@ import {
import { useClientTime } from "@/lib/use-client-time";
import { AnswerSuggestionChips } from "@/components/clinical-dashboard/answer-suggestion-chips";
import { useAppPreferences } from "@/components/clinical-dashboard/use-app-preferences";
import { ModeHomeTemplate, ModeHomeVerificationFooter } from "@/components/mode-home-template";
import { ModeHomeTemplate } from "@/components/mode-home-template";
import { cn, floatingControl, sourceCard } from "@/components/ui-primitives";
import { answerEmptyState, answerLoading, copyButton } from "@/lib/ui-copy";

Expand Down Expand Up @@ -104,11 +94,6 @@ export function AnswerEmptyState({
{/* Pre-query copy must describe what the search does, not assert that
every indexed source is verified/current (PT-06): validation status
varies per document and is surfaced on the results themselves. */}
<ModeHomeVerificationFooter
icon={ShieldCheck}
label="Searches indexed clinical sources"
body="Clinical Guide library"
/>
</div>
}
/>
Expand Down
2 changes: 1 addition & 1 deletion src/components/clinical-dashboard/differentials-home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1366,7 +1366,7 @@ export function DifferentialsHome({
onClick: () => handleSuggestedSearch(item.query),
}))
}
footer={<ModeHomeVerificationFooter icon={ShieldCheck} label="Decision support" body="Review before use" />}
footer={<ModeHomeVerificationFooter label="Decision support" body="Review before use" />}
/>
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import {
Route,
Shield,
ShieldAlert,
ShieldCheck,
Sparkles,
Tag,
Target,
Expand All @@ -40,7 +39,7 @@ import {
import { DocumentTagCloud } from "@/components/DocumentTagCloud";
import { documentDisplayTitle } from "@/components/DocumentOrganizationBadges";
import { isDeployedClinicalKb } from "@/lib/deployed-app";
import { ModeHomeTemplate, ModeHomeVerificationFooter } from "@/components/mode-home-template";
import { ModeHomeTemplate } from "@/components/mode-home-template";
import { ScopeAndGovernanceNotice } from "@/components/clinical-dashboard/answer-content";
import {
MobileResultFilterControl,
Expand Down Expand Up @@ -601,11 +600,6 @@ function DocumentSearchHome({
}))}
footer={
<div className="grid w-full gap-3">
<ModeHomeVerificationFooter
icon={ShieldCheck}
label="Searches indexed clinical sources"
body="Clinical source collection"
/>
{documentCount > 0 ? (
<p className="text-xs font-semibold text-[color:var(--text-soft)]" aria-live="polite">
{documentCount.toLocaleString()} indexed source{documentCount === 1 ? "" : "s"}
Expand Down
17 changes: 2 additions & 15 deletions src/components/clinical-dashboard/favourites-hub.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
"use client";

import Link from "next/link";
import {
ArrowUpDown,
ChevronDown,
CircleAlert,
Filter,
Folder,
Heart,
Plus,
Search,
ShieldCheck,
X,
} from "lucide-react";
import { ArrowUpDown, ChevronDown, CircleAlert, Filter, Folder, Heart, Plus, Search, X } from "lucide-react";
import { useMemo, useRef, useState, type KeyboardEvent as ReactKeyboardEvent } from "react";
import { useDismissableLayer } from "@/components/use-dismissable-layer";
import { DesktopComposerPortalSlot } from "@/components/desktop-composer-portal-slot";
import { ModeHomeHero, ModeHomeVerificationFooter } from "@/components/mode-home-template";
import { ModeHomeHero } from "@/components/mode-home-template";
import {
cn,
floatingControl,
Expand Down Expand Up @@ -570,8 +559,6 @@ export function FavouritesHub({
</section>
</aside>
</div>

<ModeHomeVerificationFooter icon={ShieldCheck} label="Saved clinical work" body="Local library" />
</div>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ function MedicationHome({
apiUnavailable={apiUnavailable}
setupWarning={setupWarning}
/>
<ModeHomeVerificationFooter icon={ShieldCheck} label="Prescribing support" body="Confirm against source" />
<ModeHomeVerificationFooter label="Prescribing support" body="Confirm against source" />
</div>
}
/>
Expand Down
3 changes: 1 addition & 2 deletions src/components/dsm/dsm-home-page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { BookOpenCheck, GitCompareArrows, ListChecks, Search, ShieldCheck } from "lucide-react";
import { BookOpenCheck, GitCompareArrows, ListChecks, Search } from "lucide-react";

import { ModeHomeMain, ModeHomeTemplate, ModeHomeVerificationFooter } from "@/components/mode-home-template";
import { dsmCategories, dsmDiagnoses } from "@/lib/dsm";
Expand Down Expand Up @@ -51,7 +51,6 @@ export function DsmHomePage() {
}))}
footer={
<ModeHomeVerificationFooter
icon={ShieldCheck}
label={`${dsmDiagnoses.length} diagnoses`}
body="Local reference content · Clinical review required"
/>
Expand Down
3 changes: 1 addition & 2 deletions src/components/factsheets/factsheets-home-page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Link from "next/link";
import { ArrowRight, BookOpenText, Clock, ShieldCheck } from "lucide-react";
import { ArrowRight, BookOpenText, Clock } from "lucide-react";

import {
categoryCount,
Expand Down Expand Up @@ -136,7 +136,6 @@ export function FactsheetsHomePage() {

<div className="w-full px-4 pt-1 sm:px-0">
<ModeHomeVerificationFooter
icon={ShieldCheck}
label="Demonstration patient information"
body="Connect only governance-approved content before publication"
/>
Expand Down
1 change: 0 additions & 1 deletion src/components/forms/forms-home-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ export function FormsHomePage({ defaultFormSlug = null }: { defaultFormSlug?: st
footer={
hasRegistryRecords ? (
<ModeHomeVerificationFooter
icon={ShieldCheck}
label="Source catalogue reviewed"
body="Official-source MHA 2014 forms · verify before use"
verifiedCount={verifiedCount}
Expand Down
2 changes: 0 additions & 2 deletions src/components/formulation/formulation-home-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
ListChecks,
Network,
Search,
ShieldCheck,
Waypoints,
} from "lucide-react";

Expand Down Expand Up @@ -146,7 +145,6 @@ function FormulationHome() {
<div className="grid gap-3">
<FormulationThreadStrip />
<ModeHomeVerificationFooter
icon={ShieldCheck}
label="Hypothesis-led decision support"
body="Check fit, alternatives, risk, and context before using a draft"
/>
Expand Down
26 changes: 19 additions & 7 deletions src/components/mode-home-template.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,26 +157,38 @@ export function ModeHomeMain({
);
}

// One quiet line of text. Deliberately no icon and no accent colour: a shield
// (and especially a ShieldCheck) reads as "verified", which several of these
// footers must not assert — validation status varies per document and is
// surfaced on the results themselves. Hierarchy comes from weight alone, so the
// label half (capability) carries the emphasis rather than the body half (caveat).
//
// Modes whose footer said only what the mode does, with no caveat, no longer
// render this at all; the remaining call sites are the ones whose `body` is a
// genuine review-before-use instruction.
export function ModeHomeVerificationFooter({
icon: Icon,
label,
body,
verifiedCount,
totalCount,
}: {
icon: LucideIcon;
label: string;
body: string;
verifiedCount?: number;
totalCount?: number;
}) {
return (
<p className="flex flex-wrap items-center justify-center gap-x-3 gap-y-2 pt-0.5 text-xs font-medium leading-5 text-[color:var(--text-muted)] sm:pt-1 sm:text-sm">
<span className="inline-flex items-center gap-2 font-semibold text-[color:var(--clinical-accent)]">
<Icon className="h-4 w-4" aria-hidden="true" />
{label}
<p className="flex flex-wrap items-center justify-center gap-x-1.5 gap-y-0.5 pt-0.5 text-2xs leading-4 text-[color:var(--text-muted)] sm:pt-1">
{/* The separator is bound to the label as one non-breaking flex item.
As three independent items it could wrap alone: measured at 390px,
five of the nine footers wrapped and every one stranded the dot on
the line above the clause it joins. */}
<span className="whitespace-nowrap font-medium text-[color:var(--text-heading)]">
{label}{" "}
<span className="font-normal text-[color:var(--text-muted)]" aria-hidden="true">
·
</span>
</span>
<span aria-hidden="true">•</span>
<span>{body}</span>
{typeof verifiedCount === "number" && typeof totalCount === "number" ? (
<span className="sr-only">
Expand Down
1 change: 0 additions & 1 deletion src/components/services/services-home-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ export function ServicesHomePage({ defaultServiceSlug = null }: { defaultService
footer={
hasRegistryRecords ? (
<ModeHomeVerificationFooter
icon={Route}
label="Referral fit"
body="Need, catchment, eligibility and route"
verifiedCount={verifiedCount}
Expand Down
12 changes: 1 addition & 11 deletions src/components/specifiers/specifiers-home-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,7 @@

import Link from "next/link";
import { useMemo, useState } from "react";
import {
ArrowRight,
ChevronRight,
GitCompareArrows,
ListChecks,
Search,
ShieldCheck,
Tags,
Waypoints,
} from "lucide-react";
import { ArrowRight, ChevronRight, GitCompareArrows, ListChecks, Search, Tags, Waypoints } from "lucide-react";

import { ModeHomeMain, ModeHomeTemplate, ModeHomeVerificationFooter } from "@/components/mode-home-template";
import {
Expand Down Expand Up @@ -152,7 +143,6 @@ function SpecifiersHome() {
<div className="grid gap-3">
<SpecifierPathwayStrip />
<ModeHomeVerificationFooter
icon={ShieldCheck}
label="Diagnostic decision support"
body="Review criteria and exclusions before documenting"
/>
Expand Down
3 changes: 1 addition & 2 deletions src/components/therapy-compass/screens/home-screen.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import { FileText, Network, Search, ShieldCheck, Sparkles, Waypoints } from "lucide-react";
import { FileText, Network, Search, Sparkles, Waypoints } from "lucide-react";

import { ModeHomeMain, ModeHomeTemplate, ModeHomeVerificationFooter } from "@/components/mode-home-template";
import { modeHomeDesktopComposerSlotId } from "@/lib/mode-home-composer";
Expand Down Expand Up @@ -66,7 +66,6 @@ export function HomeScreen() {
}))}
footer={
<ModeHomeVerificationFooter
icon={ShieldCheck}
label="Decision support"
body="Source-grounded — review status before clinical use"
/>
Expand Down
7 changes: 1 addition & 6 deletions src/components/therapy-compass/workspace.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"use client";

import { ShieldCheck } from "lucide-react";
import { usePathname } from "next/navigation";
import type { ReactNode } from "react";

Expand All @@ -13,11 +12,7 @@ import { TherapyCompassNav, TherapyModeNav } from "./nav";
function TherapyCompassFooter() {
return (
<div className="tc-no-print tc-workspace-001">
<ModeHomeVerificationFooter
icon={ShieldCheck}
label="Decision support"
body="Source-grounded — review status before clinical use"
/>
<ModeHomeVerificationFooter label="Decision support" body="Source-grounded — review status before clinical use" />
</div>
);
}
Expand Down
Loading