Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
40b92d2
Clean up Factsheets, Dictionary, and Calculators home pages
claude Aug 18, 2026
3e4e2e8
Record branch review for the home-pages cleanup
claude Aug 18, 2026
f6e36b5
Merge branch 'main' into claude/home-pages-cleanup-qeh5fr
BigSimmo Aug 18, 2026
4987528
Merge branch 'main' into claude/home-pages-cleanup-qeh5fr
BigSimmo Aug 18, 2026
093544b
Merge branch 'main' into claude/home-pages-cleanup-qeh5fr
BigSimmo Aug 18, 2026
894279b
Remove the caveat footer from every mode home page
claude Aug 18, 2026
f153e44
Merge remote-tracking branch 'origin/claude/home-pages-cleanup-qeh5fr…
claude Aug 18, 2026
9fe48eb
Merge branch 'main' into claude/home-pages-cleanup-qeh5fr
BigSimmo Aug 18, 2026
33ec22a
Merge remote-tracking branch 'origin/claude/home-pages-cleanup-qeh5fr…
claude Aug 18, 2026
541e730
Record branch review for the mode-home footer removal
claude Aug 18, 2026
7174729
fix(tests): drop the stale specifiers caveat assertion in ui-tools.sp…
claude Aug 18, 2026
124d3a6
Make the no-caveat-footer rule structurally enforceable
claude Aug 18, 2026
99a74ca
Merge remote-tracking branch 'origin/claude/home-pages-cleanup-qeh5fr…
claude Aug 18, 2026
1d480e8
Merge branch 'main' into claude/home-pages-cleanup-qeh5fr
BigSimmo Aug 18, 2026
1652bf6
Merge remote-tracking branch 'origin/claude/home-pages-cleanup-qeh5fr…
claude Aug 18, 2026
9a9ea3f
Merge branch 'main' into claude/home-pages-cleanup-qeh5fr
BigSimmo Aug 18, 2026
1a1d7cb
Merge branch 'main' into claude/home-pages-cleanup-qeh5fr
BigSimmo Aug 18, 2026
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
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
| 2026-08-18 | claude/home-pages-cleanup-qeh5fr | 33ec22afd7b23dfc89fdf836fc80cc4a97c7a065 | remove caveat footer from every mode home | self-review clean; all mode-home caveat footers removed, dead reserve/props/helper deleted | verify:pr-local pass on merged head (673 files / 7281 tests, build, lint, typecheck, offline RAG evals); verify:ui not run — playwright chromium 1234 vs installed 1194 (#255) |
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
| 2026-08-18 | claude/home-pages-cleanup-qeh5fr | 40b92d2d6f41d0f9fadc8c4840737ffae1f34c5d | mode home footers + dictionary command surface | self-review clean; footers removed on user instruction, dictionary example ticket added | verify:pr-local pass (673 files / 7276 tests); verify:ui not run — playwright chromium 1234 vs installed 1194 (#255), delegated to CI |
18 changes: 0 additions & 18 deletions src/app/globals.css
Original file line numberDiff line numberDiff line change
Expand Up@@ -1109,24 +1109,6 @@ summary::-webkit-details-marker {
}
}

/* Shared-home verification reserve.
*
* The same jump the copy reserve above prevents, one block lower. On `/` the
* mode pill swaps the whole page's copy in place, and each mode's
* review-before-use caveat is a different length — measured in Chromium across
* every entry in sharedHomePresentation, the footer renders at 0, 18, 36 or
* 52px. Because the mode home is vertically centred, that difference moves the
* composer: Formulation sat 8px above Specifiers at 320px before this reserve.
*
* Flat rather than banded, unlike the copy reserve: Calculators' caveat wraps
* to three lines at every phone width, so a per-width band would resolve to the
* same value three times. 3 line boxes (leading-4) + the footer's own pt-0.5 +
* two gap-y-0.5 wrap gaps. Dead space below the shortest caveat costs nothing
* visible — it lands inside the centring gap, with no content beneath it. */
:root {
--mode-home-verification-reserve: calc(3 * 1rem + 0.125rem + 2 * 0.125rem);
}

.mode-home-composer-slot {
width: min(100%, clamp(19rem, 90vw, 52rem));
max-width: calc(100vw - 1rem - var(--safe-area-left) - var(--safe-area-right));
Expand Down
8 changes: 1 addition & 7 deletions src/components/calculators/home-page.tsx
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
import { Calculator, CloudRain, GlassWater, Search, Zap } from "lucide-react";

import { ModeHomeMain, ModeHomeTemplate, ModeHomeVerificationFooter } from "@/components/mode-home-template";
import { ModeHomeMain, ModeHomeTemplate } from "@/components/mode-home-template";
import { appModeHomeHref } from "@/lib/app-modes";
import { modeHomeDesktopComposerSlotId } from "@/lib/mode-home-composer";

Expand DownExpand Up@@ -46,12 +46,6 @@ export function CalculatorsHomePage() {
href: calculatorSearchHref(label),
icon: Search,
}))}
footer={
<ModeHomeVerificationFooter
label="Source-cited scoring"
body="Scores support clinical judgement and never replace a full assessment. Nothing entered here is stored."
/>
}
/>
</ModeHomeMain>
);
Expand Down
22 changes: 1 addition & 21 deletions src/components/clinical-dashboard/answer-status.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,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 { appModeIcons } from "@/lib/app-mode-icons";
import type { AppModeId } from "@/lib/app-modes";
Expand DownExpand Up@@ -75,9 +75,6 @@ export function SharedHomeEmptyState({
onSelectRecent && preferences.showRecentOnHome
? recentQueries.filter((entry) => entry.trim().length > 0).slice(0, 5)
: [];
// Annotated: `sharedHomePresentation` is `as const`, so indexing it with the
// AppModeId union yields a union of entry shapes and `verification` (optional)
// would not resolve on the members that omit it.
const presentation: SharedHomePresentation = sharedHomePresentation[modeId];

return (
Expand All@@ -104,23 +101,6 @@ export function SharedHomeEmptyState({
icon={History}
/>
)}
{/* Every mode that carries a review-before-use caveat shows it here,
not just Answer: the mode pill never leaves `/`, so this page is
the only home a clinician sees for most modes.

The reserve is on the wrapper, which renders for every mode —
including the modes with no caveat. Sized on the slot rather than
the caveat, it holds the centred column's height constant so
switching modes cannot move the composer (see
--mode-home-verification-reserve in globals.css). */}
<div className="max-sm:min-h-[var(--mode-home-verification-reserve)]">
{presentation.verification ? (
<ModeHomeVerificationFooter
label={presentation.verification.label}
body={presentation.verification.body}
/>
) : null}
</div>
</div>
}
/>
Expand Down
3 changes: 1 addition & 2 deletions src/components/clinical-dashboard/differentials-home.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -21,7 +21,7 @@ import {
type LucideIcon,
} from "lucide-react";

import { ModeHomeTemplate, ModeHomeVerificationFooter } from "@/components/mode-home-template";
import { ModeHomeTemplate } from "@/components/mode-home-template";
import {
SearchResultsHeaderBand,
type AppliedFilterChip,
Expand DownExpand Up@@ -1446,7 +1446,6 @@ export function DifferentialsHome({
onClick: () => handleSuggestedSearch(item.query),
}))
}
footer={<ModeHomeVerificationFooter label="Decision support" body="Review before use" />}
/>
</div>
);
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -19,7 +19,7 @@ import Link from "next/link";
import { useSearchParams } from "next/navigation";
import { useId, useMemo, useState } from "react";

import { ModeHomeTemplate, ModeHomeVerificationFooter } from "@/components/mode-home-template";
import { ModeHomeTemplate } from "@/components/mode-home-template";
import { SearchResultsHeaderBand } from "@/components/clinical-dashboard/search-results-header-band";
import {
ResultFilterSheet,
Expand DownExpand Up@@ -303,15 +303,12 @@ function MedicationHome({
onClick: () => onSuggestedSearch(item.query),
}))}
footer={
<div className="grid gap-3">
<StatusNotice
realDataReady={realDataReady}
authUnavailable={authUnavailable}
apiUnavailable={apiUnavailable}
setupWarning={setupWarning}
/>
<ModeHomeVerificationFooter label="Prescribing support" body="Confirm against source" />
</div>
<StatusNotice
realDataReady={realDataReady}
authUnavailable={authUnavailable}
apiUnavailable={apiUnavailable}
setupWarning={setupWarning}
/>
}
/>
);
Expand Down
8 changes: 1 addition & 7 deletions src/components/dictionary/dictionary-home-page.tsx
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
import { BookOpen, GitCompareArrows, LibraryBig, List, Quote, Tags } from "lucide-react";

import { ModeHomeMain, ModeHomeTemplate, ModeHomeVerificationFooter } from "@/components/mode-home-template";
import { ModeHomeMain, ModeHomeTemplate } from "@/components/mode-home-template";
import { modeHomeDesktopComposerSlotId } from "@/lib/mode-home-composer";
import { dictionaryEntries, dictionaryTopics } from "@/lib/dictionary-data";

Expand DownExpand Up@@ -63,12 +63,6 @@ export function DictionaryHomePage() {
},
{ label: "Source governance", shortLabel: "Sources", href: "/dictionary/sources", tone: "info" },
]}
footer={
<ModeHomeVerificationFooter
label="Source-checked reference terminology"
body="Not patient-specific guidance"
/>
}
/>
</ModeHomeMain>
);
Expand Down
10 changes: 2 additions & 8 deletions src/components/dsm/dsm-home-page.tsx
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
import { BookOpenCheck, GitCompareArrows, ListChecks, Search } from "lucide-react";

import { ModeHomeMain, ModeHomeTemplate, ModeHomeVerificationFooter } from "@/components/mode-home-template";
import { dsmCategories, dsmDiagnoses } from "@/lib/dsm";
import { ModeHomeMain, ModeHomeTemplate } from "@/components/mode-home-template";
import { dsmCategories } from "@/lib/dsm";
import { modeHomeDesktopComposerSlotId } from "@/lib/mode-home-composer";

const featuredCategories = dsmCategories
Expand DownExpand Up@@ -64,12 +64,6 @@ export function DsmHomePage() {
shortLabel: category.label,
href: `/dsm/search?category=${category.key}`,
}))}
footer={
<ModeHomeVerificationFooter
label={`${dsmDiagnoses.length} diagnoses`}
body="Local reference content · Clinical review required"
/>
}
/>
</ModeHomeMain>
);
Expand Down
8 changes: 1 addition & 7 deletions src/components/factsheets/factsheets-home-page.tsx
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
import { BookOpenText } from "lucide-react";

import { ModeHomeMain, ModeHomeTemplate, ModeHomeVerificationFooter } from "@/components/mode-home-template";
import { ModeHomeMain, ModeHomeTemplate } from "@/components/mode-home-template";
import { modeHomeDesktopComposerSlotId } from "@/lib/mode-home-composer";

export function FactsheetsHomePage() {
Expand All@@ -14,12 +14,6 @@ export function FactsheetsHomePage() {
actions={[]}
actionsLabel="Factsheets actions"
desktopComposerSlotId={modeHomeDesktopComposerSlotId}
footer={
<ModeHomeVerificationFooter
label="Demonstration patient information"
body="Connect only governance-approved content before publication"
/>
}
/>
</ModeHomeMain>
);
Expand Down
17 changes: 2 additions & 15 deletions src/components/forms/forms-home-page.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -17,13 +17,12 @@ import {
ModeHomeMain,
ModeHomeStatusNotice,
ModeHomeTemplate,
ModeHomeVerificationFooter,
type ModeHomeAction,
type ModeHomePill,
} from "@/components/mode-home-template";
import { appModeHomeHref } from "@/lib/app-modes";
import { modeHomeDesktopComposerSlotId } from "@/lib/mode-home-composer";
import { countVerifiedRegistryRecords, useRegistryRecords } from "@/lib/use-registry-records";
import { useRegistryRecords } from "@/lib/use-registry-records";

// The default form slug is computed server-side (app/forms/page.tsx) and passed
// as a prop: a direct `@/lib/forms` value import here would compile the full
Expand DownExpand Up@@ -84,7 +83,6 @@ const commonTasks: ModeHomePill[] = [
export function FormsHomePage({ defaultFormSlug = null }: { defaultFormSlug?: string | null }) {
const taskCards = buildTaskCards(defaultFormSlug);
const registry = useRegistryRecords("form", { view: "summary" });
const verifiedCount = countVerifiedRegistryRecords(registry);
const registryReady = registry.status === "ready" || registry.status === "refetching";
const hasRegistryRecords = registryReady && registry.total > 0;
const registryNotice =
Expand DownExpand Up@@ -133,18 +131,7 @@ export function FormsHomePage({ defaultFormSlug = null }: { defaultFormSlug?: st
actions={hasRegistryRecords ? taskCards : []}
pillsTitle="Browse by type"
pills={hasRegistryRecords ? commonTasks : []}
footer={
hasRegistryRecords ? (
<ModeHomeVerificationFooter
label="Source catalogue reviewed"
body="Official-source MHA 2014 forms · verify before use"
verifiedCount={verifiedCount}
totalCount={registry.total}
/>
) : (
registryNotice
)
}
footer={hasRegistryRecords ? null : registryNotice}
/>
</ModeHomeMain>
);
Expand Down
12 changes: 2 additions & 10 deletions src/components/formulation/formulation-home-page.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -23,7 +23,7 @@ import {
formulationCard,
} from "@/components/formulation/formulation-ui";
import { ClinicalPathwayStrip } from "@/components/clinical-record-panels";
import { ModeHomeMain, ModeHomeTemplate, ModeHomeVerificationFooter } from "@/components/mode-home-template";
import { ModeHomeMain, ModeHomeTemplate } from "@/components/mode-home-template";
import {
SearchResultsHeaderBand,
type AppliedFilterChip,
Expand DownExpand Up@@ -117,15 +117,7 @@ function FormulationHome() {
<ChevronRight className="h-3.5 w-3.5" aria-hidden />
</Link>
}
footer={
<div className="grid gap-3">
<FormulationThreadStrip />
<ModeHomeVerificationFooter
label="Hypothesis-led decision support"
body="Check fit, alternatives, risk, and context before using a draft"
/>
</div>
}
footer={<FormulationThreadStrip />}
/>
</ModeHomeMain>
);
Expand Down
32 changes: 9 additions & 23 deletions src/components/mode-home-template.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -206,25 +206,16 @@ 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).
// (and especially a ShieldCheck) reads as "verified", which this footer 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({
label,
body,
verifiedCount,
totalCount,
}: {
label: string;
body: string;
verifiedCount?: number;
totalCount?: number;
}) {
// No mode home renders this any more: the line under the composer was removed
// from every home page. The sole remaining call site is the therapy-compass
// page footer, which sits at the bottom of the sub-routes and is explicitly not
// rendered on the therapy home (`showFooter={!isHome}` in workspace.tsx).
export function ModeHomeVerificationFooter({ label, body }: { label: string; body: string }) {
return (
<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.
Expand All@@ -238,11 +229,6 @@ export function ModeHomeVerificationFooter({
</span>
</span>
<span>{body}</span>
{typeof verifiedCount === "number" && typeof totalCount === "number" ? (
<span className="sr-only">
{verifiedCount} of {totalCount} records are locally verified.
</span>
) : null}
</p>
);
}
Expand Down
17 changes: 2 additions & 15 deletions src/components/services/services-home-page.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,13 +6,12 @@ import {
ModeHomeMain,
ModeHomeStatusNotice,
ModeHomeTemplate,
ModeHomeVerificationFooter,
type ModeHomeAction,
type ModeHomePill,
} from "@/components/mode-home-template";
import { appModeHomeHref } from "@/lib/app-modes";
import { modeHomeDesktopComposerSlotId } from "@/lib/mode-home-composer";
import { countVerifiedRegistryRecords, useRegistryRecords } from "@/lib/use-registry-records";
import { useRegistryRecords } from "@/lib/use-registry-records";

// The default service slug is computed server-side (app/services/page.tsx) and
// passed as a prop: a direct `@/lib/services` value import here would compile
Expand DownExpand Up@@ -91,7 +90,6 @@ const commonPathways: ModeHomePill[] = [
export function ServicesHomePage({ defaultServiceSlug = null }: { defaultServiceSlug?: string | null }) {
const taskCards = buildTaskCards(defaultServiceSlug);
const registry = useRegistryRecords("service", { view: "summary" });
const verifiedCount = countVerifiedRegistryRecords(registry);
const registryReady = registry.status === "ready" || registry.status === "refetching";
const hasRegistryRecords = registryReady && registry.total > 0;
const registryNotice =
Expand DownExpand Up@@ -142,18 +140,7 @@ export function ServicesHomePage({ defaultServiceSlug = null }: { defaultService
actions={hasRegistryRecords ? taskCards : []}
pillsTitle="Browse by need"
pills={hasRegistryRecords ? commonPathways : []}
footer={
hasRegistryRecords ? (
<ModeHomeVerificationFooter
label="Referral fit"
body="Need, catchment, eligibility and route"
verifiedCount={verifiedCount}
totalCount={registry.total}
/>
) : (
registryNotice
)
}
footer={hasRegistryRecords ? null : registryNotice}
/>
</ModeHomeMain>
);
Expand Down
12 changes: 2 additions & 10 deletions src/components/specifiers/specifiers-home-page.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,7 +6,7 @@ import { useId, useMemo, useState } from "react";
import { ArrowRight, ChevronRight, GitCompareArrows, ListChecks, Search, Tags } from "lucide-react";

import { ClinicalPathwayStrip } from "@/components/clinical-record-panels";
import { ModeHomeMain, ModeHomeTemplate, ModeHomeVerificationFooter } from "@/components/mode-home-template";
import { ModeHomeMain, ModeHomeTemplate } from "@/components/mode-home-template";
import {
SearchResultsHeaderBand,
type AppliedFilterChip,
Expand DownExpand Up@@ -120,15 +120,7 @@ function SpecifiersHome() {
<ChevronRight className="h-3.5 w-3.5" aria-hidden />
</Link>
}
footer={
<div className="grid gap-3">
<SpecifierPathwayStrip />
<ModeHomeVerificationFooter
label="Diagnostic decision support"
body="Review criteria and exclusions before documenting"
/>
</div>
}
footer={<SpecifierPathwayStrip />}
/>
</ModeHomeMain>
);
Expand Down
Loading
Loading