From faf57de61f16abb0681c3ce93a6ae098cf9e3162 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 10 Oct 2026 14:26:22 +0000 Subject: [PATCH 01/13] Remove on-screen example-data notices The owner asked that nothing on screen calls the data example or made-up. The example data switch, export block and blocked-action sheet stay, and example data is turned off and signed in to from Settings. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_013DB4o6bJhwnnpqTcrVdcC4 --- .../admin/admin-compliance-export-page.tsx | 7 -- .../admin/admin-compliance-page.tsx | 7 -- src/components/admin/admin-today-page.tsx | 7 -- .../clinical-dashboard/settings-dialog.tsx | 2 +- .../example-data/example-data-banner.tsx | 114 +++++------------- src/components/example-data/example-tag.tsx | 13 -- src/components/mode-kit/signed-out-sample.tsx | 6 +- .../my-day/my-day-calendar-page.tsx | 6 - src/components/my-day/my-day-hours-page.tsx | 3 - src/components/my-day/my-day-page.tsx | 12 +- .../my-day/my-day-rotations-card.tsx | 6 +- src/components/my-day/my-day-week-page.tsx | 3 - .../open-shifts/open-shifts-browse-page.tsx | 2 +- .../preview-role/work-roles-page.tsx | 2 +- src/components/roster/roster-month-page.tsx | 15 +-- src/components/roster/roster-shifts-page.tsx | 5 - src/components/roster/roster-today-page.tsx | 5 - .../teaching/assessments/assess-kit.tsx | 11 -- .../teaching/assessments/assess.css | 21 ---- .../teaching/teaching-depth-page.tsx | 7 +- .../teaching/teaching-exam-prep.tsx | 5 - src/components/teaching/teaching-logbook.tsx | 5 - .../teaching/teaching-presenting.tsx | 5 - .../teaching/teaching-supervision.tsx | 6 - src/components/teaching/teaching-term.tsx | 5 - src/components/teaching/teaching-whats-on.tsx | 3 - .../teaching/term-folder/term-folder-page.tsx | 4 - .../work-screens/admin/bookings-page.tsx | 2 +- .../work-screens/admin/documents-page.tsx | 4 +- .../work-screens/admin/pay-page.tsx | 6 +- .../work-screens/admin/tax-page.tsx | 11 +- .../work-screens/admin/workforce-page.tsx | 4 - .../work-screens/hospital/hospital-page.tsx | 2 - .../hospital/hospital-roles-card.tsx | 2 - .../hospital/hospital-short-staffed-page.tsx | 6 +- .../hospital/hospital-sick-page.tsx | 2 - .../hospital/hospital-starters-page.tsx | 2 - .../work-search/work-search-sheet.tsx | 23 +--- tests/admin-compliance-page.dom.test.tsx | 4 +- tests/admin-today-page.dom.test.tsx | 7 +- tests/example-data-ui.dom.test.tsx | 109 +++-------------- tests/my-day-hours.dom.test.tsx | 4 +- tests/my-day-page.dom.test.tsx | 6 +- tests/my-day-week.dom.test.tsx | 4 +- tests/open-shifts-browse-sample.dom.test.tsx | 3 +- tests/roster-month-page.dom.test.tsx | 15 +-- tests/teaching-term-folder.dom.test.tsx | 2 +- tests/teaching-whats-on.dom.test.tsx | 2 +- 48 files changed, 94 insertions(+), 413 deletions(-) delete mode 100644 src/components/example-data/example-tag.tsx diff --git a/src/components/admin/admin-compliance-export-page.tsx b/src/components/admin/admin-compliance-export-page.tsx index 27d2db715c..0b2d4c4d48 100644 --- a/src/components/admin/admin-compliance-export-page.tsx +++ b/src/components/admin/admin-compliance-export-page.tsx @@ -31,7 +31,6 @@ import { ADMIN_PAGE_HREFS } from "@/lib/admin/page-hrefs"; import { ADMIN_REQUIREMENTS_CATALOGUE } from "@/lib/admin/requirements"; import { buildXlsx, XLSX_MIME } from "@/lib/admin/xlsx-lite"; import { perthCalendarDate } from "@/lib/cme/cpd-year"; -import { useExampleData } from "@/lib/example-data/store"; import { useOnCallEntries } from "@/lib/on-call/entry-store"; import { guardExampleAction } from "@/lib/example-data/guards"; @@ -69,7 +68,6 @@ const RANGE_OPTIONS = [ export function AdminComplianceExportPage({ now: nowProp }: { now?: Date } = {}) { const state = useOnCallEntries(); // The example data banner already says these are example records; this notice is for the demo build. - const examplesBanner = useExampleData("admin").active; const mountedAt = useMemo(() => new Date(), []); const now = nowProp ?? mountedAt; const today = perthCalendarDate(now); @@ -155,11 +153,6 @@ export function AdminComplianceExportPage({ now: nowProp }: { now?: Date } = {}) ) : (
- {state.demoMode && !examplesBanner ? ( - - Example records. These dates are made up, and nothing here is your own. - - ) : null}
diff --git a/src/components/admin/admin-compliance-page.tsx b/src/components/admin/admin-compliance-page.tsx index 38fce4a6ee..e913f5cafc 100644 --- a/src/components/admin/admin-compliance-page.tsx +++ b/src/components/admin/admin-compliance-page.tsx @@ -36,7 +36,6 @@ import { ADMIN_PAGE_HREFS } from "@/lib/admin/page-hrefs"; import { formatDateEcho } from "@/lib/admin/renewal-dates"; import { ADMIN_REQUIREMENTS_CATALOGUE } from "@/lib/admin/requirements"; import { perthCalendarDate } from "@/lib/cme/cpd-year"; -import { useExampleData } from "@/lib/example-data/store"; import { useOnCallEntries } from "@/lib/on-call/entry-store"; const RECORD_DATES_HREF = `${ADMIN_PAGE_HREFS.renewals}?record=missing`; @@ -325,7 +324,6 @@ function FirstUse({ overview, canEdit }: { readonly overview: ComplianceOverview export function AdminCompliancePage({ now: nowProp }: { now?: Date } = {}) { const state = useOnCallEntries(); // The example data banner already says these are example records; this notice is for the demo build. - const examplesBanner = useExampleData("admin").active; const mountedAt = useMemo(() => new Date(), []); const now = nowProp ?? mountedAt; const today = perthCalendarDate(now); @@ -371,11 +369,6 @@ export function AdminCompliancePage({ now: nowProp }: { now?: Date } = {}) { ) : (
- {state.demoMode && !examplesBanner ? ( - - Example records. These dates are made up, and nothing here is your own. - - ) : null} {firstUse ? ( ) : ( diff --git a/src/components/admin/admin-today-page.tsx b/src/components/admin/admin-today-page.tsx index d1c03cf00c..248ee20135 100644 --- a/src/components/admin/admin-today-page.tsx +++ b/src/components/admin/admin-today-page.tsx @@ -35,7 +35,6 @@ import { selectRenewNext, selectRequirementsSummary, } from "@/lib/admin/today-selectors"; -import { useExampleData } from "@/lib/example-data/store"; import { cacheOnCallEntries, readCachedOnCallEntries, useOnCallEntries } from "@/lib/on-call/entry-store"; import type { OnCallEntry } from "@/lib/on-call/entry-model"; import { msUntilNextOnCallLocalDay } from "@/lib/on-call/local-date"; @@ -112,7 +111,6 @@ export function AdminTodayPage({ now: nowProp }: { now?: Date } = {}) { const { zone } = useWorkTimeZone(); const state = useOnCallEntries(); // The example data banner already says these are example records; this notice is for the demo build. - const examplesBanner = useExampleData("admin").active; const { isAuthenticated } = useAccountData(); const [tick, setTick] = useState(() => new Date()); const now = nowProp ?? tick; @@ -167,11 +165,6 @@ export function AdminTodayPage({ now: nowProp }: { now?: Date } = {}) {

{dateEcho}

- {state.demoMode && load === "ready" && !examplesBanner ? ( - - Example records. These dates are made up, and nothing here is your own. - - ) : null} {load === "loading" ? ( diff --git a/src/components/clinical-dashboard/settings-dialog.tsx b/src/components/clinical-dashboard/settings-dialog.tsx index 8f1354cdd9..9b0f735dac 100644 --- a/src/components/clinical-dashboard/settings-dialog.tsx +++ b/src/components/clinical-dashboard/settings-dialog.tsx @@ -1737,7 +1737,7 @@ function ExampleDataField() { icon={Layers} label="Example data" description={ - on ? exampleAreasLine(activeAreas.length) : "Made-up data in every work area, marked Example. Nothing is saved." + on ? exampleAreasLine(activeAreas.length) : "Made-up data in every work area. Nothing is saved." } checked={on} onChange={(next) => (next ? turnOn() : turnOff())} diff --git a/src/components/example-data/example-data-banner.tsx b/src/components/example-data/example-data-banner.tsx index 4499458251..f74e794de5 100644 --- a/src/components/example-data/example-data-banner.tsx +++ b/src/components/example-data/example-data-banner.tsx @@ -1,27 +1,14 @@ "use client"; -import dynamic from "next/dynamic"; import { useRouter } from "next/navigation"; import { useCallback, useEffect, useState } from "react"; -import { WorkButton, WorkTag, useWorkUndoToast } from "@/components/mode-kit/work"; +import { WorkButton, useWorkUndoToast } from "@/components/mode-kit/work"; import { Sheet } from "@/components/ui/sheet"; import { EXAMPLE_BLOCKED_EVENT, type ExampleBlockedAction } from "@/lib/example-data/guards"; -import { - restoreExampleData, - snapshotExampleData, - syncExampleCookie, - useAuthIfAvailable, - useExampleData, -} from "@/lib/example-data/store"; +import { restoreExampleData, snapshotExampleData, syncExampleCookie, useExampleData } from "@/lib/example-data/store"; import type { WorkAreaId } from "@/lib/work-frame/areas"; -// Loaded only when a signed-out visitor taps Sign in. -const AccountSetupDialog = dynamic( - () => import("@/components/clinical-dashboard/account-setup-dialog").then((m) => m.AccountSetupDialog), - { ssr: false }, -); - /** How the sheet words each blocked action: the title's past tense, and the body's verb. */ const BLOCKED_WORDS: Readonly> = { export: { done: "exported", verb: "export" }, @@ -36,30 +23,25 @@ function isBlockedAction(value: unknown): value is ExampleBlockedAction { } /** - * The slim strip under the work frame's band while an area shows example data - * (setup mockup, "Example data" frames). One mount, under the band: pages - * never draw their own. Turn off switches example data off everywhere and - * offers Undo. + * The example data host under the work frame's band. It draws no notice: the + * owner asked (10 Oct 2026) that nothing on screen calls the data example or + * made-up. Example data is switched off, and signed in to, from Settings. * - * It also hosts the sheet that explains a blocked export, share, save, send or + * It hosts the sheet that explains a blocked export, share, save, send or * copy: `guardExampleAction(active, kind)` fires `EXAMPLE_BLOCKED_EVENT`, and * this opens "Example data can't be exported" with a way to turn it off. All * of it is local, so it works offline. * - * Mounted always (it draws nothing while the area shows real data), it keeps + * Mounted always, it keeps * the server's example data cookie in step with what this browser shows, and * refreshes server-rendered areas (Teaching, CPD) when that changes. */ export function ExampleDataBanner({ area }: { readonly area: WorkAreaId }) { - const { active, activeAreas, turnOff } = useExampleData(area); + const { activeAreas, turnOff } = useExampleData(area); const router = useRouter(); const toast = useWorkUndoToast(); // A string key, so the effect runs when the set of areas changes, not on every new array. const activeKey = activeAreas.join("."); - const auth = useAuthIfAvailable(); - // The per-area sample notices carried the only sign-in prompt, so the banner offers it instead. - const signedOut = auth?.status === "signed_out" || auth?.status === "expired"; - const [signInOpen, setSignInOpen] = useState(false); const [blocked, setBlocked] = useState(null); // Kept after the sheet closes so its words do not change while it leaves. const [lastBlocked, setLastBlocked] = useState("export"); @@ -101,62 +83,28 @@ export function ExampleDataBanner({ area }: { readonly area: WorkAreaId }) { const words = BLOCKED_WORDS[blocked ?? lastBlocked]; return ( - <> - {active ? ( -
- Example -

- Made-up data to look around. Nothing is saved. -

- {signedOut ? ( - - ) : null} - -
- ) : null} - {signInOpen ? setSignInOpen(false)} /> : null} - -

- Turn it off to {words.verb} your own records. -

-
- - Turn off example data - - - Cancel - -
-
- + +

+ Turn it off to {words.verb} your own records. +

+
+ + Turn off example data + + + Cancel + +
+
); } diff --git a/src/components/example-data/example-tag.tsx b/src/components/example-data/example-tag.tsx deleted file mode 100644 index 42fde76839..0000000000 --- a/src/components/example-data/example-tag.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import { WorkTag } from "@/components/mode-kit/work"; - -/** - * The small amber "Example" tag for a card or hero that shows a made-up - * record. A word, never colour alone, and read out as "Example record". - */ -export function ExampleTag() { - return ( - - Example - - ); -} diff --git a/src/components/mode-kit/signed-out-sample.tsx b/src/components/mode-kit/signed-out-sample.tsx index a42a6abe28..f0a939dde0 100644 --- a/src/components/mode-kit/signed-out-sample.tsx +++ b/src/components/mode-kit/signed-out-sample.tsx @@ -4,7 +4,6 @@ import { LogIn } from "lucide-react"; import dynamic from "next/dynamic"; import { useState } from "react"; -import { DashTag } from "@/components/dashboard-kit/icon-chip"; import { dashSurface } from "@/components/dashboard-kit/recipes"; import { Button } from "@/components/ui/button"; import { cn } from "@/components/ui-primitives"; @@ -17,7 +16,7 @@ const AccountSetupDialog = dynamic( /** * The one signed-out sample box every personal mode shares (My Day set the - * pattern): a Sample tag, what signing in shows, and the Sign in button. The + * pattern): what signing in shows, and the Sign in button. The * page below it is the mode's own screen filled with invented data that is * built in the browser, reads nothing from the server and keeps nothing. */ @@ -53,9 +52,6 @@ export function SignedOutSampleNotice({ data-signed-out-sample="true" >
-

- Sample -

{title}

{children} diff --git a/src/components/my-day/my-day-calendar-page.tsx b/src/components/my-day/my-day-calendar-page.tsx index 92b65c400b..3b78347ad0 100644 --- a/src/components/my-day/my-day-calendar-page.tsx +++ b/src/components/my-day/my-day-calendar-page.tsx @@ -385,9 +385,6 @@ function CalendarBody({ label="Show the month or a list" testId="my-day-calendar-view" /> - {example ? ( - Example data: these items are made up. - ) : null} {failed.length > 0 ? (

{`Couldn't load: ${listNames(failed)}. Showing the rest.`} @@ -969,9 +966,6 @@ function CalendarExport({ {`Download ${monthTitle(month)}`}
- {example ? ( -

Example data can't be exported.

- ) : null}
diff --git a/src/components/my-day/my-day-hours-page.tsx b/src/components/my-day/my-day-hours-page.tsx index 97b3bd0a77..fd8daaa0fc 100644 --- a/src/components/my-day/my-day-hours-page.tsx +++ b/src/components/my-day/my-day-hours-page.tsx @@ -148,9 +148,6 @@ function MyDayHoursBody({ now }: { now: Date }) { return (
- {shifts.demoMode ? ( - Example data: these shifts are made up. - ) : null} {settingsFailed ? ( Your team's pay fortnight settings couldn't be loaded, so this fortnight isn't shown. diff --git a/src/components/my-day/my-day-page.tsx b/src/components/my-day/my-day-page.tsx index 19c8beab86..12a648d964 100644 --- a/src/components/my-day/my-day-page.tsx +++ b/src/components/my-day/my-day-page.tsx @@ -682,18 +682,14 @@ export function MyDayPage({ now: nowProp }: { now?: Date } = {}) { ) : null} {/* One notice at the top at most; the quieter context is one line of small print here. */} - {demoNote || notYet.length > 0 ? ( + {notYet.length > 0 ? (

- {demoNote ? Example data: made up to look around. : null} - {demoNote && notYet.length > 0 ? " " : null} - {notYet.length > 0 ? ( - - {`${listNames(notYet)} ${notYet.length > 1 || rosterUnavailable ? "aren't" : "isn't"} available yet.`} - - ) : null} + + {`${listNames(notYet)} ${notYet.length > 1 || rosterUnavailable ? "aren't" : "isn't"} available yet.`} +

) : null}
diff --git a/src/components/my-day/my-day-rotations-card.tsx b/src/components/my-day/my-day-rotations-card.tsx index b9f2222710..10159afe60 100644 --- a/src/components/my-day/my-day-rotations-card.tsx +++ b/src/components/my-day/my-day-rotations-card.tsx @@ -2,7 +2,6 @@ import { CalendarCheck, ListOrdered } from "lucide-react"; -import { ExampleTag } from "@/components/example-data/example-tag"; import { WorkCard, WorkIconRow, WorkTag } from "@/components/mode-kit/work"; import { useRotations } from "@/components/roster/rotations/use-rotations"; import { useWorkModeRouteVisible } from "@/components/work-mode-launch/work-mode-launch-provider"; @@ -34,10 +33,7 @@ export function MyDayRotationsCard({ now }: { readonly now: Date }) { sub={prompt.sub} href={rotationRoundHref(prompt.roundId)} end={ - - {prompt.example ? : null} - {rank ? "Open" : "New"} - + {rank ? "Open" : "New"} } /> diff --git a/src/components/my-day/my-day-week-page.tsx b/src/components/my-day/my-day-week-page.tsx index cccb721af6..9fe7fc0e45 100644 --- a/src/components/my-day/my-day-week-page.tsx +++ b/src/components/my-day/my-day-week-page.tsx @@ -179,9 +179,6 @@ function MyDayWeekBody({ now, ...viewProps }: { now: Date } & WeekViewProps) { const notices = ( <> - {items.demoMode || shifts.demoMode ? ( - Example data: these items are made up. - ) : null} {failed.length > 0 ? (
{`Couldn't load: ${listNames(failed)}. Showing the rest.`} diff --git a/src/components/open-shifts/open-shifts-browse-page.tsx b/src/components/open-shifts/open-shifts-browse-page.tsx index e2f2b38456..aaee136b22 100644 --- a/src/components/open-shifts/open-shifts-browse-page.tsx +++ b/src/components/open-shifts/open-shifts-browse-page.tsx @@ -129,7 +129,7 @@ export function OpenShiftsBrowsePage() {
) : null} diff --git a/src/components/preview-role/work-roles-page.tsx b/src/components/preview-role/work-roles-page.tsx index 8c24d924d5..8ce63ed00b 100644 --- a/src/components/preview-role/work-roles-page.tsx +++ b/src/components/preview-role/work-roles-page.tsx @@ -131,7 +131,7 @@ export function WorkRolesPage() {

{example.mode === "on" - ? "On. Every area shows example records, marked as examples, and nothing can be sent or exported." + ? "On. Every area shows example records, and nothing can be sent or exported." : "Off. Areas show only your own records."}

team.enabled); const oneTeamId = enabledTeams.length === 1 ? enabledTeams[0]!.serviceId : null; @@ -337,9 +335,6 @@ export function RosterMonthPage({ now: pinnedNow }: { readonly now?: Date } = {} const notices = ( <> - {shifts.demoMode && !exampleBanner ? ( - Example only. Sign in to add your own shifts. - ) : null} {notice ? {notice} : null} {shifts.teamMessage ? {shifts.teamMessage} : null} @@ -602,11 +597,11 @@ export function RosterMonthPage({ now: pinnedNow }: { readonly now?: Date } = {} {comingUp()} -

- {shifts.sample - ? "Example shifts and team, all made up." - : "Your copy of the roster. Check official changes with your service."} -

+ {shifts.sample ? null : ( +

+ Your copy of the roster. Check official changes with your service. +

+ )}

WA public holidays, wa.gov.au, read 25 Sep 2026.{" "} diff --git a/src/components/roster/roster-shifts-page.tsx b/src/components/roster/roster-shifts-page.tsx index 5c156a2c4c..2091df5af2 100644 --- a/src/components/roster/roster-shifts-page.tsx +++ b/src/components/roster/roster-shifts-page.tsx @@ -23,7 +23,6 @@ import { InformationPageShell } from "@/components/information-page-shell"; import { ModeGroupedList, ModeRow } from "@/components/mode-kit/grouped-list"; import { ModeModuleSkeleton } from "@/components/mode-kit/module-skeleton"; import { ModeNotice } from "@/components/mode-kit/notice"; -import { useRosterSignedOutSample } from "@/components/roster/roster-sample-context"; import { modeModuleSurface, modePressable } from "@/components/mode-kit/recipes"; import { ConfirmDialog } from "@/components/ui/confirm-dialog"; import { Sheet } from "@/components/ui/sheet"; @@ -351,7 +350,6 @@ export function RosterShiftsPage({ now: pinnedNow }: { readonly now?: Date } = { }; const shifts = useRosterShifts(teamRange); // The frame's example data banner already says these are examples. - const exampleBanner = useRosterSignedOutSample(); const teams = useRosterTeams(); const enabledTeams = (Array.isArray(teams.data?.teams) ? teams.data.teams : []).filter((team) => team.enabled); const oneTeamId = enabledTeams.length === 1 ? enabledTeams[0]!.serviceId : null; @@ -507,9 +505,6 @@ export function RosterShiftsPage({ now: pinnedNow }: { readonly now?: Date } = { const notices = ( <> - {shifts.demoMode && !exampleBanner ? ( - Example only. Sign in to add your own shifts. - ) : null} {notice ? {notice.text} : null} {shifts.teamMessage ? {shifts.teamMessage} : null} diff --git a/src/components/roster/roster-today-page.tsx b/src/components/roster/roster-today-page.tsx index 3439891033..b3fc763dd7 100644 --- a/src/components/roster/roster-today-page.tsx +++ b/src/components/roster/roster-today-page.tsx @@ -25,7 +25,6 @@ import { ModeActionButton } from "@/components/mode-kit/action-button"; import { ModeModuleSkeleton } from "@/components/mode-kit/module-skeleton"; import { useModeBandHeading, WithoutModeBand } from "@/components/mode-band/mode-band"; import { ModeNotice } from "@/components/mode-kit/notice"; -import { useRosterSignedOutSample } from "@/components/roster/roster-sample-context"; import { WorkHero, WorkRing } from "@/components/mode-kit/work"; import { TodayShell } from "@/components/mode-kit/today/today-shell"; import { modeDot } from "@/components/mode-kit/recipes"; @@ -391,7 +390,6 @@ export function RosterTodayPage({ now: pinnedNow }: { readonly now?: Date } = {} const now = useRosterNow(pinnedNow); const shifts = useRosterShifts(); // The frame's example data banner already says these are examples. - const exampleBanner = useRosterSignedOutSample(); const teams = useRosterTeams(); const hasTeam = (Array.isArray(teams.data?.teams) ? teams.data.teams : []).some((team) => team.enabled); const links = useRosterLinks(); @@ -668,9 +666,6 @@ export function RosterTodayPage({ now: pinnedNow }: { readonly now?: Date } = {} status={ <> {header} - {ready && shifts.demoMode && !exampleBanner ? ( - Example only. Sign in to add your own shifts. - ) : null} {ready && saved ? {saved} : null} {ready && refreshWarning ? ( diff --git a/src/components/teaching/assessments/assess-kit.tsx b/src/components/teaching/assessments/assess-kit.tsx index ea2e91513c..6fe3f78558 100644 --- a/src/components/teaching/assessments/assess-kit.tsx +++ b/src/components/teaching/assessments/assess-kit.tsx @@ -9,7 +9,6 @@ import { ChevronRight, Info, Phone, - ShieldCheck, TriangleAlert, X, type LucideIcon, @@ -125,16 +124,6 @@ export const closeIcon = X; /* ---------------------------------------------------------- small pieces */ -/** The calm line that says these are made-up records. */ -export function AssessSample({ children, testId }: { readonly children: ReactNode; readonly testId?: string }) { - return ( -

-

- ); -} - export type SegOption = { readonly value: T; readonly label: string }; /** A two or three way switch drawn as the mockup's flat segmented control. */ diff --git a/src/components/teaching/assessments/assess.css b/src/components/teaching/assessments/assess.css index d0477404a5..0821780488 100644 --- a/src/components/teaching/assessments/assess.css +++ b/src/components/teaching/assessments/assess.css @@ -23,27 +23,6 @@ --assess-leading-1-45: 1.45; } -/* -------------------------------------------------------- sample line */ -.assess-sample { - display: flex; - min-width: 0; - align-items: center; - gap: calc(var(--spacing) * 2); - padding: calc(var(--spacing) * 2) calc(var(--spacing) * 3); - border-radius: var(--radius-lg); - background: var(--work-wash); - font-size: 0.71875rem; - font-weight: 600; - line-height: var(--assess-leading-1-35); - color: var(--work-ink-muted); -} -.assess-sample > svg { - width: 0.875rem; - height: 0.875rem; - flex: none; - color: var(--mode-identity); -} - /* ---------------------------------------------- segmented control (seg) */ .assess-seg-control { display: flex; diff --git a/src/components/teaching/teaching-depth-page.tsx b/src/components/teaching/teaching-depth-page.tsx index 91e2a77bac..c118f5ff8a 100644 --- a/src/components/teaching/teaching-depth-page.tsx +++ b/src/components/teaching/teaching-depth-page.tsx @@ -3,13 +3,12 @@ import type { ComponentType, ReactNode } from "react"; import { InformationPageShell } from "@/components/information-page-shell"; import { ModeModuleSkeleton } from "@/components/mode-kit/module-skeleton"; -import { T5Note, T5Page } from "@/components/teaching/t5-kit"; +import { T5Page } from "@/components/teaching/t5-kit"; import { TeachingSignInNotice } from "@/components/teaching/teaching-sign-in"; import { TeachingStateNotice } from "@/components/teaching/teaching-states"; import type { TeachingResource } from "@/components/teaching/use-teaching-resource"; import { useTeachingDemoMode } from "@/components/teaching/use-teaching-sample"; import { useAuthSession } from "@/lib/supabase/client"; -import { useExampleData } from "@/lib/example-data/store"; /** * A depth page's submit, held at the bottom of the screen inside the page's own flow (not fixed chrome), @@ -45,7 +44,6 @@ export function TeachingDepthPage({ children: ReactNode; }) { // The shared example banner already says the records are made up, so this note shows only without it. - const { active: exampleShown } = useExampleData("teach"); let body = children; if (!demoMode && resource.status === "signed-out") body = ; else if (!demoMode && ["offline", "error", "setup"].includes(resource.status)) @@ -57,9 +55,6 @@ export function TeachingDepthPage({

{title}

- {demoMode && !exampleShown ? ( - Example data. Changes stay on this page and are not saved. - ) : null} {body}
diff --git a/src/components/teaching/teaching-exam-prep.tsx b/src/components/teaching/teaching-exam-prep.tsx index 239cfd3f70..d4f442cd74 100644 --- a/src/components/teaching/teaching-exam-prep.tsx +++ b/src/components/teaching/teaching-exam-prep.tsx @@ -52,7 +52,6 @@ import { type ExamPrepState, type HeatCell, } from "@/lib/teaching/term-tracker"; -import { useExampleData } from "@/lib/example-data/store"; type Update = (change: (current: ExamPrepState) => ExamPrepState) => void; @@ -503,7 +502,6 @@ function useExamCollection(today: string | null) { function TeachingExamPrepContent({ demoMode }: { demoMode: boolean }) { // The shared example banner already says the records are made up, so the demo note shows only without it. - const { active: exampleShown } = useExampleData("teach"); const now = useTeachingNow(); const today = now ? perthDateKey(now) : null; const sample = useMemo(() => (demoMode && today ? sampleExamPrep(today) : null), [demoMode, today]); @@ -584,9 +582,6 @@ function TeachingExamPrepContent({ demoMode }: { demoMode: boolean }) {

My exam prep

- {demoMode && !exampleShown ? ( - Example data. Changes stay on this page and are not saved. - ) : null} {body}
diff --git a/src/components/teaching/teaching-logbook.tsx b/src/components/teaching/teaching-logbook.tsx index ccdfe3d1a2..811b48b68e 100644 --- a/src/components/teaching/teaching-logbook.tsx +++ b/src/components/teaching/teaching-logbook.tsx @@ -269,8 +269,6 @@ function TeachingLogbookContent({ demoMode }: { demoMode: boolean }) { const now = useTeachingNow(); // Example records never leave the app: the CSV link becomes a button that explains why. const { active: example } = useExampleData("teach"); - // The shared example banner already says the records are made up, so the demo note shows only without it. - const exampleShown = example; const today = now ? perthDateKey(now) : null; const resource = useTeachingResource<{ attendance: LogbookRow[] }>(demoMode ? null : "/api/teaching?view=logbook"); const feedback = useTeachingResource<{ sessions: SessionRef[] }>( @@ -461,9 +459,6 @@ function TeachingLogbookContent({ demoMode }: { demoMode: boolean }) {

Logbook

- {demoMode && !exampleShown ? ( - Example data. Changes stay on this page and are not saved. - ) : null} {termRowEl} {body}
diff --git a/src/components/teaching/teaching-presenting.tsx b/src/components/teaching/teaching-presenting.tsx index 061777fd9f..e613613e4b 100644 --- a/src/components/teaching/teaching-presenting.tsx +++ b/src/components/teaching/teaching-presenting.tsx @@ -61,7 +61,6 @@ import { type SupervisionPairingView, type TeachRead, } from "@/lib/teaching/depth-model"; -import { useExampleData } from "@/lib/example-data/store"; /** How many later talks show before "All talks" opens the rest. */ const AFTER_SHOWN = 3; @@ -91,7 +90,6 @@ export function TeachingPresenting({ demoMode, talkId = null }: { demoMode: bool */ function PresentingPage({ demoMode, talkId = null }: { demoMode: boolean; talkId?: string | null }) { // The shared example banner already says the records are made up, so the demo note shows only without it. - const { active: exampleShown } = useExampleData("teach"); const [selectedId, setSelectedId] = useState(talkId); const [allTalks, setAllTalks] = useState(false); const now = useTeachingNow(); @@ -123,9 +121,6 @@ function PresentingPage({ demoMode, talkId = null }: { demoMode: boolean; talkId const shown = allTalks ? after : after.slice(0, AFTER_SHOWN); body = ( <> - {demoMode && !exampleShown ? ( - Example data. Changes stay on this page and are not saved. - ) : null} {next ? ( ( @@ -795,9 +792,6 @@ function SupervisionPage({ demoMode }: { demoMode: boolean }) { return ( - {demoMode && !exampleShown ? ( - Example data. Changes stay on this page and are not saved. - ) : null} {body} {sender.busy ? (

diff --git a/src/components/teaching/teaching-term.tsx b/src/components/teaching/teaching-term.tsx index 57c9cdb2a6..3b7eb06d69 100644 --- a/src/components/teaching/teaching-term.tsx +++ b/src/components/teaching/teaching-term.tsx @@ -57,7 +57,6 @@ import { type TermRecord, type TermTrackerState, } from "@/lib/teaching/term-tracker"; -import { useExampleData } from "@/lib/example-data/store"; type Update = (change: (current: TermTrackerState) => TermTrackerState) => void; @@ -678,7 +677,6 @@ function Meeting({ term, today, update }: { term: TermRecord; today: string; upd function TeachingTermContent({ demoMode }: { demoMode: boolean }) { // The shared example banner already says the records are made up, so the demo note shows only without it. - const { active: exampleShown } = useExampleData("teach"); const now = useTeachingNow(); const today = now ? perthDateKey(now) : null; const sample = useMemo(() => (demoMode && today ? sampleTermTracker(today) : null), [demoMode, today]); @@ -744,9 +742,6 @@ function TeachingTermContent({ demoMode }: { demoMode: boolean }) {

This term

- {demoMode && !exampleShown ? ( - Example data. Changes stay on this page and are not saved. - ) : null} {body}
diff --git a/src/components/teaching/teaching-whats-on.tsx b/src/components/teaching/teaching-whats-on.tsx index f379843c27..2b69644b56 100644 --- a/src/components/teaching/teaching-whats-on.tsx +++ b/src/components/teaching/teaching-whats-on.tsx @@ -127,9 +127,6 @@ export function TeachingWhatsOn({

{whatsOnHeading(read.data.healthServices)}

- {demoMode ? ( - Example · made-up people - ) : null}
{live.length > 0 ? (
diff --git a/src/components/teaching/term-folder/term-folder-page.tsx b/src/components/teaching/term-folder/term-folder-page.tsx index 791eaa27c0..981e59b397 100644 --- a/src/components/teaching/term-folder/term-folder-page.tsx +++ b/src/components/teaching/term-folder/term-folder-page.tsx @@ -404,7 +404,6 @@ function NoTerm() { function TermFolderContent({ demoMode, termId }: { demoMode: boolean; termId: string | null }) { const view = useTermFolder(demoMode, termId); // The shared example banner already says the records are made up, so this note shows only without it. - const { active: exampleShown } = useExampleData("teach"); let body; if (view.kind === "signed-out") body = ; else if (view.kind === "loading") body = ; @@ -426,9 +425,6 @@ function TermFolderContent({ demoMode, termId }: { demoMode: boolean; termId: st
) : null} diff --git a/src/components/work-search/use-work-search-records.ts b/src/components/work-search/use-work-search-records.ts index 367de07b58..42049ceb29 100644 --- a/src/components/work-search/use-work-search-records.ts +++ b/src/components/work-search/use-work-search-records.ts @@ -272,11 +272,12 @@ export function useWorkSearchRecords(now: number): WorkSearchRecords { }, [signedOut, exampleOn, examplesSignedIn, sample, now]); const onCallStatus = adminLoadState(onCall); - // Search lists only real entries; example entries stay confined to their clearly labelled area screens. + // On Call and Admin: the entry store already swaps in the switch's examples where those screens show them + // (`onCall.sample`), so search lists exactly what On Call lists. Otherwise only real entries. const liveEntries = useMemo( () => enabled && onCallStatus === "ready" - ? entryItems(onCall.sample ? withoutExampleRecords(onCall.entries) : withoutExampleRecords(onCall.entries)) + ? entryItems(onCall.sample ? onCall.entries : withoutExampleRecords(onCall.entries)) : [], [enabled, onCallStatus, onCall.entries, onCall.sample], ); @@ -363,13 +364,7 @@ export function useWorkSearchRecords(now: number): WorkSearchRecords { const cme = area("cme"); const anySample = Boolean(roster.sample || teaching.sample || cme.sample || onCall.demoMode); return { - // Example-area records are shown on their area pages, but never presented as the reader's commitments here. - items: [ - ...(roster.sample ? [] : roster.items), - ...(teaching.sample ? [] : teaching.items), - ...(cme.sample ? [] : cme.items), - ...numberItems, - ], + items: [...roster.items, ...teaching.items, ...cme.items, ...numberItems], entries: liveEntries, areas: [ { area: "roster", status: roster.status, sample: roster.sample }, @@ -379,7 +374,7 @@ export function useWorkSearchRecords(now: number): WorkSearchRecords { { area: "on-call", status: entryStatus, sample: onCall.demoMode }, ], // CPD's built-in answer reads the example year while CPD shows it. - cpd: showsExamples.cme ? null : (current?.cpd ?? null), + cpd: showsExamples.cme ? (sample?.cpd ?? null) : (current?.cpd ?? null), pages, sample: false, anySample, From 8ed3a76a8cd588b72f7926f09a85156591c7fbaf Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 11 Oct 2026 01:27:09 +0000 Subject: [PATCH 13/13] Formulation browser test: expect 11 domain filters while Cultural is held PR 3412 held all five cultural records, so the Cultural domain filter is no longer offered and the phone journey counts 11 domain buttons, not 12. Main's push CI does not run this browser shard, so the stale count first showed up on this PR. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_013DB4o6bJhwnnpqTcrVdcC4 --- tests/ui-formulation.spec.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/ui-formulation.spec.ts b/tests/ui-formulation.spec.ts index 9c6f0916ca..d68b79edb2 100644 --- a/tests/ui-formulation.spec.ts +++ b/tests/ui-formulation.spec.ts @@ -133,11 +133,11 @@ test("keeps mobile search, domain filtering, record actions, and universal chrom const domainGroup = page.getByRole("group", { name: "Domain" }); await expect(domainGroup).toBeVisible(); await expect(domainGroup.getByRole("radio")).toHaveCount(0); - // Derived from what the library carries, not from what is declared. All 12 - // now qualify: the contextual concepts added the Biological, Social and - // Cultural records that no mechanism carried, so those three stopped being - // permanently-empty options and became reachable ones. - await expect(domainGroup.getByRole("button")).toHaveCount(12); + // Derived from what the library carries, not from what is declared. 11 of + // the 12 qualify: the contextual concepts added the Biological and Social + // records that no mechanism carried, and Cultural is not offered while all + // its records are held for Aboriginal governance review (#3412, #R8HED2). + await expect(domainGroup.getByRole("button")).toHaveCount(11); const affect = domainGroup.getByRole("button", { name: /^Affect/ }); await expect(affect).toHaveAttribute("aria-pressed", "false"); await affect.click();