diff --git a/src/app/work-mode.css b/src/app/work-mode.css index 66d1df657c..6fbad8c776 100644 --- a/src/app/work-mode.css +++ b/src/app/work-mode.css @@ -658,7 +658,8 @@ html:not([data-mode-band]) [data-testid="chrome-safe-area-top"][data-work-band] } } -/* Round glass buttons: a 48px tap, a 44px glass circle. */ +/* Round glass buttons: a 48px glass circle, the same size as the clinical + header's round buttons (Josh, 10 Oct 2026). */ .universal-header[data-work-frame] .universal-header-icon-control { position: relative; isolation: isolate; @@ -671,7 +672,7 @@ html:not([data-mode-band]) [data-testid="chrome-safe-area-top"][data-work-band] .universal-header[data-work-frame] .universal-header-icon-control::before { content: ""; position: absolute; - inset: 2px; + inset: 0; z-index: var(--work-z-under); border-radius: var(--radius-pill); background: var(--work-glass-fill); @@ -756,22 +757,23 @@ html:not([data-mode-band]) [data-testid="chrome-safe-area-top"][data-work-band] outline-offset: 2px; } -/* The mode pill: glass, a flat mode-colour badge, page over area. */ +/* The mode pill: glass, a flat mode-colour badge, page over area. The same + 48px height as the clinical pill (Josh, 10 Oct 2026), and like it the pill + hugs its name with the chevron right after it, leaving no empty space + (Josh, 10 Oct 2026). A long name grows the pill up to its limit. */ .universal-header[data-work-frame] .universal-header-mode-button { position: relative; isolation: isolate; width: auto; min-width: 0; - /* Room for the longest area name ("Assessments") beside two round - buttons on a 390px phone, without truncating it, and for a short one - ("Roster") at 320px now the pill names the area only. Never narrower than - a tap, so at large text sizes the badge still shows when the name cannot. */ + /* Never narrower than a tap, so at large text sizes the badge still shows + when the name cannot. */ max-width: max(var(--spacing-tap, 3rem), min(15rem, calc(100vw - 11rem))); /* The name's track sizes to the name itself, so a name that fits is never cut short by rounding; it shortens only once the pill reaches its limit. */ grid-template-columns: auto minmax(0, max-content) auto; - gap: calc(var(--spacing) * 1.75); - padding: 0 calc(var(--spacing) * 2) 0 calc(var(--spacing) * 1.5); + gap: calc(var(--spacing) * 2); + padding: 0 calc(var(--spacing) * 2.5); border-color: transparent; background: transparent; box-shadow: none; @@ -779,14 +781,16 @@ html:not([data-mode-band]) [data-testid="chrome-safe-area-top"][data-work-band] @media (min-width: 640px) { .universal-header[data-work-frame] .universal-header-mode-button { + width: auto; max-width: 18rem; + padding-right: calc(var(--spacing) * 3); } } .universal-header[data-work-frame] .universal-header-mode-button::before { content: ""; position: absolute; - inset: 0.25rem 0; + inset: 0; z-index: var(--work-z-under); border-radius: var(--radius-pill); background: var(--work-glass-fill); @@ -860,6 +864,8 @@ html:not([data-mode-band]) [data-testid="chrome-safe-area-top"][data-work-band] .universal-header[data-work-frame] .universal-header-mode-button { grid-template-columns: auto minmax(0, 1fr); gap: calc(var(--spacing) * 0.5); + width: auto; + min-width: 0; max-width: 100%; height: auto; min-height: 48px; diff --git a/src/components/admin/admin-compliance-export-page.tsx b/src/components/admin/admin-compliance-export-page.tsx index 27d2db715c..4c972fd895 100644 --- a/src/components/admin/admin-compliance-export-page.tsx +++ b/src/components/admin/admin-compliance-export-page.tsx @@ -9,7 +9,6 @@ import { focusRing } from "@/components/card-recipes"; import { AccountSetupDialog } from "@/components/clinical-dashboard/account-setup-dialog"; import { InformationPageBreadcrumbs } from "@/components/information-page-shell"; import { PageTitleUnderBand, useModeBandHeading } from "@/components/mode-band/mode-band"; -import { ModeNotice } from "@/components/mode-kit/notice"; import { WorkButton, WorkChip, WorkDock, WorkIconCircle, WorkSectionLabel } from "@/components/mode-kit/work"; import { WorkStateNotice } from "@/components/mode-kit/work-state"; import { announce } from "@/components/ui/live-announcer"; @@ -31,7 +30,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"; @@ -68,8 +66,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,12 +151,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..2d4c46f4fc 100644 --- a/src/components/admin/admin-compliance-page.tsx +++ b/src/components/admin/admin-compliance-page.tsx @@ -13,7 +13,6 @@ import { } from "@/components/admin/admin-status-tag"; import { AccountSetupDialog } from "@/components/clinical-dashboard/account-setup-dialog"; import { PageTitleUnderBand, useModeBandHeading } from "@/components/mode-band/mode-band"; -import { ModeNotice } from "@/components/mode-kit/notice"; import { WorkButton, WorkCard, WorkChip, WorkDock, WorkEmpty, WorkIconCircle } from "@/components/mode-kit/work"; import { WorkStateNotice } from "@/components/mode-kit/work-state"; import { @@ -36,7 +35,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`; @@ -324,8 +322,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 +367,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..f1033eb8fb 100644 --- a/src/components/admin/admin-today-page.tsx +++ b/src/components/admin/admin-today-page.tsx @@ -18,7 +18,6 @@ import { TodayRenewNextCard } from "@/components/admin/today/today-renew-next-ca import { TodayOvertimeRow, TodayRequirementsModule } from "@/components/admin/today/today-requirements-module"; import { TodayStarred } from "@/components/admin/today/today-starred"; import { PageTitleUnderBand, useModeBandHeading, useModeBandShown } from "@/components/mode-band/mode-band"; -import { ModeNotice } from "@/components/mode-kit/notice"; import { todayStateCopy } from "@/components/mode-kit/today/today-copy"; import { WorkButton, WorkCard, WorkDock, WorkIconCircle } from "@/components/mode-kit/work"; import { WorkStateNotice } from "@/components/mode-kit/work-state"; @@ -35,7 +34,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"; @@ -111,8 +109,6 @@ function HelpRow() { 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 +163,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/master-search-header.tsx b/src/components/clinical-dashboard/master-search-header.tsx index 93a52387e4..1a5d618374 100644 --- a/src/components/clinical-dashboard/master-search-header.tsx +++ b/src/components/clinical-dashboard/master-search-header.tsx @@ -2666,7 +2666,7 @@ export function MasterSearchHeader(props: MasterSearchHeaderProps) { onClick={toggleModeMenu} onKeyDown={handleModeTriggerKeyDown} className={cn( - "universal-header-mode-button inline-grid h-12 w-[min(13rem,calc(100vw-9rem))] min-w-0 grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-2 rounded-full border border-[color:var(--border)] bg-[color:var(--surface)] px-2.5 text-left transition hover:border-[color:var(--border-strong)] hover:bg-[color:var(--surface-subtle)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[color:var(--focus)] sm:w-auto sm:min-w-[13rem] sm:pr-3", + "universal-header-mode-button inline-grid h-12 w-auto min-w-0 max-w-[calc(100vw-9rem)] grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-2 rounded-full border border-[color:var(--border)] bg-[color:var(--surface)] px-2.5 text-left transition hover:border-[color:var(--border-strong)] hover:bg-[color:var(--surface-subtle)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[color:var(--focus)] sm:pr-3", )} aria-haspopup="dialog" aria-expanded={modeMenuOpen} diff --git a/src/components/clinical-dashboard/settings-dialog.tsx b/src/components/clinical-dashboard/settings-dialog.tsx index 8f1354cdd9..18a1ee4902 100644 --- a/src/components/clinical-dashboard/settings-dialog.tsx +++ b/src/components/clinical-dashboard/settings-dialog.tsx @@ -1736,9 +1736,7 @@ function ExampleDataField() { (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..6c82a79406 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.`} @@ -469,7 +466,6 @@ function CalendarBody({ month={month} // The whole month, whatever areas are hidden on screen. items={all.filter((item) => item.start <= to && item.end >= from)} - example={example} updating={loading} onDownload={(events) => { if (loading || !guardExampleAction(example, "export")) return; @@ -930,13 +926,11 @@ function MonthList({ function CalendarExport({ month, items, - example, updating, onDownload, }: { readonly month: string; readonly items: readonly MainCalendarItem[]; - readonly example: boolean; /** True while the shown month is still loading, so a download can't miss part of it. */ readonly updating: boolean; readonly onDownload: (events: ReturnType) => void; @@ -969,9 +963,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..b63d4b7ca4 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"; @@ -33,12 +32,7 @@ export function MyDayRotationsCard({ now }: { readonly now: Date }) { title={prompt.title} sub={prompt.sub} href={rotationRoundHref(prompt.roundId)} - end={ - - {prompt.example ? : null} - {rank ? "Open" : "New"} - - } + end={{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/on-call/on-call-work.css b/src/components/on-call/on-call-work.css index 1c0620c913..3abb1286e5 100644 --- a/src/components/on-call/on-call-work.css +++ b/src/components/on-call/on-call-work.css @@ -33,10 +33,11 @@ box-shadow: none; } -/* The row's own controls (copy, edit) sit inside the row's band, with the - kit's right gutter. */ +/* The row's own controls (copy, edit) sit inside the row's band, as far from + the card's right edge as the row's words are from its left (Josh, 10 Oct + 2026: the phone numbers looked poorly padded with an 8px right gutter). */ [data-work-frame="call"] [data-on-call-list] > [data-on-call-entry-wrap] { - padding-right: calc(var(--spacing) * 2); + padding-right: calc(var(--spacing) * 4); } @media (forced-colors: active) { 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 +334,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 +596,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..4aaffe574c 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"; @@ -350,8 +349,6 @@ export function RosterShiftsPage({ now: pinnedNow }: { readonly now?: Date } = { to: maxDate(shownRange.to, addDaysToDate(today, ROSTER_AHEAD_DAYS)), }; 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 +504,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..10635a6438 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"; @@ -390,8 +389,6 @@ export function RosterTodayPage({ now: pinnedNow }: { readonly now?: Date } = {} const { zone } = useWorkTimeZone(); 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 +665,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..018156e875 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), @@ -44,8 +43,6 @@ export function TeachingDepthPage({ ready: boolean; 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 +54,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..428aa25d38 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; @@ -502,8 +501,6 @@ function useExamCollection(today: string | null) { /* ---------- the page ---------- */ 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 +581,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..2b5839dff3 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; @@ -90,8 +89,6 @@ export function TeachingPresenting({ demoMode, talkId = null }: { demoMode: bool * check can be done ahead for any booked talk; tapping a later talk does the same in place. */ 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 +120,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 +791,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..ded77196e3 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; @@ -677,8 +676,6 @@ function Meeting({ term, today, update }: { term: TermRecord; today: string; upd /* ---------- the page ---------- */ 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 +741,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..3af6d1fbde 100644 --- a/src/components/teaching/teaching-whats-on.tsx +++ b/src/components/teaching/teaching-whats-on.tsx @@ -40,11 +40,7 @@ import { import { cn } from "@/components/ui-primitives"; import { teachingErrorMessage, teachingPost } from "@/lib/teaching/client"; import type { HealthServiceCode } from "@/lib/teaching/model"; -import { - useSignedOutSampleRead, - useTeachingDemoMode, - useTeachingSignedOut, -} from "@/components/teaching/use-teaching-sample"; +import { useSignedOutSampleRead, useTeachingSignedOut } from "@/components/teaching/use-teaching-sample"; /* * What's on (spec §5a): the reader's health service's week, "On now" first @@ -59,14 +55,7 @@ import { */ type WhatsOnRead = { healthServices: HealthServiceCode[]; sessions: WhatsOnRowRead[] }; -export function TeachingWhatsOn({ - demoMode: serverDemoMode, - sampleData: serverSample, -}: { - demoMode: boolean; - sampleData?: WhatsOnRead; -}) { - const demoMode = useTeachingDemoMode(serverDemoMode); +export function TeachingWhatsOn({ sampleData: serverSample }: { demoMode: boolean; sampleData?: WhatsOnRead }) { const signedOut = useTeachingSignedOut(); const now = useTeachingNow(); const today = now ? perthDateKey(now) : null; @@ -127,9 +116,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..f0c4e2701f 100644 --- a/src/components/teaching/term-folder/term-folder-page.tsx +++ b/src/components/teaching/term-folder/term-folder-page.tsx @@ -403,8 +403,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 +424,6 @@ function TermFolderContent({ demoMode, termId }: { demoMode: boolean; termId: st
- setSignInOpen(false)} /> ); } diff --git a/tests/admin-compliance-page.dom.test.tsx b/tests/admin-compliance-page.dom.test.tsx index d9281f0264..dc7b15efac 100644 --- a/tests/admin-compliance-page.dom.test.tsx +++ b/tests/admin-compliance-page.dom.test.tsx @@ -142,7 +142,7 @@ describe("AdminCompliancePage", () => { expect(screen.getByTestId("admin-compliance-failed")).not.toHaveTextContent("offline"); }); - it("asks a signed-out reader to sign in and says the example records are made up in demo", () => { + it("asks a signed-out reader to sign in, and never labels demo records as made up", () => { storeState.signedOut = true; const { unmount } = render(); fireEvent.click(within(screen.getByTestId("admin-compliance-signed-out")).getByRole("button", { name: "Sign in" })); @@ -151,6 +151,6 @@ describe("AdminCompliancePage", () => { storeState.signedOut = false; storeState.demoMode = true; render(); - expect(screen.getByTestId("admin-compliance-demo-notice")).toBeTruthy(); + expect(screen.queryByTestId("admin-compliance-demo-notice")).toBeNull(); }); }); diff --git a/tests/admin-today-page.dom.test.tsx b/tests/admin-today-page.dom.test.tsx index 3a7b79c755..5b152c997a 100644 --- a/tests/admin-today-page.dom.test.tsx +++ b/tests/admin-today-page.dom.test.tsx @@ -77,12 +77,11 @@ beforeEach(() => { afterEach(cleanup); describe("AdminTodayPage", () => { - it("says when the dates on screen are the example corpus", () => { + it("draws no example notice over the example corpus (owner decision 10 Oct 2026)", () => { state.demoMode = true; render(); - expect(screen.getByTestId("admin-today-demo-notice")).toHaveTextContent( - "Example records. These dates are made up, and nothing here is your own.", - ); + expect(screen.queryByTestId("admin-today-demo-notice")).toBeNull(); + expect(screen.queryByText(/made up/)).toBeNull(); }); it("leads to Contract end, the Leave wallet and the starter pack from a Work and leave group", () => { diff --git a/tests/example-data-ui.dom.test.tsx b/tests/example-data-ui.dom.test.tsx index 062f252ce8..5cb2043408 100644 --- a/tests/example-data-ui.dom.test.tsx +++ b/tests/example-data-ui.dom.test.tsx @@ -1,8 +1,8 @@ /** @vitest-environment jsdom */ -// Example data UI: the banner under the band (only while the area shows -// examples, Turn off and Undo), the blocked-action sheet it hosts, the -// settings switch with its area count, and the Example tag. +// Example data UI: the host under the band (no visible notice, owner +// decision 10 Oct 2026), the blocked-action sheet it hosts with Turn off and +// Undo, and the settings switch with its area count. import { act, cleanup, fireEvent, render, screen, waitFor, within } from "@testing-library/react"; import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; @@ -23,7 +23,6 @@ vi.mock("next/navigation", () => ({ import { ExampleDataBanner } from "@/components/example-data/example-data-banner"; import { ExampleDataSwitch } from "@/components/example-data/example-data-switch"; -import { ExampleTag } from "@/components/example-data/example-tag"; import { ToastProvider } from "@/components/ui/toast"; import { guardExampleAction } from "@/lib/example-data/guards"; import { exampleAreasLine } from "@/lib/example-data/labels"; @@ -54,101 +53,34 @@ function renderBanner() { } describe("ExampleDataBanner", () => { - it("draws nothing while the area shows real data", () => { + it("draws no notice, whether the area shows example data or real data", () => { renderBanner(); expect(screen.queryByRole("region", { name: "Example data" })).toBeNull(); - }); + cleanup(); - it("shows while example data is on, and Turn off then Undo switch it off and back on", () => { act(() => setExampleDataOn(true)); renderBanner(); - const banner = screen.getByRole("region", { name: "Example data" }); - expect(within(banner).getByText("Made-up data to look around. Nothing is saved.")).toBeTruthy(); - expect(within(banner).getByText("Example")).toBeTruthy(); - - fireEvent.click(within(banner).getByRole("button", { name: "Turn off example data" })); expect(screen.queryByRole("region", { name: "Example data" })).toBeNull(); - expect(screen.getByText("Example data off")).toBeTruthy(); - expect(refresh).toHaveBeenCalled(); - - refresh.mockClear(); - fireEvent.click(screen.getByRole("button", { name: "Undo" })); - expect(screen.getByRole("region", { name: "Example data" })).toBeTruthy(); - expect(refresh).toHaveBeenCalled(); + expect(screen.queryByText(/Made-up data/)).toBeNull(); + expect(screen.queryByText("Example")).toBeNull(); }); - it("shows on Open shifts and Notifications, which draw Roster's and My Day's examples, but not on Manage team", () => { + it("offers no Sign in of its own, even to a signed-out visitor (Settings has it)", () => { act(() => setExampleDataOn(true)); - for (const area of ["open", "notify"] as const) { - render( - - - , - ); - expect(screen.getByRole("region", { name: "Example data" })).toBeTruthy(); - cleanup(); - } - render( - - - , - ); - expect(screen.queryByRole("region", { name: "Example data" })).toBeNull(); - cleanup(); - - // A real record added in Roster while the switch is on takes Open shifts back to real data too. - act(() => markRealRecordAdded("rost")); - render( - - - , - ); - expect(screen.queryByRole("region", { name: "Example data" })).toBeNull(); - }); - - it("returns auto mode to auto on Undo, not to an explicit on", () => { - // A brand new account sees examples in auto mode without ever choosing. - auth.session.user.created_at = new Date().toISOString(); - try { - renderBanner(); - expect(readExampleData().choice).toBeNull(); - const banner = screen.getByRole("region", { name: "Example data" }); - - fireEvent.click(within(banner).getByRole("button", { name: "Turn off example data" })); - expect(readExampleData().choice).toBe("off"); - expect(screen.queryByRole("region", { name: "Example data" })).toBeNull(); - - fireEvent.click(screen.getByRole("button", { name: "Undo" })); - expect(readExampleData().choice).toBeNull(); - expect(screen.getByRole("region", { name: "Example data" })).toBeTruthy(); - } finally { - auth.session.user.created_at = "2020-01-01T00:00:00Z"; - } - }); - - it("offers Sign in only to a signed-out visitor", () => { - act(() => setExampleDataOn(true)); - renderBanner(); - expect(screen.queryByTestId("example-data-banner-sign-in")).toBeNull(); - cleanup(); - auth.status = "signed_out"; try { renderBanner(); - const banner = screen.getByRole("region", { name: "Example data" }); - expect(within(banner).getByRole("button", { name: "Sign in" })).toBeTruthy(); - expect(within(banner).getByRole("button", { name: "Turn off example data" })).toBeTruthy(); + expect(screen.queryByRole("button", { name: "Sign in" })).toBeNull(); } finally { auth.status = "authenticated"; } }); - it("goes when a real record is added in its area", () => { - act(() => setExampleDataOn(true)); + it("refreshes server-rendered areas when example data switches", () => { renderBanner(); - expect(screen.getByRole("region", { name: "Example data" })).toBeTruthy(); - act(() => markRealRecordAdded("rost")); - expect(screen.queryByRole("region", { name: "Example data" })).toBeNull(); + refresh.mockClear(); + act(() => setExampleDataOn(true)); + expect(refresh).toHaveBeenCalled(); }); it("opens the blocked sheet with the action's words, and its button turns example data off", async () => { @@ -165,8 +97,12 @@ describe("ExampleDataBanner", () => { fireEvent.click(within(sheet).getByRole("button", { name: "Turn off example data" })); expect(screen.queryByRole("dialog")).toBeNull(); - expect(screen.queryByRole("region", { name: "Example data" })).toBeNull(); + expect(readExampleData().choice).toBe("off"); expect(screen.getByText("Example data off")).toBeTruthy(); + + // Undo puts back exactly what was there. + fireEvent.click(screen.getByRole("button", { name: "Undo" })); + expect(readExampleData().choice).toBe("on"); }); it("words every action, and Cancel or Escape close the sheet without turning anything off", () => { @@ -187,7 +123,7 @@ describe("ExampleDataBanner", () => { expect(within(sheet).getByText("Turn it off to copy your own records.")).toBeTruthy(); fireEvent.keyDown(document.activeElement ?? sheet, { key: "Escape" }); expect(screen.queryByRole("dialog")).toBeNull(); - expect(screen.getByRole("region", { name: "Example data" })).toBeTruthy(); + expect(readExampleData().choice).toBe("on"); }); it("lets the action through when the area shows real data", () => { @@ -231,10 +167,3 @@ describe("ExampleDataSwitch", () => { expect(screen.getByRole("list", { name: "Areas showing example data" })).toBeTruthy(); }); }); - -describe("ExampleTag", () => { - it("reads as an example record", () => { - render(); - expect(screen.getByRole("img", { name: "Example record" }).textContent).toBe("Example"); - }); -}); diff --git a/tests/my-day-hours.dom.test.tsx b/tests/my-day-hours.dom.test.tsx index 2056f8767b..5ff93380a5 100644 --- a/tests/my-day-hours.dom.test.tsx +++ b/tests/my-day-hours.dom.test.tsx @@ -158,10 +158,10 @@ describe("MyDayHoursPage", () => { expect(screen.queryByTestId("my-day-hours-facts")).toBeNull(); }); - it("shows example hours with a demo notice in demo mode", () => { + it("shows example hours with no example notice in demo mode", () => { setShifts({ sample: true, demoMode: true, shifts: [day("2026-10-05")] }); render(); - expect(screen.getByTestId("my-day-hours-demo-notice")).toBeTruthy(); + expect(screen.queryByTestId("my-day-hours-demo-notice")).toBeNull(); expect(screen.getByTestId("my-day-hours-facts")).toBeTruthy(); }); diff --git a/tests/my-day-page.dom.test.tsx b/tests/my-day-page.dom.test.tsx index 4e0a030e88..2b08df733a 100644 --- a/tests/my-day-page.dom.test.tsx +++ b/tests/my-day-page.dom.test.tsx @@ -305,11 +305,11 @@ describe("MyDayPage", () => { }); // Demo data is shown only in a local demo build with no sign-in ("unconfigured"). - it("says when the data is example data, in a local demo build", () => { + it("draws no example notice in a local demo build", () => { auth.status = "unconfigured"; setState({ demoMode: true, items: [item("a", "soon")] }); render(); - expect(screen.getByTestId("my-day-demo-notice").textContent).toBe("Example data: made up to look around."); + expect(screen.queryByTestId("my-day-demo-notice")).toBeNull(); expect(screen.getByTestId("my-day-item-a")).toBeTruthy(); }); @@ -325,7 +325,7 @@ describe("MyDayPage", () => { ), }); render(); - expect(screen.getByTestId("my-day-small-print").textContent).toBe("Example data: made up to look around."); + expect(screen.queryByTestId("my-day-small-print")).toBeNull(); expect(screen.queryByTestId("my-day-unavailable-notice")).toBeNull(); expect(screen.queryByTestId("my-day-unavailable-other-notice")).toBeNull(); }); diff --git a/tests/my-day-week.dom.test.tsx b/tests/my-day-week.dom.test.tsx index fb509ac3a4..555c40c6e8 100644 --- a/tests/my-day-week.dom.test.tsx +++ b/tests/my-day-week.dom.test.tsx @@ -354,7 +354,7 @@ describe("MyDayWeekPage", () => { expect(screen.getByTestId("my-day-week-sample-notice")).toBeTruthy(); }); - it("shows example shifts with a demo notice in demo mode", () => { + it("shows example shifts with no example notice in demo mode", () => { setShifts({ sample: true, demoMode: true, @@ -362,7 +362,7 @@ describe("MyDayWeekPage", () => { }); render(); expect(screen.getByTestId("my-day-week-shift-ex")).toBeTruthy(); - expect(screen.getByTestId("my-day-week-demo-notice")).toBeTruthy(); + expect(screen.queryByTestId("my-day-week-demo-notice")).toBeNull(); }); it("shows a skeleton while any source is loading, not empty days", () => { diff --git a/tests/open-shifts-browse-sample.dom.test.tsx b/tests/open-shifts-browse-sample.dom.test.tsx index 6b9b2b1403..8ab0b224e6 100644 --- a/tests/open-shifts-browse-sample.dom.test.tsx +++ b/tests/open-shifts-browse-sample.dom.test.tsx @@ -91,6 +91,7 @@ describe("Open shifts, signed-out preview", () => { render(); const context = screen.getByTestId("open-shifts-sample-context"); expect(within(context).getByRole("link", { name: "Back to My Day" }).getAttribute("href")).toBe("/my-day"); - expect(context.textContent).toContain("example roster as of Mon 5 Oct"); + expect(context.textContent).toContain("roster as of Mon 5 Oct"); + expect(context.textContent).not.toMatch(/example/i); }); }); diff --git a/tests/roster-month-page.dom.test.tsx b/tests/roster-month-page.dom.test.tsx index 8f52075712..4884e2f84b 100644 --- a/tests/roster-month-page.dom.test.tsx +++ b/tests/roster-month-page.dom.test.tsx @@ -44,7 +44,6 @@ vi.mock("@/components/clinical-dashboard/account-setup-dialog", () => ({ })); import { RosterMonthPage } from "@/components/roster/roster-month-page"; -import { RosterSignedOutSampleProvider } from "@/components/roster/roster-sample-context"; const NOW = new Date("2026-10-06T07:42:00+08:00"); @@ -348,24 +347,16 @@ describe("Roster Month tab", () => { expect(screen.getByRole("dialog", { name: "Continue to your workspace" })).toBeInTheDocument(); }); - it("says the sample is invented and offers no add button", () => { + it("never calls the sample made up, and offers no add button", () => { ready([teamDay], { sample: true }); render(); - expect(screen.getByText("Example shifts and team, all made up.")).toBeInTheDocument(); + expect(screen.queryByText(/made up/)).toBeNull(); expect(screen.queryByTestId("roster-month-add")).toBeNull(); }); - it("says a demo build's roster is an example once: its own note, or the frame's banner when that shows", () => { + it("draws no example note over a demo build's roster", () => { ready([teamDay], { demoMode: true }); render(); - expect(screen.getByText("Example only. Sign in to add your own shifts.")).toBeInTheDocument(); - cleanup(); - - render( - - - , - ); expect(screen.queryByText("Example only. Sign in to add your own shifts.")).toBeNull(); }); }); diff --git a/tests/teaching-term-folder.dom.test.tsx b/tests/teaching-term-folder.dom.test.tsx index 4eb4246da0..cec2dddcd7 100644 --- a/tests/teaching-term-folder.dom.test.tsx +++ b/tests/teaching-term-folder.dom.test.tsx @@ -41,7 +41,7 @@ describe("term evidence folder page", () => { const card = await screen.findByTestId("term-folder-card"); const meter = within(card).getByRole("img"); expect(meter.getAttribute("aria-label")).toMatch(/^7\sparts: /); - expect(screen.getByText(/Example data\. Nothing here is your own/)).toBeInTheDocument(); + expect(screen.queryByText(/Example data\. Nothing here is your own/)).toBeNull(); expect(screen.getByTestId("term-folder-not-kept")).toHaveTextContent("Assessment forms"); expect(screen.getAllByText(/Status and counts only|No assessment content/).length).toBeGreaterThan(0); // Work-mode redesign, owner request 6 Oct 2026: Export opens a sheet (choose parts, names off, gaps first). diff --git a/tests/teaching-whats-on.dom.test.tsx b/tests/teaching-whats-on.dom.test.tsx index ff2275652a..6f776ab944 100644 --- a/tests/teaching-whats-on.dom.test.tsx +++ b/tests/teaching-whats-on.dom.test.tsx @@ -185,7 +185,7 @@ describe("TeachingWhatsOn", () => { render(); const list = await waitFor(() => byId("teaching-whats-on-list")); expect(within(list).getByText("Demo case conference")).toBeInTheDocument(); - expect(screen.getByText("Example · made-up people")).toBeInTheDocument(); + expect(screen.queryByText(/made-up/)).toBeNull(); expect(fetchCalls(fetchMock, "/api/teaching/whats-on")).toBe(1); });