diff --git a/backend/ward-flow/engine.ts b/backend/ward-flow/engine.ts index 9e174df5bd..c1a7eab89c 100644 --- a/backend/ward-flow/engine.ts +++ b/backend/ward-flow/engine.ts @@ -401,23 +401,40 @@ function changedFacts(before: WardFlowState, after: WardFlowState, rawAfter?: Wa } export function seedWorld(at: Date): SharedWorld { + const dayZero = demoDayZero(at); return { version: 1, - state: serialise(seedWardFlowStateAt(0)), + // D-150: the seed is re-anchored onto the real Perth time, as the public demo's provider does + // (`ward-reanchor.ts`), so a new world's clock and its seeded times agree from the start. + state: serialise(seedWardFlowStateAt(minutesSince(dayZero, at) - NOW_ANCHOR)), // New worlds share the local demo's Perth calendar. Existing stored origins remain authoritative. - dayZero: demoDayZero(at).toISOString(), + dayZero: dayZero.toISOString(), startedAt: at.toISOString(), }; } -export function worldNow(world: SharedWorld, at: Date): number { - return ( - NOW_ANCHOR + - Math.max(0, Math.floor((at.getTime() - Date.parse(world.startedAt)) / 60_000)) + - world.state.clockOffsetMinutes +/** Whole minutes from `from` to `at`, never negative. */ +function minutesSince(from: Date | string, at: Date): number { + return Math.max( + 0, + Math.floor((at.getTime() - (typeof from === "string" ? Date.parse(from) : from.getTime())) / 60_000), ); } +/** + * The shared world's clock. D-150 (Josh, 11 Nov 2026): the signed-in site shows real Perth time, so + * an instant is the real minutes since the world's day zero (a Perth midnight). Before this the clock + * started at the scripted 10:42 (`NOW_ANCHOR`) whenever the world was made and ran fast or slow by + * that gap all day. The scripted clock stays on the public demo only. `clockOffsetMinutes` is still + * added, though the advance-clock control is hidden in shared mode. + */ +export function worldNow( + world: Pick & { state: Pick }, + at: Date, +): number { + return minutesSince(world.dayZero, at) + world.state.clockOffsetMinutes; +} + export function validWorld(value: unknown): value is SharedWorld { if (!value || typeof value !== "object") return false; const world = value as SharedWorld; diff --git a/backend/ward-flow/postgres.mjs b/backend/ward-flow/postgres.mjs index d78ddd64ba..aa3f7f691f 100644 --- a/backend/ward-flow/postgres.mjs +++ b/backend/ward-flow/postgres.mjs @@ -211,23 +211,23 @@ export function createWorkspaceStore( */ let executiveBasis = null; /** - * The workspace clock (start time and offset) of one committed row ("revision:updated-at"), so + * The workspace clock (day zero and offset, D-150) of one committed row ("revision:updated-at"), so * an unchanged poll does not read them out of the workspace JSON each time. Set by full reads * and by the poll's own fallback read; a row with a different stamp is never answered from it. - * @type {{ stamp: string, startedAt: string, clockOffset: number } | null} + * @type {{ stamp: string, dayZero: string, clockOffset: number } | null} */ let pollClock = null; - function rememberPollClock(stamp, startedAt, clockOffset) { + function rememberPollClock(stamp, dayZero, clockOffset) { if ( typeof stamp === "string" && - typeof startedAt === "string" && - Number.isFinite(Date.parse(startedAt)) && + typeof dayZero === "string" && + Number.isFinite(Date.parse(dayZero)) && Number.isFinite(clockOffset) ) - pollClock = { stamp, startedAt, clockOffset }; + pollClock = { stamp, dayZero, clockOffset }; } const pollNow = (at) => - engine.worldNow({ startedAt: pollClock?.startedAt, state: { clockOffsetMinutes: pollClock?.clockOffset } }, at); + engine.worldNow({ dayZero: pollClock?.dayZero, state: { clockOffsetMinutes: pollClock?.clockOffset } }, at); /** The executive desk's snapshot around one report, as a full read and a cached poll send it. */ const executiveReply = (view, context, accessUntil, revision, now, report) => ({ kind: "executive-aggregate", @@ -437,7 +437,7 @@ export function createWorkspaceStore( replyTicket = /** @type {object | undefined} */ (undefined), ) => { // A committed row's clock, so the next unchanged poll answers from memory (no migration). - rememberPollClock(stamp, row.payload?.startedAt, row.payload?.state?.clockOffsetMinutes); + rememberPollClock(stamp, row.payload?.dayZero, row.payload?.state?.clockOffsetMinutes); if (view?.access?.role === "executive") return executiveSnapshot(connection, row, at, view, stamp); const context = accessContext(at, view); const revision = Number(row.revision); @@ -1252,24 +1252,24 @@ export function createWorkspaceStore( return { notModified: true, dataMode: "prototype", revision: knownRevision, now: pollNow(at) }; } const { rows } = await pool.query( - "SELECT data_mode, revision, date_trunc('milliseconds', updated_at) AS updated_at, payload->>'startedAt' AS started_at, payload->'state'->'clockOffsetMinutes' AS clock_offset FROM ward_flow.workspaces WHERE id=$1 AND data_mode='prototype'", + "SELECT data_mode, revision, date_trunc('milliseconds', updated_at) AS updated_at, payload->>'dayZero' AS day_zero, payload->'state'->'clockOffsetMinutes' AS clock_offset FROM ward_flow.workspaces WHERE id=$1 AND data_mode='prototype'", [workspaceId], ); const row = rows[0]; if (row && row.updated_at instanceof Date) - rememberPollClock(`${Number(row.revision)}:${row.updated_at.getTime()}`, row.started_at, row.clock_offset); + rememberPollClock(`${Number(row.revision)}:${row.updated_at.getTime()}`, row.day_zero, row.clock_offset); if ( row && Number(row.revision) === knownRevision && - typeof row.started_at === "string" && - Number.isFinite(Date.parse(row.started_at)) && + typeof row.day_zero === "string" && + Number.isFinite(Date.parse(row.day_zero)) && Number.isFinite(row.clock_offset) ) return { notModified: true, dataMode: row.data_mode, revision: knownRevision, - now: engine.worldNow({ startedAt: row.started_at, state: { clockOffsetMinutes: row.clock_offset } }, at), + now: engine.worldNow({ dayZero: row.day_zero, state: { clockOffsetMinutes: row.clock_offset } }, at), }; return { notModified: false, snapshot: await read(actorId, view) }; }, diff --git a/backend/ward-flow/postgres.test.mjs b/backend/ward-flow/postgres.test.mjs index d94f99d453..b9792b4fd5 100644 --- a/backend/ward-flow/postgres.test.mjs +++ b/backend/ward-flow/postgres.test.mjs @@ -264,8 +264,10 @@ test("real PostgreSQL: shared commands, last-bed contention, retry, audit and re unit.id === unitId ? { ...unit, - empty: { ...unit.empty, value: 6, confirmedAt: 642 }, - allocatable: { ...unit.allocatable, value: 6, confirmedAt: 642 }, + // Confirmed at the world's own now: under D-150 the shared clock is real Perth time, + // so a fixed 10:42 is hours stale at this test's 18:00 Perth. + empty: { ...unit.empty, value: 6, confirmedAt: seed.now }, + allocatable: { ...unit.allocatable, value: 6, confirmedAt: seed.now }, allocatableLocked: 6, } : unit, @@ -338,7 +340,7 @@ test("real PostgreSQL: shared commands, last-bed contention, retry, audit and re const restored = await createWorkspaceStore(pool, { workspaceId, engine, clock: () => at }).read(actorB); assert.equal(restored.revision, 2); assert.equal(restored.payload.state.movements.find((row) => row.id === winner.movement).stage, "pulled"); - assert.equal(restored.payload.state.units.find((row) => row.id === unitId).allocatable.confirmedAt, 642); + assert.equal(restored.payload.state.units.find((row) => row.id === unitId).allocatable.confirmedAt, seed.now); }); await t.test("audit entries cannot be changed or removed", async () => { await assert.rejects( diff --git a/backend/ward-flow/security-headers.test.mjs b/backend/ward-flow/security-headers.test.mjs new file mode 100644 index 0000000000..92e5199c4e --- /dev/null +++ b/backend/ward-flow/security-headers.test.mjs @@ -0,0 +1,29 @@ +import assert from "node:assert/strict"; +import { request as httpRequest } from "node:http"; +import { test } from "node:test"; +import { listen } from "./server.mjs"; + +test("live audit item 17: every backend reply sends no referrer, offers no feature and refuses no-cors embedding", async () => { + const server = listen(async () => Response.json({ ok: true }), { port: 0, host: "127.0.0.1" }); + try { + await new Promise((resolve) => server.once("listening", resolve)); + const port = /** @type {import("node:net").AddressInfo} */ (server.address()).port; + for (const method of ["GET", "DELETE"]) { + const headers = await new Promise((resolve, reject) => { + const req = httpRequest({ host: "127.0.0.1", port, path: "/healthz", method }, (res) => { + res.resume(); + resolve(res.headers); + }); + req.on("error", reject); + req.end(); + }); + assert.equal(headers["referrer-policy"], "no-referrer", method); + assert.equal(headers["permissions-policy"], "camera=(), microphone=(), geolocation=(), payment=()", method); + assert.equal(headers["cross-origin-resource-policy"], "same-origin", method); + // The existing P174 pair is still there. + assert.equal(headers["content-security-policy"], "default-src 'none'; frame-ancestors 'none'", method); + } + } finally { + await new Promise((resolve) => server.close(resolve)); + } +}); diff --git a/backend/ward-flow/server.mjs b/backend/ward-flow/server.mjs index 781743b94e..69a415c3e4 100644 --- a/backend/ward-flow/server.mjs +++ b/backend/ward-flow/server.mjs @@ -18,11 +18,16 @@ const gzipAsync = promisify(gzip); const BODY_LIMIT = 1_048_576; /** * Audit P174: every backend reply is JSON, never a page, so it may not be framed or load anything, - * and browsers keep to HTTPS for a year. + * and browsers keep to HTTPS for a year. Live audit item 17 (hardening only): no referrer leaves a + * reply, no browser feature is offered, and no other site may embed a reply without CORS (the + * site's own CORS reads are unaffected, as CORP applies only to no-cors loads). */ export const BACKEND_SECURITY_HEADERS = Object.freeze({ "strict-transport-security": "max-age=31536000; includeSubDomains", "content-security-policy": "default-src 'none'; frame-ancestors 'none'", + "referrer-policy": "no-referrer", + "permissions-policy": "camera=(), microphone=(), geolocation=(), payment=()", + "cross-origin-resource-policy": "same-origin", }); /** Audit P177: the uptime monitor sends this header to see the database answer on `/healthz`. */ export const UPTIME_TOKEN_HEADER = "x-ward-flow-uptime-token"; diff --git a/backend/ward-flow/shared-http.mjs b/backend/ward-flow/shared-http.mjs index 60a40b6173..e103c7f127 100644 --- a/backend/ward-flow/shared-http.mjs +++ b/backend/ward-flow/shared-http.mjs @@ -53,6 +53,12 @@ const STEP_UP_PATHS = new Set([ const WORKING_AS = "x-ward-working-as"; /** "tv" when the desk is showing the bed meeting TV board, so the access log can say so (H-0731). */ const SCREEN = "x-ward-screen"; +/** + * Live audit item 21: the roles whose desk opens the bed meeting TV board (`ROLE_SCREENS` has + * "bed-meeting" for these only; `tests/ward-live-audit-hardening.test.ts` keeps them in step). Any + * other desk's "tv" header is logged as the list it really is. + */ +const TV_BOARD_ROLES = new Set(["coordinator", "bed_manager", "ward"]); /** Messages the pg pool and the workspace store use when the database, not the code, failed. */ const STORAGE_MESSAGES = /^(?:Connection terminated|timeout exceeded when trying to connect|Client has encountered a connection error|Cannot use a pool after calling end|Shared schema unavailable|Workspace data mode mismatch|Stored workspace is incompatible)/; @@ -486,7 +492,7 @@ export function createSharedHandler({ // unchanged poll sends none, so it is not logged, except on the TV board: a desk that moves // to the TV keeps showing the records it already holds, so the TV logs its own polls too // (the store logs at most once a window). A failed log write fails the read. - const tvScreen = request.headers.get(SCREEN) === "tv"; + const tvScreen = request.headers.get(SCREEN) === "tv" && TV_BOARD_ROLES.has(view.access.role); const logListRead = async () => { if (view.access.role !== "executive" && store.logList) await store.logList(view, tvScreen ? "tv" : "list"); }; diff --git a/backend/ward-flow/shared-http.test.mjs b/backend/ward-flow/shared-http.test.mjs index 35debd4f2b..aca9d95433 100644 --- a/backend/ward-flow/shared-http.test.mjs +++ b/backend/ward-flow/shared-http.test.mjs @@ -1072,6 +1072,35 @@ test("the server logs each full read of a desk's list or TV board, and the TV's assert.equal((await failing(request())).status, 503); }); +test("live audit item 21: a desk whose role cannot open the TV board is logged as its list", async () => { + const logged = []; + const edView = { ...wardView, access: { role: "ed", scope: { kind: "ed", edIds: ["ed-a"] } } }; + const { handler } = setup(other, "prototype", { + viewer: async () => edView, + logList: async (view, surface) => { + logged.push([view.access.role, surface]); + return true; + }, + }); + const tv = request(); + tv.headers.set("x-ward-screen", "tv"); + assert.equal((await handler(tv)).status, 200); + const { handler: ward } = setup(other, "prototype", { + viewer: async () => wardView, + logList: async (view, surface) => { + logged.push([view.access.role, surface]); + return true; + }, + }); + const wardTv = request(); + wardTv.headers.set("x-ward-screen", "tv"); + assert.equal((await ward(wardTv)).status, 200); + assert.deepEqual(logged, [ + ["ed", "list"], + ["ward", "tv"], + ]); +}); + test("a bootstrap coordinator past its end date has no role (H-0057)", async () => { const handler = createHandler({ config: { diff --git a/docs/FACTS.md b/docs/FACTS.md index 135225891f..e6cab02034 100644 --- a/docs/FACTS.md +++ b/docs/FACTS.md @@ -13,8 +13,8 @@ green. Quote a fact instead of restating it, and it updates itself when the sour | `migration-count` | 18 | Numbered database migrations | `backend/ward-flow/migrations/` | | `ward-route-count` | 61 | `page.tsx` routes under `/ward-flow` | `src/app/ward-flow/` | | `app-route-count` | 65 | Pages and route handlers: the Ward Flow routes plus sign-in and the `/mockups` digest | `src/app/ward-flow/, src/app/ward-flow-sign-in/, src/app/mockups/` | -| `latest-decision` | D-154 | Newest entry in the decision log | `docs/ward-flow/decisions.md` | -| `next-decision` | D-155 | Number to use for the next decision | `docs/ward-flow/decisions.md` | +| `latest-decision` | D-156 | Newest entry in the decision log | `docs/ward-flow/decisions.md` | +| `next-decision` | D-157 | Number to use for the next decision | `docs/ward-flow/decisions.md` | | `node-engine` | >=24.22.1 <25 | Supported Node.js range | `package.json` | | `backend-env-vars` | 33 names, [listed below](#backend-env-vars) | Environment variables the shared backend reads | `backend/ward-flow/*.mjs` | diff --git a/docs/script-budget-history/2026-11-11-pr1626-live-audit-fixes.md b/docs/script-budget-history/2026-11-11-pr1626-live-audit-fixes.md new file mode 100644 index 0000000000..6de5d36ac5 --- /dev/null +++ b/docs/script-budget-history/2026-11-11-pr1626-live-audit-fixes.md @@ -0,0 +1,33 @@ +# 11 Nov 2026, Live audit fixes (PR #1626) + +Changed on top of `main` at `0b657ad` (after #1606 and #1608 merged). Each raise is under 5 KB, within the per-screen allowance in HOW-WE-WORK section 6: + +- Home `/ward-flow`: 587.7 to 588.2 +- Movement `/ward-flow/movements/WF-001`: 618.7 to 619.2 +- ED site `/ward-flow/ed/arm-ed`: 678.1 to 681.5 + +Every other screen keeps `main`'s limit. + +Measured by hosted CI on head `4daa8a3` (job 130830721425), in KB: Home 587.9, Movement 618.9 and ED site 681.2. Each new limit is the measurement plus 0.3. `main` alone could not be built for comparison, so the whole overage counts against this PR. Before #1606 merged, this PR with `main` measured Home 585.1, Movement 617.2 and ED site 675.0 (job 130823967817), all inside the limits at the time. + +Why it changed: this PR adds the calm "Saving…" pill and its delayed warning, "Leave the demo" in the account and phone menus, the "Waiting to save" bed tile, the bed's closure History, the archive card's reason line and the Undo choices on the toast (D-148, D-149, D-151). Most of that is in the shared shell or the bed drawer, which the ED site page also loads. Merging #1606's ED referral flow on top grew the ED site page by a further 6.2 KB in the combined build, against 1.6 KB in #1606's own measurement. + +Trim tried: the toast's reason menu (`wf/toast-choices.tsx`) and the front-door holders were already moved out of the first load in this PR. No further trim was found without a measurement of `main` alone. The ED site raise is 3.4 KB over `main`'s limit, so any further growth there leaves 1.6 KB of the allowance. + +## After merging `main` at `02817bb` (#1632) + +`main` raised six of its own limits. This PR now keeps `main`'s value for every route and adds only its own raise over the old `main` at `0b657ad`, in KB: Home 588.3 to 588.8 (+0.5), Movement 619.0 to 619.5 (+0.5) and ED site 678.1 to 681.5 (+3.4). Every other route takes `main`'s limit unchanged. Hosted CI's measurement will show whether any can come down. + +Hosted CI on that merge (job 130851096719) measured, in KB: Referrals 594.5, Ward 625.9, Movement 619.6 and ED site 681.8, and `main` alone could not be built. Builds vary by a few tenths, so these four limits are now the measurement plus 0.5: Referrals 595.0 (+0.7 over `main`), Ward 626.4 (+1.0), Movement 620.1 (+1.1) and ED site 682.3 (+4.2), each within the 5 KB allowance. Home stays at 588.8 (+0.5) and every other route keeps `main`'s limit. + +## After the first-load trim (12 Nov 2026) + +The toast's fallback buttons and the ward bed drawer left the first load (the drawer was already +closed at first paint; its inner sheet was already lazy). Local production measurement after that +trim, in KB: Home 588.2, Referrals 594.3, Ward 623.6, Movement 619.4 and ED site 681.6. All nine +budgeted routes sit inside the limits already on this branch. Ward is 1.8 KB inside `main`'s 625.4. +The other limits can come down later (Home 588.8, Referrals 595.0, Movement 620.1, ED site 682.3). + +## After merging `main` at `0f2ce4d` (#1623) + +The merge with #1623 kept this PR's older values and so lowered four of `main`'s limits below what #1623 needed (Home, ED, Movement and Capacity), and hosted CI then failed Home (589.0 against 588.8) and Capacity (666.0 against 665.9). After the trim, hosted CI measured, in KB: Home 589.0, Referrals 593.5, ED 543.1, Ward 622.5, Movement 619.6, Capacity 666.0, ED site 678.1, Bed meeting 599.5 and Statistics 640.6, so every route but ED site fits `main`'s limits. This PR now takes `main`'s limit for every route and keeps one raise: ED site 678.1 to 678.6 (+0.5), because it measured exactly at `main`'s limit and builds vary by a few tenths. The earlier raises (Home, Referrals, Ward, Movement and ED site to 682.3) are no longer needed and are dropped. diff --git a/docs/ward-flow/OWNER-RULINGS.md b/docs/ward-flow/OWNER-RULINGS.md index b049f3bbb5..3de1aa1e96 100644 --- a/docs/ward-flow/OWNER-RULINGS.md +++ b/docs/ward-flow/OWNER-RULINGS.md @@ -9,7 +9,7 @@ Scanned `docs/ward-flow/decisions.md`, `docs/ward-flow/owner-*.md` and `docs/his One file matches `*owner*` but not `owner-*` and is deliberately excluded: `how-to-write-to-the-owner.md` — it is instructions for writing TO the owner, not a record of what he ruled. -**712 rulings/items extracted, across 43 of 44 files.** +**718 rulings/items extracted, across 43 of 44 files.** **0 file(s) UNPARSED** — no recognised ruling structure found; listed, not dropped. See below. **1 file(s) recorded as holding no ruling of their own**, each with its reason. See below. @@ -32,7 +32,7 @@ line, in the order discovered — confirm which instance you mean before citing --- -## ID index — 462 distinct IDs +## ID index — 468 distinct IDs So an ID like `D-9` or `O-17.1` can be looked up directly, without knowing which file it lives in. Bare numbered rulings (files that number "1., 2., 3. …" with no owner-issued letter code) are @@ -72,255 +72,261 @@ safe global key across 30 files. | `D-1` ⚠️ **3 occurrences in 3 files — not unique** | | | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-12-four-answers.md`:16 | D-1 · Legal forms: split the list in two | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-1x.md`:85 | D-1 — 🔴 The screen is called **Patient**, not "Patient Now" | -| ↳ | `decisions.md`:179 | D-1. Ward Flow is local only, with no linked repository (Replaced by D-27) | +| ↳ | `decisions.md`:185 | D-1. Ward Flow is local only, with no linked repository (Replaced by D-27) | | `D-2` ⚠️ **3 occurrences in 3 files — not unique** | | | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-12-four-answers.md`:57 | D-2 · Raise the three unbindable table thresholds | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-1x.md`:108 | D-2 — 🔴 Communication: BUILD IT. The system must be able to tell someone something. | -| ↳ | `decisions.md`:189 | D-2. Railway is disconnected | +| ↳ | `decisions.md`:195 | D-2. Railway is disconnected | | `D-3` ⚠️ **2 occurrences in 2 files — not unique** | | | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-1x.md`:215 | D-3 — 🔴 The 12px floor is ADOPTED. Screen by screen, not as a sweep. | -| ↳ | `decisions.md`:200 | D-3. The PsychSift and Database code is being retired from Ward Flow | +| ↳ | `decisions.md`:206 | D-3. The PsychSift and Database code is being retired from Ward Flow | | `D-3b` | `../history/archive/dated-notes/owner-decisions-2026-09-12-four-answers.md`:77 | D-3b · The data-conditional absence sweep is DEFERRED | | `D-4` ⚠️ **4 occurrences in 3 files — not unique** | | | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-12-four-answers.md`:97 | D-4 · The deliberate sub-12px exception stands if its reasoning is sound | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-1x.md`:263 | D-4 · WARD LEAD RULING, not the owner's — the Access record's false assurance | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-1x.md`:390 | D-4 ADDENDUM, 2026-09-11 — 🔴 the OTHER half of that sentence, found by Lane C after the fix | -| ↳ | `decisions.md`:208 | D-4. Synthetic patients only | +| ↳ | `decisions.md`:214 | D-4. Synthetic patients only | | `D-5` ⚠️ **4 occurrences in 3 files — not unique** | | | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-12-routing-and-nine-flags.md`:15 | D-5 · 🔴 A NEW STANDING RULE: PROTECTED-WORK DELETIONS COME TO WARD VERIFIER FIRST | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-1x.md`:340 | D-5 · WARD LEAD RULING, not the owner's — gender reaches BOTH bed gates or neither | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-1x.md`:431 | D-5 MEASUREMENT, 2026-09-11 — the wiring task handed back, and the arithmetic is starker than I expected | -| ↳ | `decisions.md`:216 | D-5. Parallel threads in separate worktrees, folded one at a time | +| ↳ | `decisions.md`:222 | D-5. Parallel threads in separate worktrees, folded one at a time | | `D-6` ⚠️ **3 occurrences in 3 files — not unique** | | | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-12-routing-and-nine-flags.md`:52 | D-6 · 🟢 THE `--t-0` COLLISION — amend the brief in the same change | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-1x.md`:472 | D-6 · WARD LEAD RULING — "Not recorded" and "Not yet recorded" are BOTH used, deliberately | -| ↳ | `decisions.md`:227 | D-6. Aboriginal cultural safety review deferred | +| ↳ | `decisions.md`:233 | D-6. Aboriginal cultural safety review deferred | | `D-7` ⚠️ **3 occurrences in 3 files — not unique** | | | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-12-routing-and-nine-flags.md`:72 | D-7 · 🟢 THE REMAINING SEVEN ARE FLAGGED TO WARD LEAD | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-1x.md`:499 | D-7 · WARD LEAD RULING — the Patient screen SHOWS gender, and the addition is logged as an addition | -| ↳ | `decisions.md`:235 | D-7. The first four milestones, in this order | +| ↳ | `decisions.md`:241 | D-7. The first four milestones, in this order | | `D-8` ⚠️ **3 occurrences in 3 files — not unique** | | | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-12-fold-and-authorisation.md`:9 | D-8 · 🔴 "FOLD INTO MAIN" ALWAYS MEANS THE LOCAL WARD FLOW LINE | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-1x.md`:545 | D-8 · WARD LEAD RULING — the announced marker says "invented NAMES", never "invented people" | -| ↳ | `decisions.md`:247 | D-8. Josh's standing rulings, numbered R1 to R16, for every session and tool | +| ↳ | `decisions.md`:253 | D-8. Josh's standing rulings, numbered R1 to R16, for every session and tool | | `D-9` ⚠️ **3 occurrences in 3 files — not unique** | | | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-12-fold-and-authorisation.md`:51 | D-9 · 🟢 THE MENTAL HEALTH ACT AUTHORISATION GATE IS OVERRIDABLE — with the owner's clinical reason | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-1x.md`:589 | D-9 · WARD LEAD RULING — the referral board's table MAY scroll sideways; the missing thing is the affordance | -| ↳ | `decisions.md`:279 | D-9. Josh's rulings of 25 September, 11:43 to 12:00 (R17 to R21) | +| ↳ | `decisions.md`:285 | D-9. Josh's rulings of 25 September, 11:43 to 12:00 (R17 to R21) | | `D-10` ⚠️ **3 occurrences in 3 files — not unique** | | | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-12-fold-and-authorisation.md`:91 | D-10 · ⏸️ THE SMALL-TEXT RAISE IS DEFERRED — with the triggers written down, because a deferral without one is a drop | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-1x.md`:618 | D-10 · WARD LEAD RULING — the overflow affordance is a SENTENCE first and a measured border second, not the standard's shade | -| ↳ | `decisions.md`:293 | D-10. Gate build type check (R22) | +| ↳ | `decisions.md`:299 | D-10. Gate build type check (R22) | | `D-11` ⚠️ **3 occurrences in 3 files — not unique** | | | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-12-fold-and-authorisation.md`:129 | D-11 · 🔴 TWO LEDGERS IS CORRECT AND INTENDED — WARD FLOW TASKS GO ON THE WARD FLOW LEDGER, AND THE MAIN PROJECT'S IS DISREGARDED FOR THIS PROJECT | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-1x.md`:685 | D-11 · A-1 — the half-written referral history WARNS, and is never stored | -| ↳ | `decisions.md`:302 | D-11. Rulings of 25 September, 12:41 (R23 to R25) | +| ↳ | `decisions.md`:308 | D-11. Rulings of 25 September, 12:41 (R23 to R25) | | `D-12` ⚠️ **2 occurrences in 2 files — not unique** | | | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-1x.md`:704 | D-12 · A-2 — the referrer is the RECORDED SOURCE, and a person only if the record carries one | -| ↳ | `decisions.md`:318 | D-12. Rulings of 25 September, 12:43 (R26 to R31) | +| ↳ | `decisions.md`:324 | D-12. Rulings of 25 September, 12:43 (R26 to R31) | | `D-13` ⚠️ **2 occurrences in 2 files — not unique** | | | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-1x.md`:720 | D-13 · A-3 and A-4 — both resolve FOR THE CODE; the drawings change | -| ↳ | `decisions.md`:337 | D-13. Tooling tests in batch gates (R32) | +| ↳ | `decisions.md`:343 | D-13. Tooling tests in batch gates (R32) | | `D-14` ⚠️ **2 occurrences in 2 files — not unique** | | | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-1x.md`:739 | D-14 · A-6 and A-8 — ADD THE LINK, AND MAKE THE GUARD ENFORCE IN THE SAME CHANGE. Never one without the other. | -| ↳ | `decisions.md`:347 | D-14. Standing defaults: decide small things without asking | +| ↳ | `decisions.md`:353 | D-14. Standing defaults: decide small things without asking | | `D-15` ⚠️ **2 occurrences in 2 files — not unique** | | | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-1x.md`:778 | D-15 · A-7 — the figure NAMES ITS OWN CLOCK, or it does not ship | -| ↳ | `decisions.md`:359 | D-15. Rulings of 25 September, 13:26 (R33 to R35) | +| ↳ | `decisions.md`:365 | D-15. Rulings of 25 September, 13:26 (R33 to R35) | | `D-16` ⚠️ **2 occurrences in 2 files — not unique** | | | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-1x.md`:799 | D-16 · WARD LEAD RULING — the unwired primary actions use §8.6's EXISTING sentence; nothing new is invented | -| ↳ | `decisions.md`:372 | D-16. Legal overrides and form receipts, 25 September 13:51 UTC | +| ↳ | `decisions.md`:378 | D-16. Legal overrides and form receipts, 25 September 13:51 UTC | | `D-17` ⚠️ **2 occurrences in 2 files — not unique** | | | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-1x.md`:843 | D-17 · WARD LEAD RULING — A-8: FD-23 wins. The Patient screen never shows where else a patient has been. | -| ↳ | `decisions.md`:385 | D-17. Morning roll-up time is Josh's own default (25 September) | +| ↳ | `decisions.md`:391 | D-17. Morning roll-up time is Josh's own default (25 September) | | `D-18` ⚠️ **2 occurrences in 2 files — not unique** | | | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-1x.md`:878 | D-18 · WARD LEAD RULING — the referral query contract carries MODEL values; and `gp` is a question for the owner, not a mapping for me | -| ↳ | `decisions.md`:396 | D-18. The privacy lock stops saving only for typed text (25 September) | +| ↳ | `decisions.md`:402 | D-18. The privacy lock stops saving only for typed text (25 September) | | `D-19` ⚠️ **2 occurrences in 2 files — not unique** | | | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-1x.md`:922 | D-19 · WARD LEAD RULING — "something is already open for this person" is PERMITTED; "where" never is | -| ↳ | `decisions.md`:407 | D-19. Rulings of 25 September, evening (walkthrough, leave beds, PsychSift, gender display) | +| ↳ | `decisions.md`:413 | D-19. Rulings of 25 September, evening (walkthrough, leave beds, PsychSift, gender display) | | `D-20` ⚠️ **3 occurrences in 2 files — not unique** | | | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-1x.md`:967 | D-20 · WARD LEAD RULING — the drawing wins; the vocabulary anchor was never the heading | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-1x.md`:1010 | D-20-REVISED · the drawing renames BOTH, so neither side is taken whole | -| ↳ | `decisions.md`:437 | D-20. One high-contrast colour check retired (26 September) | +| ↳ | `decisions.md`:443 | D-20. One high-contrast colour check retired (26 September) | | `D-21` ⚠️ **2 occurrences in 2 files — not unique** | | | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-1x.md`:1058 | D-21 · WARD LEAD RULING — tasks 10 and 12 are CLOSED, not deferred, and not built as callerless modules | -| ↳ | `decisions.md`:450 | D-21. Coordinator bed board: all nine recommended answers (26 September) | +| ↳ | `decisions.md`:456 | D-21. Coordinator bed board: all nine recommended answers (26 September) | | `D-22` ⚠️ **2 occurrences in 2 files — not unique** | | | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-1x.md`:1084 | D-22 · SHAPE 2 — the landmark label and the heading stop being two strings | -| ↳ | `decisions.md`:462 | D-22. No legal limits in hour rules; the rest are labelled defaults (26 September) | +| ↳ | `decisions.md`:468 | D-22. No legal limits in hour rules; the rest are labelled defaults (26 September) | | `D-23` ⚠️ **2 occurrences in 2 files — not unique** | | | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-1x.md`:1121 | D-23 · The bed board passes an empty leave-bed list into three capacity figures, and says nothing | -| ↳ | `decisions.md`:478 | D-23. Leave-bed fields kept; patient search stops matching by ward (26 September) | +| ↳ | `decisions.md`:484 | D-23. Leave-bed fields kept; patient search stops matching by ward (26 September) | | `D-24` ⚠️ **2 occurrences in 2 files — not unique** | | | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-1x.md`:1142 | D-24 · The raw `1.2` line-height — token it, and accept that community no longer matches | -| ↳ | `decisions.md`:492 | D-24. Hour-rules morning list: all A (26 September) | +| ↳ | `decisions.md`:498 | D-24. Hour-rules morning list: all A (26 September) | | `D-25` ⚠️ **2 occurrences in 2 files — not unique** | | | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-1x.md`:1161 | D-25 · Command's `deadlineLine` sentence is not built — and this DEFERS the R-5 question rather than answering it | -| ↳ | `decisions.md`:516 | D-25. The lone-patient check counts free beds on both matching paths (26 September) | +| ↳ | `decisions.md`:522 | D-25. The lone-patient check counts free beds on both matching paths (26 September) | | `D-26` ⚠️ **2 occurrences in 2 files — not unique** | | | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-1x.md`:1184 | D-26 · `edPressure` becomes a projection of `edHomeSummaries` — the two screens stop being able to disagree | -| ↳ | `decisions.md`:524 | D-26. Select fold checks by changed risk (27 September) | +| ↳ | `decisions.md`:530 | D-26. Select fold checks by changed risk (27 September) | | `D-27` ⚠️ **2 occurrences in 2 files — not unique** | | | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-1x.md`:1213 | D-27 · The word for a free bed is READY — and the ruling is about the WORD, not the identifier | -| ↳ | `decisions.md`:542 | D-27. Ward Flow uses its dedicated repository (28 September) | -| `D-28` | `decisions.md`:555 | D-28. Design Modernization & Anti-Box Architecture (30 September 2026) | -| `D-29` | `decisions.md`:569 | D-29. Act time limits shown as a labelled synthetic demo (4 October 2026) | +| ↳ | `decisions.md`:548 | D-27. Ward Flow uses its dedicated repository (28 September) | +| `D-28` | `decisions.md`:561 | D-28. Design Modernization & Anti-Box Architecture (30 September 2026) | +| `D-29` | `decisions.md`:575 | D-29. Act time limits shown as a labelled synthetic demo (4 October 2026) | | `D-30` ⚠️ **2 occurrences in 2 files — not unique** | | | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-1x.md`:1238 | D-30 · `Unit.forensic` is a WARD flag, and every rendered string says so | -| ↳ | `decisions.md`:584 | D-30. Central Coordinator Approval for Inter-Ward Bed Transfers (6 October 2026) | +| ↳ | `decisions.md`:590 | D-30. Central Coordinator Approval for Inter-Ward Bed Transfers (6 October 2026) | | `D-31` ⚠️ **2 occurrences in 2 files — not unique** | | | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-1x.md`:1367 | D-31 · The plan's disposition — delete one half, re-derive the other | -| ↳ | `decisions.md`:591 | D-31. Gender-Diverse Bed Placement Policy & Clinical Override Safety (6 October 2026) | +| ↳ | `decisions.md`:597 | D-31. Gender-Diverse Bed Placement Policy & Clinical Override Safety (6 October 2026) | | `D-32` ⚠️ **2 occurrences in 2 files — not unique** | | | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-1x.md`:1289 | D-32 · D-6 is restated: ONE WORDING PER STATE, and the states are named | -| ↳ | `decisions.md`:598 | D-32. FIFO Waiting Time with Clinical Triage Badging vs Algorithmic Urgency Sorting (6 October 2026) | +| ↳ | `decisions.md`:604 | D-32. FIFO Waiting Time with Clinical Triage Badging vs Algorithmic Urgency Sorting (6 October 2026) | | `D-33` ⚠️ **2 occurrences in 2 files — not unique** | | | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-1x.md`:1322 | D-33 · "Nothing outstanding" does three jobs, and only one of them may keep the words | -| ↳ | `decisions.md`:605 | D-33. Separation of Local Ward Shift Notes from Statewide Coordinator Telemetry (6 October 2026) | +| ↳ | `decisions.md`:611 | D-33. Separation of Local Ward Shift Notes from Statewide Coordinator Telemetry (6 October 2026) | | `D-34` ⚠️ **2 occurrences in 2 files — not unique** | | | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-1x.md`:1347 | D-34 · A hypothetical destination row may not use obligation vocabulary at all | -| ↳ | `decisions.md`:612 | D-34. Acute Medical Deterioration Bed Release and Escalation Protocol (6 October 2026) | +| ↳ | `decisions.md`:618 | D-34. Acute Medical Deterioration Bed Release and Escalation Protocol (6 October 2026) | | `D-35` ⚠️ **2 occurrences in 2 files — not unique** | | | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-1x.md`:1388 | D-35 · The ED pressure strip does not narrow to the selected service, and #6 is CLOSED | -| ↳ | `decisions.md`:619 | D-35. Deferral of Regional Multi-Leg Transport & RFDS Repatriation (6 October 2026) | +| ↳ | `decisions.md`:625 | D-35. Deferral of Regional Multi-Leg Transport & RFDS Repatriation (6 October 2026) | | `D-36` ⚠️ **2 occurrences in 2 files — not unique** | | | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-1x.md`:1405 | D-36 · _Referrals into this ward_ / _into the team_ — PRESENTATION, with a condition | -| ↳ | `decisions.md`:626 | D-36. Affirmation of External Governance & Clinical Safety Hard Gates (6 October 2026) (Replaced by D-87) | +| ↳ | `decisions.md`:632 | D-36. Affirmation of External Governance & Clinical Safety Hard Gates (6 October 2026) (Replaced by D-87) | | `D-37` ⚠️ **2 occurrences in 2 files — not unique** | | | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-1x.md`:1411 | D-37 · _Clinically ready, not yet gone_ — PRESENTATION, and the heading must name its subject | -| ↳ | `decisions.md`:641 | D-37. External Governance Hard Gate Operational Postures & Resolution Roadmap (6 October 2026) (Replaced by D-87) | +| ↳ | `decisions.md`:647 | D-37. External Governance Hard Gate Operational Postures & Resolution Roadmap (6 October 2026) (Replaced by D-87) | | `D-38` ⚠️ **2 occurrences in 2 files — not unique** | | | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-1x.md`:1417 | D-38 · _People currently in a hospital bed_ on community team statistics — an aggregate that identifies at small N | -| ↳ | `decisions.md`:668 | D-38. Leave, absent without leave and CTO on the Patient page (9 October 2026) | +| ↳ | `decisions.md`:674 | D-38. Leave, absent without leave and CTO on the Patient page (9 October 2026) | | `D-39` ⚠️ **2 occurrences in 2 files — not unique** | | | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-1x.md`:1437 | D-39 · _Contacts_ and _Time to first contact_ — HELD, build neither | -| ↳ | `decisions.md`:686 | D-39. Patients are identified by UMRN, never by a WF number (9 October 2026) | +| ↳ | `decisions.md`:692 | D-39. Patients are identified by UMRN, never by a WF number (9 October 2026) | | `D-40` ⚠️ **2 occurrences in 2 files — not unique** | | | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-1x.md`:1445 | D-40 · An empty check array never claims reconciliation — on either shell surface | -| ↳ | `decisions.md`:730 | D-40. A second community treatment order keeps the first (9 October 2026) | +| ↳ | `decisions.md`:736 | D-40. A second community treatment order keeps the first (9 October 2026) | | `D-41` ⚠️ **2 occurrences in 2 files — not unique** | | | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-1x.md`:1478 | D-41 · `corridorCounts` is extended, and its POPULATION changes | -| ↳ | `decisions.md`:741 | D-41. Delays board filters narrow the table and state the hidden count (9 October 2026) | +| ↳ | `decisions.md`:747 | D-41. Delays board filters narrow the table and state the hidden count (9 October 2026) | | `D-42` ⚠️ **2 occurrences in 2 files — not unique** | | | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-1x.md`:1490 | D-42 · _Referrals into this ward_ renders bare counts. No share. | -| ↳ | `decisions.md`:754 | D-42. 12px typography floor with no uppercase exception reaffirmed in Design System v9 (9–10 October 2026) | +| ↳ | `decisions.md`:760 | D-42. 12px typography floor with no uppercase exception reaffirmed in Design System v9 (9–10 October 2026) | | `D-43` ⚠️ **2 occurrences in 2 files — not unique** | | | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-1x.md`:1724 | D-43 · Ward Lead ruling — the bed board's ordinal contradiction is a LANE TASK | -| ↳ | `decisions.md`:760 | D-43. Colour lives in glyphs and the hero; red means act now with a thin 1px edge, never a fill (9 October 2026) | +| ↳ | `decisions.md`:766 | D-43. Colour lives in glyphs and the hero; red means act now with a thin 1px edge, never a fill (9 October 2026) | | `D-44` ⚠️ **2 occurrences in 2 files — not unique** | | | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-1x.md`:1791 | D-44 · The community scope note is reworded and the comparison panel stays | -| ↳ | `decisions.md`:767 | D-44. Compact sizing, white cards and smaller text retained over expression-test card tints (9 October 2026) | +| ↳ | `decisions.md`:773 | D-44. Compact sizing, white cards and smaller text retained over expression-test card tints (9 October 2026) | | `D-45` ⚠️ **2 occurrences in 2 files — not unique** | | | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-1x.md`:1803 | D-45 · 🔴 THE SEED DECISION — the fixture gains BOTH, as ONE change, after the statistics screens | -| ↳ | `decisions.md`:773 | D-45. Phone is its own 390×844 design, never a desktop reflow (9 October 2026) | +| ↳ | `decisions.md`:779 | D-45. Phone is its own 390×844 design, never a desktop reflow (9 October 2026) | | `D-46` ⚠️ **2 occurrences in 2 files — not unique** | | | | ↳ | `../history/archive/dated-notes/owner-decisions-2026-09-1x.md`:1984 | D-46 · A guard that fails whenever the machine is busy | -| ↳ | `decisions.md`:780 | D-46. Every page has a focal part, a part of its own, a page-specific hero and command-bar action rules (9 October 2026) | -| `D-47` | `decisions.md`:786 | D-47. Glass stays about 80% opaque with the top sheen kept (10 October 2026) | -| `D-48` | `decisions.md`:792 | D-48. Figures stay in Geist Mono with tabular digits while chart axes use Geist Sans (10 October 2026) | -| `D-49` | `decisions.md`:798 | D-49. Ward Flow 44px default row target (dense 36px, touch 52px) vs retired 48px PsychSift tap knob (10 October 2026) | -| `D-50` | `decisions.md`:804 | D-50. Neutral T1 urgency pill vs Form 1A amber statutory warning badge (10 October 2026) | -| `D-51` | `decisions.md`:810 | D-51. Delays filters hide rows with a stated hidden count while other queues highlight by default (10 October 2026) | -| `D-52` | `decisions.md`:817 | D-52. 10 October page review rulings: time-axis overdue zone, 15px/20px strip figures, 8px people pips and incremental shared parts (10 October 2026) | -| `D-53` | `decisions.md`:823 | D-53. Elevate design language and Glare mode adopted for Design System v9 (10 October 2026) | -| `D-54` | `decisions.md`:830 | D-54. Tier time thresholds remain synthetic demo values requiring clinical sign-off (10 October 2026) | -| `D-55` | `decisions.md`:838 | D-55. Supabase is Ward Flow's database and sign-in provider, and Azure is retired (15 October 2026) | -| `D-56` | `decisions.md`:844 | D-56. Josh signs the clinical values that have a recorded source, for the prototype (15 October 2026) | -| `D-57` | `decisions.md`:850 | D-57. Twenty Top 25 items move from the showcase into the real screens, each behind its own flag (15 October 2026) | -| `D-58` | `decisions.md`:877 | D-58. Josh signs three more clinical values that have a national source, for the prototype (15 October 2026) | -| `D-59` | `decisions.md`:883 | D-59. Each role sees only what it needs, from one access table (15 October 2026) | -| `D-60` | `decisions.md`:889 | D-60. Criteria led discharge, for voluntary patients only (15 October 2026) | -| `D-61` | `decisions.md`:898 | D-61. Tasks and Alerts are one queue called Alerts (16 October 2026) | -| `D-62` | `decisions.md`:904 | D-62. The one Alerts queue is signed off and its flag removed (16 October 2026) | -| `D-63` | `decisions.md`:910 | D-63. Josh signs the remaining clinical values and the criteria list, for the prototype (16 October 2026) | -| `D-64` | `decisions.md`:918 | D-64. Criteria led discharge shows on the boards and warns at departure (16 October 2026) | -| `D-65` | `decisions.md`:925 | D-65. Criteria led discharge on in production, typed patient specific criteria, and the AWOL bed hold review paused (17 October 2026) | -| `D-66` | `decisions.md`:941 | D-66. Granted roles work without a second approval (17 October 2026) | -| `D-67` | `decisions.md`:949 | D-67. Recover synthetic form drafts within the browser session (17 October 2026) | -| `D-68` | `decisions.md`:956 | D-68. Bed meeting TV content and access (19 October 2026) | -| `D-69` | `decisions.md`:964 | D-69. A referral with no legal status: "Needs an involuntary-capable bed until status is set." (20 October 2026) | -| `D-70` | `decisions.md`:971 | D-70. No computed Mental Health Act periods: show only the recorded due time (20 October 2026) | -| `D-71` | `decisions.md`:977 | D-71. Audit 1 clinical safety fixes: no suggested wards, wait-order queues, recorded facts only (20 October 2026) | -| `D-72` | `decisions.md`:990 | D-72. Seven product decisions for the 21 October fix plan (21 October 2026) | -| `D-73` | `decisions.md`:1006 | D-73. Batch merge safeguards (21 October 2026) | -| `D-74` | `decisions.md`:1022 | D-74. Owner answers to the 21 October open questions (21 October 2026) | -| `D-75` | `decisions.md`:1043 | D-75. UX audit follow-up, page caching, community gaps and the extra-travel bed hold (21 October 2026) | -| `D-76` | `decisions.md`:1056 | D-76. Community referral gaps: the full move journey and asking more wards (21 October 2026) | -| `D-77` | `decisions.md`:1065 | D-77. The ten bigger UX changes approved for build (22 October 2026) | -| `D-78` | `decisions.md`:1085 | D-78. One decline list for wards and coordinators (22 October 2026) | -| `D-79` | `decisions.md`:1096 | D-79. Wards see the full referral, with name and UMRN, before they answer (23 October 2026) | -| `D-80` | `decisions.md`:1107 | D-80. Role access plan version 2: all 17 recommendations (23 October 2026) | -| `D-81` | `decisions.md`:1122 | D-81. Pulled, with a pull time limit, for a bed kept for an incoming patient (24 October 2026) | -| `D-82` | `decisions.md`:1129 | D-82. A PR may raise a phone size limit by up to 5 KB per screen without asking (26 October 2026) | -| `D-83` | `decisions.md`:1137 | D-83. Patient names stay in full on every screen, copy and TV; privacy work must not make the app less useful (26 October 2026) | -| `D-84` | `decisions.md`:1148 | D-84. The live app stays on Railway Singapore for now, and there is no server-side TV account yet (26 October 2026) | -| `D-85` | `decisions.md`:1156 | D-85. "Held" only for a bed kept for its own patient; "pulled" for an incoming bed; "held up" for a delay (26 October 2026) | -| `D-86` | `decisions.md`:1163 | D-86. No second approver for role grants, at pilot or otherwise (27 October 2026) | -| `D-87` | `decisions.md`:1170 | D-87. D-36 and D-37 are replaced by the real-data gate (27 October 2026) | -| `D-88` | `decisions.md`:1182 | D-88. The public demo opens with a demo code once the front door is on (27 October 2026) | -| `D-89` | `decisions.md`:1189 | D-89. Redesign mock-up copies of large screens may pass the 1,500-line cap (30 October 2026) | -| `D-90` | `decisions.md`:1197 | D-90. Help gets How do I…, Show me runs everywhere, and Help is built without a separate mock-up step (30 October 2026) | -| `D-91` | `decisions.md`:1208 | D-91. One design home for the redesign, and Josh's answers on Help, Settings, search and notifications (31 October 2026) | -| `D-92` | `decisions.md`:1243 | D-92. Help goes live before its mock-up review, one search box on Capacity, and referral rows on Home open the panel (31 October 2026) | -| `D-93` | `decisions.md`:1253 | D-93. Legal form times show only as typed, never as a countdown (31 October 2026) | -| `D-94` | `decisions.md`:1261 | D-94. Design rulings of 31 October 2026 | -| `D-95` | `decisions.md`:1274 | D-95. One page scroll, and a click outside closes a drawer (3 November 2026) | -| `D-96` | `decisions.md`:1284 | D-96. A named bed is pulled, and its patient is not also waiting (8 November 2026) | -| `D-97` | `decisions.md`:1294 | D-97. Owner answers on seven open items: N21, N25, N26, N29, N40, N41 and WF-B008 (8 November 2026) | -| `D-98` | `decisions.md`:1307 | D-98. Friction pass: Quick bar, Patient peek and Ward peek (8 November 2026) | -| `D-99` | `decisions.md`:1316 | D-99. "Real details" in the referral drawer's sample patients (25 September 2026) | -| `D-100` | `decisions.md`:1322 | D-100. "Under a form" means one rule everywhere (9 November 2026) | -| `D-101` | `decisions.md`:1329 | D-101. Clinically ready for discharge, with one delay reason (9 November 2026) | -| `D-102` | `decisions.md`:1338 | D-102. Report-a-problem screenshots are blurred, and patient-table exports carry no names (9 November 2026) | -| `D-103` | `decisions.md`:1347 | D-103. Any coordinator on shift may mark a bed override reviewed (9 November 2026) | -| `D-104` | `decisions.md`:1354 | D-104. Care plans and safety flags: five defaults (9 November 2026) | -| `D-105` | `decisions.md`:1366 | D-105. Optional clerk details on the patient record (8 November 2026) | -| `D-106` | `decisions.md`:1373 | D-106. Clinical values from the 9 November 2026 documentation audit (9 November 2026) | -| `D-107` | `decisions.md`:1385 | D-107. Working rules and documentation from the 9 November 2026 audit (9 November 2026) | -| `D-108` | `decisions.md`:1399 | D-108. Six bed-flow features: keep D-93 and D-72, ED long-wait next steps (9 November 2026) | -| `D-109` | `decisions.md`:1408 | D-109. Home's bed alert line tests the whole number shown (9 November 2026) | -| `D-110` | `decisions.md`:1415 | D-110. ED and referral flow: neutral fit line, clearance timing and alternatives to admission (9 November 2026) | -| `D-111` | `decisions.md`:1425 | D-111. Review and audit plan: first guards and four open answers (9 November 2026) | -| `D-112` | `decisions.md`:1439 | D-112. Phone bottom bar: the floating bar (9 November 2026) | -| `D-113` | `decisions.md`:1448 | D-113. Second patient identifier on accept and Mark done; no initials search (9 November 2026) | -| `D-114` | `decisions.md`:1458 | D-114. Allow pull_request_target for three workflows only (9 November 2026) | -| `D-115` | `decisions.md`:1466 | D-115. One count on every screen, and a missing patient shown everywhere (9 November 2026) | -| `D-116` | `decisions.md`:1480 | D-116. Page tops: the PR #1581 recommendations stand (9 November 2026) | -| `D-117` | `decisions.md`:1497 | D-117. Care plans follow-up: frequent presenter count, tribunal date and ward flags (10 November 2026) | -| `D-118` | `decisions.md`:1506 | D-118. Page tops: Referrals and Ward phone limits up to 8 KB above main (10 November 2026) | -| `D-119` | `decisions.md`:1512 | D-119. Page tops: phone limits raised to measured sizes, trim after merge (10 November 2026) | -| `D-120` | `decisions.md`:1519 | D-120. Discharge and capacity values: pull limit, transport delay and discharge date slip (9 November 2026) | -| `D-121` | `decisions.md`:1528 | D-121. Working rules, guards and your PC from the 10 November 2026 audit (10 November 2026) | -| `D-122` | `decisions.md`:1542 | D-122. Clinical and privacy answers from the 10 November 2026 audit (10 November 2026) | -| `D-123` | `decisions.md`:1555 | D-123. Master audit list answers: two clinical fixes and five working rules (10 November 2026) | -| `D-124` | `decisions.md`:1569 | D-124. Offline saves whose record changed are refused and shown (10 November 2026) | -| `D-125` | `decisions.md`:1576 | D-125. Top 10 audit follow-ups approved (10 November 2026) | -| `D-126` | `decisions.md`:1588 | D-126. Ranked lists: neutral orders approved (10 November 2026) | -| `D-127` | `decisions.md`:1607 | D-127. Neutral wording for a community treatment order at arrival (10 November 2026) | -| `D-128` | `decisions.md`:1614 | D-128. Final master audit: nine answers (10 November 2026) | -| `D-129` | `decisions.md`:1629 | D-129. Master audit findings: every recommendation approved (10 November 2026) | -| `D-130` | `decisions.md`:1679 | D-130. Audit follow-ups: every remaining recommendation approved (10 November 2026) | -| `D-131` | `decisions.md`:1695 | D-131. Hard-case demo data allowed, and the movement diagram follows the engine (10 November 2026) | -| `D-132` | `decisions.md`:1704 | D-132. Audit fixes group 1: docs and CI guards (10 November 2026) | -| `D-133` | `decisions.md`:1714 | D-133. Batch 1 (ED and referral flow): three answers (10 November 2026) | -| `D-134` | `decisions.md`:1724 | D-134. Ward arrival and beds batch: how to hold, advocate line, night list and the feature freeze (10 November 2026) | -| `D-135` | `decisions.md`:1747 | D-135. Batch 4, outages and pilot control: pack age and plan answers (10 November 2026) | -| `D-136` | `decisions.md`:1756 | D-136. Feature batch 3 (shift change and follow-up): two signed values (10 November 2026) | -| `D-137` | `decisions.md`:1768 | D-137. Feature build batch 5: count leak first, TV change mark and QR library (10 November 2026) | -| `D-138` | `decisions.md`:1784 | D-138. Phone alert urgency by kind (10 November 2026) | -| `D-139` | `decisions.md`:1790 | D-139. Phone Statistics ward list A to Z, and leave return times as typed (10 November 2026) | -| `D-140` | `decisions.md`:1800 | D-140. Feature list adopted, and Wave 1 begins (10 November 2026) | -| `D-141` | `decisions.md`:1813 | D-141. Batch 1 (ED and referral flow) design approved, with eleven answers (11 November 2026) | -| `D-142` | `decisions.md`:1831 | D-142. Batch 4: design review and all twelve answers approved, D-80 amended for site features (11 November 2026) | -| `D-143` | `decisions.md`:1843 | D-143. MHERT is MHERL in the glossary; SMHMR deferred (11 November 2026) | -| `D-144` | `decisions.md`:1851 | D-144. Chip rows move only sideways on a phone (11 November 2026) | -| `D-145` | `decisions.md`:1857 | D-145. Repository review: fixes, features and code health approved (11 November 2026) | -| `D-146` | `decisions.md`:1871 | D-146. Performance audit fixes and the phone speed target (11 November 2026) | -| `D-147` | `decisions.md`:1877 | D-147. Demo-code tries keep per-address keying until a trusted proxy is set (11 November 2026) | -| `D-152` | `decisions.md`:1883 | D-152. Returned to ED prompt sees every return in shared mode (11 November 2026) | -| `D-153` | `decisions.md`:1891 | D-153. Keep the drawn-time settle check, and defer a separate agent GitHub identity (11 November 2026) | -| `D-154` | `decisions.md`:1899 | D-154. The community desk's ED heads-up reads a narrow scoped list (11 November 2026) | +| ↳ | `decisions.md`:786 | D-46. Every page has a focal part, a part of its own, a page-specific hero and command-bar action rules (9 October 2026) | +| `D-47` | `decisions.md`:792 | D-47. Glass stays about 80% opaque with the top sheen kept (10 October 2026) | +| `D-48` | `decisions.md`:798 | D-48. Figures stay in Geist Mono with tabular digits while chart axes use Geist Sans (10 October 2026) | +| `D-49` | `decisions.md`:804 | D-49. Ward Flow 44px default row target (dense 36px, touch 52px) vs retired 48px PsychSift tap knob (10 October 2026) | +| `D-50` | `decisions.md`:810 | D-50. Neutral T1 urgency pill vs Form 1A amber statutory warning badge (10 October 2026) | +| `D-51` | `decisions.md`:816 | D-51. Delays filters hide rows with a stated hidden count while other queues highlight by default (10 October 2026) | +| `D-52` | `decisions.md`:823 | D-52. 10 October page review rulings: time-axis overdue zone, 15px/20px strip figures, 8px people pips and incremental shared parts (10 October 2026) | +| `D-53` | `decisions.md`:829 | D-53. Elevate design language and Glare mode adopted for Design System v9 (10 October 2026) | +| `D-54` | `decisions.md`:836 | D-54. Tier time thresholds remain synthetic demo values requiring clinical sign-off (10 October 2026) | +| `D-55` | `decisions.md`:844 | D-55. Supabase is Ward Flow's database and sign-in provider, and Azure is retired (15 October 2026) | +| `D-56` | `decisions.md`:850 | D-56. Josh signs the clinical values that have a recorded source, for the prototype (15 October 2026) | +| `D-57` | `decisions.md`:856 | D-57. Twenty Top 25 items move from the showcase into the real screens, each behind its own flag (15 October 2026) | +| `D-58` | `decisions.md`:883 | D-58. Josh signs three more clinical values that have a national source, for the prototype (15 October 2026) | +| `D-59` | `decisions.md`:889 | D-59. Each role sees only what it needs, from one access table (15 October 2026) | +| `D-60` | `decisions.md`:895 | D-60. Criteria led discharge, for voluntary patients only (15 October 2026) | +| `D-61` | `decisions.md`:904 | D-61. Tasks and Alerts are one queue called Alerts (16 October 2026) | +| `D-62` | `decisions.md`:910 | D-62. The one Alerts queue is signed off and its flag removed (16 October 2026) | +| `D-63` | `decisions.md`:916 | D-63. Josh signs the remaining clinical values and the criteria list, for the prototype (16 October 2026) | +| `D-64` | `decisions.md`:924 | D-64. Criteria led discharge shows on the boards and warns at departure (16 October 2026) | +| `D-65` | `decisions.md`:931 | D-65. Criteria led discharge on in production, typed patient specific criteria, and the AWOL bed hold review paused (17 October 2026) | +| `D-66` | `decisions.md`:947 | D-66. Granted roles work without a second approval (17 October 2026) | +| `D-67` | `decisions.md`:955 | D-67. Recover synthetic form drafts within the browser session (17 October 2026) | +| `D-68` | `decisions.md`:962 | D-68. Bed meeting TV content and access (19 October 2026) | +| `D-69` | `decisions.md`:970 | D-69. A referral with no legal status: "Needs an involuntary-capable bed until status is set." (20 October 2026) | +| `D-70` | `decisions.md`:977 | D-70. No computed Mental Health Act periods: show only the recorded due time (20 October 2026) | +| `D-71` | `decisions.md`:983 | D-71. Audit 1 clinical safety fixes: no suggested wards, wait-order queues, recorded facts only (20 October 2026) | +| `D-72` | `decisions.md`:996 | D-72. Seven product decisions for the 21 October fix plan (21 October 2026) | +| `D-73` | `decisions.md`:1012 | D-73. Batch merge safeguards (21 October 2026) | +| `D-74` | `decisions.md`:1028 | D-74. Owner answers to the 21 October open questions (21 October 2026) | +| `D-75` | `decisions.md`:1049 | D-75. UX audit follow-up, page caching, community gaps and the extra-travel bed hold (21 October 2026) | +| `D-76` | `decisions.md`:1062 | D-76. Community referral gaps: the full move journey and asking more wards (21 October 2026) | +| `D-77` | `decisions.md`:1071 | D-77. The ten bigger UX changes approved for build (22 October 2026) | +| `D-78` | `decisions.md`:1091 | D-78. One decline list for wards and coordinators (22 October 2026) | +| `D-79` | `decisions.md`:1102 | D-79. Wards see the full referral, with name and UMRN, before they answer (23 October 2026) | +| `D-80` | `decisions.md`:1113 | D-80. Role access plan version 2: all 17 recommendations (23 October 2026) | +| `D-81` | `decisions.md`:1128 | D-81. Pulled, with a pull time limit, for a bed kept for an incoming patient (24 October 2026) | +| `D-82` | `decisions.md`:1135 | D-82. A PR may raise a phone size limit by up to 5 KB per screen without asking (26 October 2026) | +| `D-83` | `decisions.md`:1143 | D-83. Patient names stay in full on every screen, copy and TV; privacy work must not make the app less useful (26 October 2026) | +| `D-84` | `decisions.md`:1154 | D-84. The live app stays on Railway Singapore for now, and there is no server-side TV account yet (26 October 2026) | +| `D-85` | `decisions.md`:1162 | D-85. "Held" only for a bed kept for its own patient; "pulled" for an incoming bed; "held up" for a delay (26 October 2026) | +| `D-86` | `decisions.md`:1169 | D-86. No second approver for role grants, at pilot or otherwise (27 October 2026) | +| `D-87` | `decisions.md`:1176 | D-87. D-36 and D-37 are replaced by the real-data gate (27 October 2026) | +| `D-88` | `decisions.md`:1188 | D-88. The public demo opens with a demo code once the front door is on (27 October 2026) | +| `D-89` | `decisions.md`:1195 | D-89. Redesign mock-up copies of large screens may pass the 1,500-line cap (30 October 2026) | +| `D-90` | `decisions.md`:1203 | D-90. Help gets How do I…, Show me runs everywhere, and Help is built without a separate mock-up step (30 October 2026) | +| `D-91` | `decisions.md`:1214 | D-91. One design home for the redesign, and Josh's answers on Help, Settings, search and notifications (31 October 2026) | +| `D-92` | `decisions.md`:1249 | D-92. Help goes live before its mock-up review, one search box on Capacity, and referral rows on Home open the panel (31 October 2026) | +| `D-93` | `decisions.md`:1259 | D-93. Legal form times show only as typed, never as a countdown (31 October 2026) | +| `D-94` | `decisions.md`:1267 | D-94. Design rulings of 31 October 2026 | +| `D-95` | `decisions.md`:1280 | D-95. One page scroll, and a click outside closes a drawer (3 November 2026) | +| `D-96` | `decisions.md`:1290 | D-96. A named bed is pulled, and its patient is not also waiting (8 November 2026) | +| `D-97` | `decisions.md`:1300 | D-97. Owner answers on seven open items: N21, N25, N26, N29, N40, N41 and WF-B008 (8 November 2026) | +| `D-98` | `decisions.md`:1313 | D-98. Friction pass: Quick bar, Patient peek and Ward peek (8 November 2026) | +| `D-99` | `decisions.md`:1322 | D-99. "Real details" in the referral drawer's sample patients (25 September 2026) | +| `D-100` | `decisions.md`:1328 | D-100. "Under a form" means one rule everywhere (9 November 2026) | +| `D-101` | `decisions.md`:1335 | D-101. Clinically ready for discharge, with one delay reason (9 November 2026) | +| `D-102` | `decisions.md`:1344 | D-102. Report-a-problem screenshots are blurred, and patient-table exports carry no names (9 November 2026) | +| `D-103` | `decisions.md`:1353 | D-103. Any coordinator on shift may mark a bed override reviewed (9 November 2026) | +| `D-104` | `decisions.md`:1360 | D-104. Care plans and safety flags: five defaults (9 November 2026) | +| `D-105` | `decisions.md`:1372 | D-105. Optional clerk details on the patient record (8 November 2026) | +| `D-106` | `decisions.md`:1379 | D-106. Clinical values from the 9 November 2026 documentation audit (9 November 2026) | +| `D-107` | `decisions.md`:1391 | D-107. Working rules and documentation from the 9 November 2026 audit (9 November 2026) | +| `D-108` | `decisions.md`:1405 | D-108. Six bed-flow features: keep D-93 and D-72, ED long-wait next steps (9 November 2026) | +| `D-109` | `decisions.md`:1414 | D-109. Home's bed alert line tests the whole number shown (9 November 2026) | +| `D-110` | `decisions.md`:1421 | D-110. ED and referral flow: neutral fit line, clearance timing and alternatives to admission (9 November 2026) | +| `D-111` | `decisions.md`:1431 | D-111. Review and audit plan: first guards and four open answers (9 November 2026) | +| `D-112` | `decisions.md`:1445 | D-112. Phone bottom bar: the floating bar (9 November 2026) | +| `D-113` | `decisions.md`:1454 | D-113. Second patient identifier on accept and Mark done; no initials search (9 November 2026) | +| `D-114` | `decisions.md`:1464 | D-114. Allow pull_request_target for three workflows only (9 November 2026) | +| `D-115` | `decisions.md`:1472 | D-115. One count on every screen, and a missing patient shown everywhere (9 November 2026) | +| `D-116` | `decisions.md`:1486 | D-116. Page tops: the PR #1581 recommendations stand (9 November 2026) | +| `D-117` | `decisions.md`:1503 | D-117. Care plans follow-up: frequent presenter count, tribunal date and ward flags (10 November 2026) | +| `D-118` | `decisions.md`:1512 | D-118. Page tops: Referrals and Ward phone limits up to 8 KB above main (10 November 2026) | +| `D-119` | `decisions.md`:1518 | D-119. Page tops: phone limits raised to measured sizes, trim after merge (10 November 2026) | +| `D-120` | `decisions.md`:1525 | D-120. Discharge and capacity values: pull limit, transport delay and discharge date slip (9 November 2026) | +| `D-121` | `decisions.md`:1534 | D-121. Working rules, guards and your PC from the 10 November 2026 audit (10 November 2026) | +| `D-122` | `decisions.md`:1548 | D-122. Clinical and privacy answers from the 10 November 2026 audit (10 November 2026) | +| `D-123` | `decisions.md`:1561 | D-123. Master audit list answers: two clinical fixes and five working rules (10 November 2026) | +| `D-124` | `decisions.md`:1575 | D-124. Offline saves whose record changed are refused and shown (10 November 2026) | +| `D-125` | `decisions.md`:1582 | D-125. Top 10 audit follow-ups approved (10 November 2026) | +| `D-126` | `decisions.md`:1594 | D-126. Ranked lists: neutral orders approved (10 November 2026) | +| `D-127` | `decisions.md`:1613 | D-127. Neutral wording for a community treatment order at arrival (10 November 2026) | +| `D-128` | `decisions.md`:1620 | D-128. Final master audit: nine answers (10 November 2026) | +| `D-129` | `decisions.md`:1635 | D-129. Master audit findings: every recommendation approved (10 November 2026) | +| `D-130` | `decisions.md`:1685 | D-130. Audit follow-ups: every remaining recommendation approved (10 November 2026) | +| `D-131` | `decisions.md`:1701 | D-131. Hard-case demo data allowed, and the movement diagram follows the engine (10 November 2026) | +| `D-132` | `decisions.md`:1710 | D-132. Audit fixes group 1: docs and CI guards (10 November 2026) | +| `D-133` | `decisions.md`:1720 | D-133. Batch 1 (ED and referral flow): three answers (10 November 2026) | +| `D-134` | `decisions.md`:1730 | D-134. Ward arrival and beds batch: how to hold, advocate line, night list and the feature freeze (10 November 2026) | +| `D-135` | `decisions.md`:1753 | D-135. Batch 4, outages and pilot control: pack age and plan answers (10 November 2026) | +| `D-136` | `decisions.md`:1762 | D-136. Feature batch 3 (shift change and follow-up): two signed values (10 November 2026) | +| `D-137` | `decisions.md`:1774 | D-137. Feature build batch 5: count leak first, TV change mark and QR library (10 November 2026) | +| `D-138` | `decisions.md`:1790 | D-138. Phone alert urgency by kind (10 November 2026) | +| `D-139` | `decisions.md`:1796 | D-139. Phone Statistics ward list A to Z, and leave return times as typed (10 November 2026) | +| `D-140` | `decisions.md`:1806 | D-140. Feature list adopted, and Wave 1 begins (10 November 2026) | +| `D-141` | `decisions.md`:1819 | D-141. Batch 1 (ED and referral flow) design approved, with eleven answers (11 November 2026) | +| `D-142` | `decisions.md`:1837 | D-142. Batch 4: design review and all twelve answers approved, D-80 amended for site features (11 November 2026) | +| `D-143` | `decisions.md`:1849 | D-143. MHERT is MHERL in the glossary; SMHMR deferred (11 November 2026) | +| `D-144` | `decisions.md`:1857 | D-144. Chip rows move only sideways on a phone (11 November 2026) | +| `D-145` | `decisions.md`:1863 | D-145. Repository review: fixes, features and code health approved (11 November 2026) | +| `D-146` | `decisions.md`:1877 | D-146. Performance audit fixes and the phone speed target (11 November 2026) | +| `D-147` | `decisions.md`:1883 | D-147. Demo-code tries keep per-address keying until a trusted proxy is set (11 November 2026) | +| `D-148` | `decisions.md`:1889 | D-148. Closing a bed stays one tap, and its toast offers a reason (11 November 2026) | +| `D-149` | `decisions.md`:1896 | D-149. A record whose only links are withdrawn referrals can be archived (11 November 2026) | +| `D-150` | `decisions.md`:1907 | D-150. The signed-in site runs on real Perth time (11 November 2026) | +| `D-151` | `decisions.md`:1915 | D-151. A bed tile says when a change is waiting to save (11 November 2026) | +| `D-152` | `decisions.md`:1922 | D-152. Returned to ED prompt sees every return in shared mode (11 November 2026) | +| `D-153` | `decisions.md`:1930 | D-153. Keep the drawn-time settle check, and defer a separate agent GitHub identity (11 November 2026) | +| `D-154` | `decisions.md`:1938 | D-154. The community desk's ED heads-up reads a narrow scoped list (11 November 2026) | +| `D-155` | `decisions.md`:1947 | D-155. Check the live clock offset before clearing it (11 November 2026) | +| `D-156` | `decisions.md`:1954 | D-156. Reset the synthetic live world after the clock fix (11 November 2026) | | `D9-1` | `../history/archive/dated-notes/ward-flow-phase-9-decisions.md`:62 | D9-1 — The wait becomes prominent, and its ceiling is removed; it never outranks urgency (SESSION) | | `D9-2` | `../history/archive/dated-notes/ward-flow-phase-9-decisions.md`:102 | D9-2 — Declaring escalation records it and marks the screens, and changes nothing else (SESSION, and partly blocked) | | `D9-3` | `../history/archive/dated-notes/ward-flow-phase-9-decisions.md`:126 | D9-3 — The retrospective is one person's journey replayed, plus the ward prediction track record last (SESSION) | @@ -623,164 +629,170 @@ safe global key across 30 files. ## By file, newest first — 43 files -### `decisions.md` (2026-09-01 – 2026-11-11 (mixed, see file)) +### `decisions.md` (2026-09-01 – 2026-11-12 (mixed, see file)) **Recorded decision log.** Read the source for supersession and current scope; indexing does not grant authority. **Title:** Ward Flow — decision log -150 item(s): - -- `D-1` — line 179, heading: "D-1. Ward Flow is local only, with no linked repository (Replaced by D-27)" -- `D-2` — line 189, heading: "D-2. Railway is disconnected" -- `D-3` — line 200, heading: "D-3. The PsychSift and Database code is being retired from Ward Flow" -- `D-4` — line 208, heading: "D-4. Synthetic patients only" -- `D-5` — line 216, heading: "D-5. Parallel threads in separate worktrees, folded one at a time" -- `D-6` — line 227, heading: "D-6. Aboriginal cultural safety review deferred" -- `D-7` — line 235, heading: "D-7. The first four milestones, in this order" -- `D-8` — line 247, heading: "D-8. Josh's standing rulings, numbered R1 to R16, for every session and tool" -- `D-9` — line 279, heading: "D-9. Josh's rulings of 25 September, 11:43 to 12:00 (R17 to R21)" -- `D-10` — line 293, heading: "D-10. Gate build type check (R22)" -- `D-11` — line 302, heading: "D-11. Rulings of 25 September, 12:41 (R23 to R25)" -- `D-12` — line 318, heading: "D-12. Rulings of 25 September, 12:43 (R26 to R31)" -- `D-13` — line 337, heading: "D-13. Tooling tests in batch gates (R32)" -- `D-14` — line 347, heading: "D-14. Standing defaults: decide small things without asking" -- `D-15` — line 359, heading: "D-15. Rulings of 25 September, 13:26 (R33 to R35)" -- `D-16` — line 372, heading: "D-16. Legal overrides and form receipts, 25 September 13:51 UTC" -- `D-17` — line 385, heading: "D-17. Morning roll-up time is Josh's own default (25 September)" -- `D-18` — line 396, heading: "D-18. The privacy lock stops saving only for typed text (25 September)" -- `D-19` — line 407, heading: "D-19. Rulings of 25 September, evening (walkthrough, leave beds, PsychSift, gender display)" -- `D-20` — line 437, heading: "D-20. One high-contrast colour check retired (26 September)" -- `D-21` — line 450, heading: "D-21. Coordinator bed board: all nine recommended answers (26 September)" -- `D-22` — line 462, heading: "D-22. No legal limits in hour rules; the rest are labelled defaults (26 September)" -- `D-23` — line 478, heading: "D-23. Leave-bed fields kept; patient search stops matching by ward (26 September)" -- `D-24` — line 492, heading: "D-24. Hour-rules morning list: all A (26 September)" -- `D-25` — line 516, heading: "D-25. The lone-patient check counts free beds on both matching paths (26 September)" -- `D-26` — line 524, heading: "D-26. Select fold checks by changed risk (27 September)" -- `D-27` — line 542, heading: "D-27. Ward Flow uses its dedicated repository (28 September)" -- `D-28` — line 555, heading: "D-28. Design Modernization & Anti-Box Architecture (30 September 2026)" -- `D-29` — line 569, heading: "D-29. Act time limits shown as a labelled synthetic demo (4 October 2026)" -- `D-30` — line 584, heading: "D-30. Central Coordinator Approval for Inter-Ward Bed Transfers (6 October 2026)" -- `D-31` — line 591, heading: "D-31. Gender-Diverse Bed Placement Policy & Clinical Override Safety (6 October 2026)" -- `D-32` — line 598, heading: "D-32. FIFO Waiting Time with Clinical Triage Badging vs Algorithmic Urgency Sorting (6 October 2026)" -- `D-33` — line 605, heading: "D-33. Separation of Local Ward Shift Notes from Statewide Coordinator Telemetry (6 October 2026)" -- `D-34` — line 612, heading: "D-34. Acute Medical Deterioration Bed Release and Escalation Protocol (6 October 2026)" -- `D-35` — line 619, heading: "D-35. Deferral of Regional Multi-Leg Transport & RFDS Repatriation (6 October 2026)" -- `D-36` — line 626, heading: "D-36. Affirmation of External Governance & Clinical Safety Hard Gates (6 October 2026) (Replaced by D-87)" -- `D-37` — line 641, heading: "D-37. External Governance Hard Gate Operational Postures & Resolution Roadmap (6 October 2026) (Replaced by D-87)" -- `D-38` — line 668, heading: "D-38. Leave, absent without leave and CTO on the Patient page (9 October 2026)" -- `D-39` — line 686, heading: "D-39. Patients are identified by UMRN, never by a WF number (9 October 2026)" -- `D-40` — line 730, heading: "D-40. A second community treatment order keeps the first (9 October 2026)" -- `D-41` — line 741, heading: "D-41. Delays board filters narrow the table and state the hidden count (9 October 2026)" -- `D-42` — line 754, heading: "D-42. 12px typography floor with no uppercase exception reaffirmed in Design System v9 (9–10 October 2026)" -- `D-43` — line 760, heading: "D-43. Colour lives in glyphs and the hero; red means act now with a thin 1px edge, never a fill (9 October 2026)" -- `D-44` — line 767, heading: "D-44. Compact sizing, white cards and smaller text retained over expression-test card tints (9 October 2026)" -- `D-45` — line 773, heading: "D-45. Phone is its own 390×844 design, never a desktop reflow (9 October 2026)" -- `D-46` — line 780, heading: "D-46. Every page has a focal part, a part of its own, a page-specific hero and command-bar action rules (9 October 2026)" -- `D-47` — line 786, heading: "D-47. Glass stays about 80% opaque with the top sheen kept (10 October 2026)" -- `D-48` — line 792, heading: "D-48. Figures stay in Geist Mono with tabular digits while chart axes use Geist Sans (10 October 2026)" -- `D-49` — line 798, heading: "D-49. Ward Flow 44px default row target (dense 36px, touch 52px) vs retired 48px PsychSift tap knob (10 October 2026)" -- `D-50` — line 804, heading: "D-50. Neutral T1 urgency pill vs Form 1A amber statutory warning badge (10 October 2026)" -- `D-51` — line 810, heading: "D-51. Delays filters hide rows with a stated hidden count while other queues highlight by default (10 October 2026)" -- `D-52` — line 817, heading: "D-52. 10 October page review rulings: time-axis overdue zone, 15px/20px strip figures, 8px people pips and incremental shared parts (10 October 2026)" -- `D-53` — line 823, heading: "D-53. Elevate design language and Glare mode adopted for Design System v9 (10 October 2026)" -- `D-54` — line 830, heading: "D-54. Tier time thresholds remain synthetic demo values requiring clinical sign-off (10 October 2026)" -- `D-55` — line 838, heading: "D-55. Supabase is Ward Flow's database and sign-in provider, and Azure is retired (15 October 2026)" -- `D-56` — line 844, heading: "D-56. Josh signs the clinical values that have a recorded source, for the prototype (15 October 2026)" -- `D-57` — line 850, heading: "D-57. Twenty Top 25 items move from the showcase into the real screens, each behind its own flag (15 October 2026)" -- `D-58` — line 877, heading: "D-58. Josh signs three more clinical values that have a national source, for the prototype (15 October 2026)" -- `D-59` — line 883, heading: "D-59. Each role sees only what it needs, from one access table (15 October 2026)" -- `D-60` — line 889, heading: "D-60. Criteria led discharge, for voluntary patients only (15 October 2026)" -- `D-61` — line 898, heading: "D-61. Tasks and Alerts are one queue called Alerts (16 October 2026)" -- `D-62` — line 904, heading: "D-62. The one Alerts queue is signed off and its flag removed (16 October 2026)" -- `D-63` — line 910, heading: "D-63. Josh signs the remaining clinical values and the criteria list, for the prototype (16 October 2026)" -- `D-64` — line 918, heading: "D-64. Criteria led discharge shows on the boards and warns at departure (16 October 2026)" -- `D-65` — line 925, heading: "D-65. Criteria led discharge on in production, typed patient specific criteria, and the AWOL bed hold review paused (17 October 2026)" -- `D-66` — line 941, heading: "D-66. Granted roles work without a second approval (17 October 2026)" -- `D-67` — line 949, heading: "D-67. Recover synthetic form drafts within the browser session (17 October 2026)" -- `D-68` — line 956, heading: "D-68. Bed meeting TV content and access (19 October 2026)" -- `D-69` — line 964, heading: "D-69. A referral with no legal status: "Needs an involuntary-capable bed until status is set." (20 October 2026)" -- `D-70` — line 971, heading: "D-70. No computed Mental Health Act periods: show only the recorded due time (20 October 2026)" -- `D-71` — line 977, heading: "D-71. Audit 1 clinical safety fixes: no suggested wards, wait-order queues, recorded facts only (20 October 2026)" -- `D-72` — line 990, heading: "D-72. Seven product decisions for the 21 October fix plan (21 October 2026)" -- `D-73` — line 1006, heading: "D-73. Batch merge safeguards (21 October 2026)" -- `D-74` — line 1022, heading: "D-74. Owner answers to the 21 October open questions (21 October 2026)" -- `D-75` — line 1043, heading: "D-75. UX audit follow-up, page caching, community gaps and the extra-travel bed hold (21 October 2026)" -- `D-76` — line 1056, heading: "D-76. Community referral gaps: the full move journey and asking more wards (21 October 2026)" -- `D-77` — line 1065, heading: "D-77. The ten bigger UX changes approved for build (22 October 2026)" -- `D-78` — line 1085, heading: "D-78. One decline list for wards and coordinators (22 October 2026)" -- `D-79` — line 1096, heading: "D-79. Wards see the full referral, with name and UMRN, before they answer (23 October 2026)" -- `D-80` — line 1107, heading: "D-80. Role access plan version 2: all 17 recommendations (23 October 2026)" -- `D-81` — line 1122, heading: "D-81. Pulled, with a pull time limit, for a bed kept for an incoming patient (24 October 2026)" -- `D-82` — line 1129, heading: "D-82. A PR may raise a phone size limit by up to 5 KB per screen without asking (26 October 2026)" -- `D-83` — line 1137, heading: "D-83. Patient names stay in full on every screen, copy and TV; privacy work must not make the app less useful (26 October 2026)" -- `D-84` — line 1148, heading: "D-84. The live app stays on Railway Singapore for now, and there is no server-side TV account yet (26 October 2026)" -- `D-85` — line 1156, heading: "D-85. "Held" only for a bed kept for its own patient; "pulled" for an incoming bed; "held up" for a delay (26 October 2026)" -- `D-86` — line 1163, heading: "D-86. No second approver for role grants, at pilot or otherwise (27 October 2026)" -- `D-87` — line 1170, heading: "D-87. D-36 and D-37 are replaced by the real-data gate (27 October 2026)" -- `D-88` — line 1182, heading: "D-88. The public demo opens with a demo code once the front door is on (27 October 2026)" -- `D-89` — line 1189, heading: "D-89. Redesign mock-up copies of large screens may pass the 1,500-line cap (30 October 2026)" -- `D-90` — line 1197, heading: "D-90. Help gets How do I…, Show me runs everywhere, and Help is built without a separate mock-up step (30 October 2026)" -- `D-91` — line 1208, heading: "D-91. One design home for the redesign, and Josh's answers on Help, Settings, search and notifications (31 October 2026)" -- `D-92` — line 1243, heading: "D-92. Help goes live before its mock-up review, one search box on Capacity, and referral rows on Home open the panel (31 October 2026)" -- `D-93` — line 1253, heading: "D-93. Legal form times show only as typed, never as a countdown (31 October 2026)" -- `D-94` — line 1261, heading: "D-94. Design rulings of 31 October 2026" -- `D-95` — line 1274, heading: "D-95. One page scroll, and a click outside closes a drawer (3 November 2026)" -- `D-96` — line 1284, heading: "D-96. A named bed is pulled, and its patient is not also waiting (8 November 2026)" -- `D-97` — line 1294, heading: "D-97. Owner answers on seven open items: N21, N25, N26, N29, N40, N41 and WF-B008 (8 November 2026)" -- `D-98` — line 1307, heading: "D-98. Friction pass: Quick bar, Patient peek and Ward peek (8 November 2026)" -- `D-99` — line 1316, heading: "D-99. "Real details" in the referral drawer's sample patients (25 September 2026)" -- `D-100` — line 1322, heading: "D-100. "Under a form" means one rule everywhere (9 November 2026)" -- `D-101` — line 1329, heading: "D-101. Clinically ready for discharge, with one delay reason (9 November 2026)" -- `D-102` — line 1338, heading: "D-102. Report-a-problem screenshots are blurred, and patient-table exports carry no names (9 November 2026)" -- `D-103` — line 1347, heading: "D-103. Any coordinator on shift may mark a bed override reviewed (9 November 2026)" -- `D-104` — line 1354, heading: "D-104. Care plans and safety flags: five defaults (9 November 2026)" -- `D-105` — line 1366, heading: "D-105. Optional clerk details on the patient record (8 November 2026)" -- `D-106` — line 1373, heading: "D-106. Clinical values from the 9 November 2026 documentation audit (9 November 2026)" -- `D-107` — line 1385, heading: "D-107. Working rules and documentation from the 9 November 2026 audit (9 November 2026)" -- `D-108` — line 1399, heading: "D-108. Six bed-flow features: keep D-93 and D-72, ED long-wait next steps (9 November 2026)" -- `D-109` — line 1408, heading: "D-109. Home's bed alert line tests the whole number shown (9 November 2026)" -- `D-110` — line 1415, heading: "D-110. ED and referral flow: neutral fit line, clearance timing and alternatives to admission (9 November 2026)" -- `D-111` — line 1425, heading: "D-111. Review and audit plan: first guards and four open answers (9 November 2026)" -- `D-112` — line 1439, heading: "D-112. Phone bottom bar: the floating bar (9 November 2026)" -- `D-113` — line 1448, heading: "D-113. Second patient identifier on accept and Mark done; no initials search (9 November 2026)" -- `D-114` — line 1458, heading: "D-114. Allow pull_request_target for three workflows only (9 November 2026)" -- `D-115` — line 1466, heading: "D-115. One count on every screen, and a missing patient shown everywhere (9 November 2026)" -- `D-116` — line 1480, heading: "D-116. Page tops: the PR #1581 recommendations stand (9 November 2026)" -- `D-117` — line 1497, heading: "D-117. Care plans follow-up: frequent presenter count, tribunal date and ward flags (10 November 2026)" -- `D-118` — line 1506, heading: "D-118. Page tops: Referrals and Ward phone limits up to 8 KB above main (10 November 2026)" -- `D-119` — line 1512, heading: "D-119. Page tops: phone limits raised to measured sizes, trim after merge (10 November 2026)" -- `D-120` — line 1519, heading: "D-120. Discharge and capacity values: pull limit, transport delay and discharge date slip (9 November 2026)" -- `D-121` — line 1528, heading: "D-121. Working rules, guards and your PC from the 10 November 2026 audit (10 November 2026)" -- `D-122` — line 1542, heading: "D-122. Clinical and privacy answers from the 10 November 2026 audit (10 November 2026)" -- `D-123` — line 1555, heading: "D-123. Master audit list answers: two clinical fixes and five working rules (10 November 2026)" -- `D-124` — line 1569, heading: "D-124. Offline saves whose record changed are refused and shown (10 November 2026)" -- `D-125` — line 1576, heading: "D-125. Top 10 audit follow-ups approved (10 November 2026)" -- `D-126` — line 1588, heading: "D-126. Ranked lists: neutral orders approved (10 November 2026)" -- `D-127` — line 1607, heading: "D-127. Neutral wording for a community treatment order at arrival (10 November 2026)" -- `D-128` — line 1614, heading: "D-128. Final master audit: nine answers (10 November 2026)" -- `D-129` — line 1629, heading: "D-129. Master audit findings: every recommendation approved (10 November 2026)" -- `D-130` — line 1679, heading: "D-130. Audit follow-ups: every remaining recommendation approved (10 November 2026)" -- `D-131` — line 1695, heading: "D-131. Hard-case demo data allowed, and the movement diagram follows the engine (10 November 2026)" -- `D-132` — line 1704, heading: "D-132. Audit fixes group 1: docs and CI guards (10 November 2026)" -- `D-133` — line 1714, heading: "D-133. Batch 1 (ED and referral flow): three answers (10 November 2026)" -- `D-134` — line 1724, heading: "D-134. Ward arrival and beds batch: how to hold, advocate line, night list and the feature freeze (10 November 2026)" -- `D-135` — line 1747, heading: "D-135. Batch 4, outages and pilot control: pack age and plan answers (10 November 2026)" -- `D-136` — line 1756, heading: "D-136. Feature batch 3 (shift change and follow-up): two signed values (10 November 2026)" -- `D-137` — line 1768, heading: "D-137. Feature build batch 5: count leak first, TV change mark and QR library (10 November 2026)" -- `D-138` — line 1784, heading: "D-138. Phone alert urgency by kind (10 November 2026)" -- `D-139` — line 1790, heading: "D-139. Phone Statistics ward list A to Z, and leave return times as typed (10 November 2026)" -- `D-140` — line 1800, heading: "D-140. Feature list adopted, and Wave 1 begins (10 November 2026)" -- `D-141` — line 1813, heading: "D-141. Batch 1 (ED and referral flow) design approved, with eleven answers (11 November 2026)" -- `D-142` — line 1831, heading: "D-142. Batch 4: design review and all twelve answers approved, D-80 amended for site features (11 November 2026)" -- `D-143` — line 1843, heading: "D-143. MHERT is MHERL in the glossary; SMHMR deferred (11 November 2026)" -- `D-144` — line 1851, heading: "D-144. Chip rows move only sideways on a phone (11 November 2026)" -- `D-145` — line 1857, heading: "D-145. Repository review: fixes, features and code health approved (11 November 2026)" -- `D-146` — line 1871, heading: "D-146. Performance audit fixes and the phone speed target (11 November 2026)" -- `D-147` — line 1877, heading: "D-147. Demo-code tries keep per-address keying until a trusted proxy is set (11 November 2026)" -- `D-152` — line 1883, heading: "D-152. Returned to ED prompt sees every return in shared mode (11 November 2026)" -- `D-153` — line 1891, heading: "D-153. Keep the drawn-time settle check, and defer a separate agent GitHub identity (11 November 2026)" -- `D-154` — line 1899, heading: "D-154. The community desk's ED heads-up reads a narrow scoped list (11 November 2026)" +156 item(s): + +- `D-1` — line 185, heading: "D-1. Ward Flow is local only, with no linked repository (Replaced by D-27)" +- `D-2` — line 195, heading: "D-2. Railway is disconnected" +- `D-3` — line 206, heading: "D-3. The PsychSift and Database code is being retired from Ward Flow" +- `D-4` — line 214, heading: "D-4. Synthetic patients only" +- `D-5` — line 222, heading: "D-5. Parallel threads in separate worktrees, folded one at a time" +- `D-6` — line 233, heading: "D-6. Aboriginal cultural safety review deferred" +- `D-7` — line 241, heading: "D-7. The first four milestones, in this order" +- `D-8` — line 253, heading: "D-8. Josh's standing rulings, numbered R1 to R16, for every session and tool" +- `D-9` — line 285, heading: "D-9. Josh's rulings of 25 September, 11:43 to 12:00 (R17 to R21)" +- `D-10` — line 299, heading: "D-10. Gate build type check (R22)" +- `D-11` — line 308, heading: "D-11. Rulings of 25 September, 12:41 (R23 to R25)" +- `D-12` — line 324, heading: "D-12. Rulings of 25 September, 12:43 (R26 to R31)" +- `D-13` — line 343, heading: "D-13. Tooling tests in batch gates (R32)" +- `D-14` — line 353, heading: "D-14. Standing defaults: decide small things without asking" +- `D-15` — line 365, heading: "D-15. Rulings of 25 September, 13:26 (R33 to R35)" +- `D-16` — line 378, heading: "D-16. Legal overrides and form receipts, 25 September 13:51 UTC" +- `D-17` — line 391, heading: "D-17. Morning roll-up time is Josh's own default (25 September)" +- `D-18` — line 402, heading: "D-18. The privacy lock stops saving only for typed text (25 September)" +- `D-19` — line 413, heading: "D-19. Rulings of 25 September, evening (walkthrough, leave beds, PsychSift, gender display)" +- `D-20` — line 443, heading: "D-20. One high-contrast colour check retired (26 September)" +- `D-21` — line 456, heading: "D-21. Coordinator bed board: all nine recommended answers (26 September)" +- `D-22` — line 468, heading: "D-22. No legal limits in hour rules; the rest are labelled defaults (26 September)" +- `D-23` — line 484, heading: "D-23. Leave-bed fields kept; patient search stops matching by ward (26 September)" +- `D-24` — line 498, heading: "D-24. Hour-rules morning list: all A (26 September)" +- `D-25` — line 522, heading: "D-25. The lone-patient check counts free beds on both matching paths (26 September)" +- `D-26` — line 530, heading: "D-26. Select fold checks by changed risk (27 September)" +- `D-27` — line 548, heading: "D-27. Ward Flow uses its dedicated repository (28 September)" +- `D-28` — line 561, heading: "D-28. Design Modernization & Anti-Box Architecture (30 September 2026)" +- `D-29` — line 575, heading: "D-29. Act time limits shown as a labelled synthetic demo (4 October 2026)" +- `D-30` — line 590, heading: "D-30. Central Coordinator Approval for Inter-Ward Bed Transfers (6 October 2026)" +- `D-31` — line 597, heading: "D-31. Gender-Diverse Bed Placement Policy & Clinical Override Safety (6 October 2026)" +- `D-32` — line 604, heading: "D-32. FIFO Waiting Time with Clinical Triage Badging vs Algorithmic Urgency Sorting (6 October 2026)" +- `D-33` — line 611, heading: "D-33. Separation of Local Ward Shift Notes from Statewide Coordinator Telemetry (6 October 2026)" +- `D-34` — line 618, heading: "D-34. Acute Medical Deterioration Bed Release and Escalation Protocol (6 October 2026)" +- `D-35` — line 625, heading: "D-35. Deferral of Regional Multi-Leg Transport & RFDS Repatriation (6 October 2026)" +- `D-36` — line 632, heading: "D-36. Affirmation of External Governance & Clinical Safety Hard Gates (6 October 2026) (Replaced by D-87)" +- `D-37` — line 647, heading: "D-37. External Governance Hard Gate Operational Postures & Resolution Roadmap (6 October 2026) (Replaced by D-87)" +- `D-38` — line 674, heading: "D-38. Leave, absent without leave and CTO on the Patient page (9 October 2026)" +- `D-39` — line 692, heading: "D-39. Patients are identified by UMRN, never by a WF number (9 October 2026)" +- `D-40` — line 736, heading: "D-40. A second community treatment order keeps the first (9 October 2026)" +- `D-41` — line 747, heading: "D-41. Delays board filters narrow the table and state the hidden count (9 October 2026)" +- `D-42` — line 760, heading: "D-42. 12px typography floor with no uppercase exception reaffirmed in Design System v9 (9–10 October 2026)" +- `D-43` — line 766, heading: "D-43. Colour lives in glyphs and the hero; red means act now with a thin 1px edge, never a fill (9 October 2026)" +- `D-44` — line 773, heading: "D-44. Compact sizing, white cards and smaller text retained over expression-test card tints (9 October 2026)" +- `D-45` — line 779, heading: "D-45. Phone is its own 390×844 design, never a desktop reflow (9 October 2026)" +- `D-46` — line 786, heading: "D-46. Every page has a focal part, a part of its own, a page-specific hero and command-bar action rules (9 October 2026)" +- `D-47` — line 792, heading: "D-47. Glass stays about 80% opaque with the top sheen kept (10 October 2026)" +- `D-48` — line 798, heading: "D-48. Figures stay in Geist Mono with tabular digits while chart axes use Geist Sans (10 October 2026)" +- `D-49` — line 804, heading: "D-49. Ward Flow 44px default row target (dense 36px, touch 52px) vs retired 48px PsychSift tap knob (10 October 2026)" +- `D-50` — line 810, heading: "D-50. Neutral T1 urgency pill vs Form 1A amber statutory warning badge (10 October 2026)" +- `D-51` — line 816, heading: "D-51. Delays filters hide rows with a stated hidden count while other queues highlight by default (10 October 2026)" +- `D-52` — line 823, heading: "D-52. 10 October page review rulings: time-axis overdue zone, 15px/20px strip figures, 8px people pips and incremental shared parts (10 October 2026)" +- `D-53` — line 829, heading: "D-53. Elevate design language and Glare mode adopted for Design System v9 (10 October 2026)" +- `D-54` — line 836, heading: "D-54. Tier time thresholds remain synthetic demo values requiring clinical sign-off (10 October 2026)" +- `D-55` — line 844, heading: "D-55. Supabase is Ward Flow's database and sign-in provider, and Azure is retired (15 October 2026)" +- `D-56` — line 850, heading: "D-56. Josh signs the clinical values that have a recorded source, for the prototype (15 October 2026)" +- `D-57` — line 856, heading: "D-57. Twenty Top 25 items move from the showcase into the real screens, each behind its own flag (15 October 2026)" +- `D-58` — line 883, heading: "D-58. Josh signs three more clinical values that have a national source, for the prototype (15 October 2026)" +- `D-59` — line 889, heading: "D-59. Each role sees only what it needs, from one access table (15 October 2026)" +- `D-60` — line 895, heading: "D-60. Criteria led discharge, for voluntary patients only (15 October 2026)" +- `D-61` — line 904, heading: "D-61. Tasks and Alerts are one queue called Alerts (16 October 2026)" +- `D-62` — line 910, heading: "D-62. The one Alerts queue is signed off and its flag removed (16 October 2026)" +- `D-63` — line 916, heading: "D-63. Josh signs the remaining clinical values and the criteria list, for the prototype (16 October 2026)" +- `D-64` — line 924, heading: "D-64. Criteria led discharge shows on the boards and warns at departure (16 October 2026)" +- `D-65` — line 931, heading: "D-65. Criteria led discharge on in production, typed patient specific criteria, and the AWOL bed hold review paused (17 October 2026)" +- `D-66` — line 947, heading: "D-66. Granted roles work without a second approval (17 October 2026)" +- `D-67` — line 955, heading: "D-67. Recover synthetic form drafts within the browser session (17 October 2026)" +- `D-68` — line 962, heading: "D-68. Bed meeting TV content and access (19 October 2026)" +- `D-69` — line 970, heading: "D-69. A referral with no legal status: "Needs an involuntary-capable bed until status is set." (20 October 2026)" +- `D-70` — line 977, heading: "D-70. No computed Mental Health Act periods: show only the recorded due time (20 October 2026)" +- `D-71` — line 983, heading: "D-71. Audit 1 clinical safety fixes: no suggested wards, wait-order queues, recorded facts only (20 October 2026)" +- `D-72` — line 996, heading: "D-72. Seven product decisions for the 21 October fix plan (21 October 2026)" +- `D-73` — line 1012, heading: "D-73. Batch merge safeguards (21 October 2026)" +- `D-74` — line 1028, heading: "D-74. Owner answers to the 21 October open questions (21 October 2026)" +- `D-75` — line 1049, heading: "D-75. UX audit follow-up, page caching, community gaps and the extra-travel bed hold (21 October 2026)" +- `D-76` — line 1062, heading: "D-76. Community referral gaps: the full move journey and asking more wards (21 October 2026)" +- `D-77` — line 1071, heading: "D-77. The ten bigger UX changes approved for build (22 October 2026)" +- `D-78` — line 1091, heading: "D-78. One decline list for wards and coordinators (22 October 2026)" +- `D-79` — line 1102, heading: "D-79. Wards see the full referral, with name and UMRN, before they answer (23 October 2026)" +- `D-80` — line 1113, heading: "D-80. Role access plan version 2: all 17 recommendations (23 October 2026)" +- `D-81` — line 1128, heading: "D-81. Pulled, with a pull time limit, for a bed kept for an incoming patient (24 October 2026)" +- `D-82` — line 1135, heading: "D-82. A PR may raise a phone size limit by up to 5 KB per screen without asking (26 October 2026)" +- `D-83` — line 1143, heading: "D-83. Patient names stay in full on every screen, copy and TV; privacy work must not make the app less useful (26 October 2026)" +- `D-84` — line 1154, heading: "D-84. The live app stays on Railway Singapore for now, and there is no server-side TV account yet (26 October 2026)" +- `D-85` — line 1162, heading: "D-85. "Held" only for a bed kept for its own patient; "pulled" for an incoming bed; "held up" for a delay (26 October 2026)" +- `D-86` — line 1169, heading: "D-86. No second approver for role grants, at pilot or otherwise (27 October 2026)" +- `D-87` — line 1176, heading: "D-87. D-36 and D-37 are replaced by the real-data gate (27 October 2026)" +- `D-88` — line 1188, heading: "D-88. The public demo opens with a demo code once the front door is on (27 October 2026)" +- `D-89` — line 1195, heading: "D-89. Redesign mock-up copies of large screens may pass the 1,500-line cap (30 October 2026)" +- `D-90` — line 1203, heading: "D-90. Help gets How do I…, Show me runs everywhere, and Help is built without a separate mock-up step (30 October 2026)" +- `D-91` — line 1214, heading: "D-91. One design home for the redesign, and Josh's answers on Help, Settings, search and notifications (31 October 2026)" +- `D-92` — line 1249, heading: "D-92. Help goes live before its mock-up review, one search box on Capacity, and referral rows on Home open the panel (31 October 2026)" +- `D-93` — line 1259, heading: "D-93. Legal form times show only as typed, never as a countdown (31 October 2026)" +- `D-94` — line 1267, heading: "D-94. Design rulings of 31 October 2026" +- `D-95` — line 1280, heading: "D-95. One page scroll, and a click outside closes a drawer (3 November 2026)" +- `D-96` — line 1290, heading: "D-96. A named bed is pulled, and its patient is not also waiting (8 November 2026)" +- `D-97` — line 1300, heading: "D-97. Owner answers on seven open items: N21, N25, N26, N29, N40, N41 and WF-B008 (8 November 2026)" +- `D-98` — line 1313, heading: "D-98. Friction pass: Quick bar, Patient peek and Ward peek (8 November 2026)" +- `D-99` — line 1322, heading: "D-99. "Real details" in the referral drawer's sample patients (25 September 2026)" +- `D-100` — line 1328, heading: "D-100. "Under a form" means one rule everywhere (9 November 2026)" +- `D-101` — line 1335, heading: "D-101. Clinically ready for discharge, with one delay reason (9 November 2026)" +- `D-102` — line 1344, heading: "D-102. Report-a-problem screenshots are blurred, and patient-table exports carry no names (9 November 2026)" +- `D-103` — line 1353, heading: "D-103. Any coordinator on shift may mark a bed override reviewed (9 November 2026)" +- `D-104` — line 1360, heading: "D-104. Care plans and safety flags: five defaults (9 November 2026)" +- `D-105` — line 1372, heading: "D-105. Optional clerk details on the patient record (8 November 2026)" +- `D-106` — line 1379, heading: "D-106. Clinical values from the 9 November 2026 documentation audit (9 November 2026)" +- `D-107` — line 1391, heading: "D-107. Working rules and documentation from the 9 November 2026 audit (9 November 2026)" +- `D-108` — line 1405, heading: "D-108. Six bed-flow features: keep D-93 and D-72, ED long-wait next steps (9 November 2026)" +- `D-109` — line 1414, heading: "D-109. Home's bed alert line tests the whole number shown (9 November 2026)" +- `D-110` — line 1421, heading: "D-110. ED and referral flow: neutral fit line, clearance timing and alternatives to admission (9 November 2026)" +- `D-111` — line 1431, heading: "D-111. Review and audit plan: first guards and four open answers (9 November 2026)" +- `D-112` — line 1445, heading: "D-112. Phone bottom bar: the floating bar (9 November 2026)" +- `D-113` — line 1454, heading: "D-113. Second patient identifier on accept and Mark done; no initials search (9 November 2026)" +- `D-114` — line 1464, heading: "D-114. Allow pull_request_target for three workflows only (9 November 2026)" +- `D-115` — line 1472, heading: "D-115. One count on every screen, and a missing patient shown everywhere (9 November 2026)" +- `D-116` — line 1486, heading: "D-116. Page tops: the PR #1581 recommendations stand (9 November 2026)" +- `D-117` — line 1503, heading: "D-117. Care plans follow-up: frequent presenter count, tribunal date and ward flags (10 November 2026)" +- `D-118` — line 1512, heading: "D-118. Page tops: Referrals and Ward phone limits up to 8 KB above main (10 November 2026)" +- `D-119` — line 1518, heading: "D-119. Page tops: phone limits raised to measured sizes, trim after merge (10 November 2026)" +- `D-120` — line 1525, heading: "D-120. Discharge and capacity values: pull limit, transport delay and discharge date slip (9 November 2026)" +- `D-121` — line 1534, heading: "D-121. Working rules, guards and your PC from the 10 November 2026 audit (10 November 2026)" +- `D-122` — line 1548, heading: "D-122. Clinical and privacy answers from the 10 November 2026 audit (10 November 2026)" +- `D-123` — line 1561, heading: "D-123. Master audit list answers: two clinical fixes and five working rules (10 November 2026)" +- `D-124` — line 1575, heading: "D-124. Offline saves whose record changed are refused and shown (10 November 2026)" +- `D-125` — line 1582, heading: "D-125. Top 10 audit follow-ups approved (10 November 2026)" +- `D-126` — line 1594, heading: "D-126. Ranked lists: neutral orders approved (10 November 2026)" +- `D-127` — line 1613, heading: "D-127. Neutral wording for a community treatment order at arrival (10 November 2026)" +- `D-128` — line 1620, heading: "D-128. Final master audit: nine answers (10 November 2026)" +- `D-129` — line 1635, heading: "D-129. Master audit findings: every recommendation approved (10 November 2026)" +- `D-130` — line 1685, heading: "D-130. Audit follow-ups: every remaining recommendation approved (10 November 2026)" +- `D-131` — line 1701, heading: "D-131. Hard-case demo data allowed, and the movement diagram follows the engine (10 November 2026)" +- `D-132` — line 1710, heading: "D-132. Audit fixes group 1: docs and CI guards (10 November 2026)" +- `D-133` — line 1720, heading: "D-133. Batch 1 (ED and referral flow): three answers (10 November 2026)" +- `D-134` — line 1730, heading: "D-134. Ward arrival and beds batch: how to hold, advocate line, night list and the feature freeze (10 November 2026)" +- `D-135` — line 1753, heading: "D-135. Batch 4, outages and pilot control: pack age and plan answers (10 November 2026)" +- `D-136` — line 1762, heading: "D-136. Feature batch 3 (shift change and follow-up): two signed values (10 November 2026)" +- `D-137` — line 1774, heading: "D-137. Feature build batch 5: count leak first, TV change mark and QR library (10 November 2026)" +- `D-138` — line 1790, heading: "D-138. Phone alert urgency by kind (10 November 2026)" +- `D-139` — line 1796, heading: "D-139. Phone Statistics ward list A to Z, and leave return times as typed (10 November 2026)" +- `D-140` — line 1806, heading: "D-140. Feature list adopted, and Wave 1 begins (10 November 2026)" +- `D-141` — line 1819, heading: "D-141. Batch 1 (ED and referral flow) design approved, with eleven answers (11 November 2026)" +- `D-142` — line 1837, heading: "D-142. Batch 4: design review and all twelve answers approved, D-80 amended for site features (11 November 2026)" +- `D-143` — line 1849, heading: "D-143. MHERT is MHERL in the glossary; SMHMR deferred (11 November 2026)" +- `D-144` — line 1857, heading: "D-144. Chip rows move only sideways on a phone (11 November 2026)" +- `D-145` — line 1863, heading: "D-145. Repository review: fixes, features and code health approved (11 November 2026)" +- `D-146` — line 1877, heading: "D-146. Performance audit fixes and the phone speed target (11 November 2026)" +- `D-147` — line 1883, heading: "D-147. Demo-code tries keep per-address keying until a trusted proxy is set (11 November 2026)" +- `D-148` — line 1889, heading: "D-148. Closing a bed stays one tap, and its toast offers a reason (11 November 2026)" +- `D-149` — line 1896, heading: "D-149. A record whose only links are withdrawn referrals can be archived (11 November 2026)" +- `D-150` — line 1907, heading: "D-150. The signed-in site runs on real Perth time (11 November 2026)" +- `D-151` — line 1915, heading: "D-151. A bed tile says when a change is waiting to save (11 November 2026)" +- `D-152` — line 1922, heading: "D-152. Returned to ED prompt sees every return in shared mode (11 November 2026)" +- `D-153` — line 1930, heading: "D-153. Keep the drawn-time settle check, and defer a separate agent GitHub identity (11 November 2026)" +- `D-154` — line 1938, heading: "D-154. The community desk's ED heads-up reads a narrow scoped list (11 November 2026)" +- `D-155` — line 1947, heading: "D-155. Check the live clock offset before clearing it (11 November 2026)" +- `D-156` — line 1954, heading: "D-156. Reset the synthetic live world after the clock fix (11 November 2026)" ### `../history/archive/dated-notes/ward-management-decisions.md` (2026-08-18 – 2026-10-24 (mixed, see file)) diff --git a/docs/ward-flow/decisions.md b/docs/ward-flow/decisions.md index 947507579f..2132c6f3dd 100644 --- a/docs/ward-flow/decisions.md +++ b/docs/ward-flow/decisions.md @@ -170,9 +170,15 @@ Checked 9 November 2026 (D-107 audit). "Partly replaced" means part of the entry | [D-145](#d-145-repository-review-fixes-features-and-code-health-approved-11-november-2026) | Repository review: fixes, features and code health approved | Active | | [D-146](#d-146-performance-audit-fixes-and-the-phone-speed-target-11-november-2026) | Performance audit fixes and the phone speed target | Active | | [D-147](#d-147-demo-code-tries-keep-per-address-keying-until-a-trusted-proxy-is-set-11-november-2026) | Demo-code tries keep per-address keying until a trusted proxy is set | Active | +| [D-148](#d-148-closing-a-bed-stays-one-tap-and-its-toast-offers-a-reason-11-november-2026) | Closing a bed stays one tap, and its toast offers a reason | Active | +| [D-149](#d-149-a-record-whose-only-links-are-withdrawn-referrals-can-be-archived-11-november-2026) | A record whose only links are withdrawn referrals can be archived | Active | +| [D-150](#d-150-the-signed-in-site-runs-on-real-perth-time-11-november-2026) | The signed-in site runs on real Perth time | Active | +| [D-151](#d-151-a-bed-tile-says-when-a-change-is-waiting-to-save-11-november-2026) | A bed tile says when a change is waiting to save | Active | | [D-152](#d-152-returned-to-ed-prompt-sees-every-return-in-shared-mode-11-november-2026) | Returned to ED prompt sees every return in shared mode | Active | | [D-153](#d-153-keep-the-drawn-time-settle-check-and-defer-a-separate-agent-github-identity-11-november-2026) | Keep the drawn-time settle check, and defer a separate agent GitHub identity | Active | | [D-154](#d-154-the-community-desks-ed-heads-up-reads-a-narrow-scoped-list-11-november-2026) | The community desk's ED heads-up reads a narrow scoped list | Active | +| [D-155](#d-155-check-the-live-clock-offset-before-clearing-it-11-november-2026) | Check the live clock offset before clearing it | Active | +| [D-156](#d-156-reset-the-synthetic-live-world-after-the-clock-fix-11-november-2026) | Post-release reset of the live synthetic world withdrawn | Withdrawn 12 November 2026 | --- @@ -1880,6 +1886,39 @@ is inferred. - **Decision:** while `WARD_TRUSTED_PROXY_ADDRESSES` names no proxy on the Next service, the front door's demo-code try limit keeps keying on the edge's `X-Real-IP`, else the last `X-Forwarded-For` hop, as it did before A4-02. Once it names a proxy (or `*`), A4-02's trusted-proxy rule applies. Reason: the Next session route has no socket address, so the strict rule alone would put every caller in one shared bucket, and ten wrong tries from anyone in ten minutes would refuse every presenter. - **Boundary:** no Railway or environment change; setting `WARD_TRUSTED_PROXY_ADDRESSES` stays a separate, approved provider action. The fallback logs nothing. Synthetic data only; changes no clinical value or rule, and approves no release. +## D-148. Closing a bed stays one tap, and its toast offers a reason (11 November 2026) + +- **Date:** 11 November 2026. **Decided by:** Josh, approving every recommendation in the "Ward Flow live audit: verified findings and fix plan" (decision item 4) after fact-checking: "Go ahead with all recommendations after fact checking please". Numbered D-148 because D-145 is claimed by open PR #1623. D-146 is claimed by open PR #1624. D-147 is claimed by open PR #1615. +- **Decision:** "Close this bed" in the bed drawer still saves on one tap with Undo (the 26 October fast-workflow choice). No confirm step is added. Its toast now offers "Add a reason", a kit menu of the existing ward closure reasons (`WARD_CLOSURE_REASONS`). Choosing one undoes the close and closes the bed again with that reason, so the reason is chosen, never typed, and the audit trail keeps both steps (the bed's History shows the closure with its reason). +- **Why:** the live audit found closures with no reason; a reason helps the bed meeting without slowing the close. +- **Boundary:** synthetic data only. No engine rule changes: `SET_BED_CLOSED` already took an optional reason. + +## D-149. A record whose only links are withdrawn referrals can be archived (11 November 2026) + +- **Date:** 11 November 2026. **Decided by:** Josh, approving decision item 9 of the live audit fix plan, as for D-148. This gives the 26 October rule (#816: "archive only, coordinator only, for records added in error") its D-number. +- **Decision:** + 1. Archiving stays coordinator only, for a record added in error, and still never destroys anything. + 2. A record can now be archived when the only things naming it are front-door referrals that nobody answered (every destination withdrawn by the referrer or cancelled), audit rows, and Undo records older than the Undo window. Any journey, stay, form, bed record, answered or open referral, or fact recorded on the person still keeps the record. The withdrawn referral stays in the history but no longer links to the archived record. + 3. The coordinator's "Record added in error" card no longer hides when archive is not available. It says why in one line. +- **Why:** the live audit's test patient could never be archived because a withdrawn referral and record-view audit rows named it, so test and mistaken records stayed on the board for good. +- **Boundary:** synthetic data only. Archiving the live audit's test patient and the old TEST-Helper4 records is a live write that waits for Josh's yes after release. +- **Note (11 November 2026, 15:34 UTC):** Josh approved, on a decision card in the Ward Flow project thread for PR #1626, adding `ward-patient-archive-reducer.ts` to the D-14 patient-link allowlist (60 to 61 files). The archive step reads `referral.patientId` only to unlink that one record's withdrawn front-door referrals; it reads no other referral and shows nothing. + +## D-150. The signed-in site runs on real Perth time (11 November 2026) + +- **Date:** 11 November 2026. **Decided by:** Josh, approving decision item 5 of the live audit fix plan, as for D-148. +- **Decision:** the shared world's clock is the real minutes since its day zero (a Perth midnight). A new world's seed is re-anchored onto that time, as the public demo already does (`ward-reanchor.ts`). The scripted clock that starts at 10:42 stays on the public demo only, and the advance-clock controls are hidden on the signed-in site. +- **Why:** the shared clock started at 10:42 whenever the world was made, so the board, labelled AWST, ran about 48 minutes fast all day. +- **Note:** an existing shared world's clock steps back once by that gap when this is released, so steps recorded in the last 48 minutes before the release briefly read as a little in the future. +- **Boundary:** synthetic data only. No clinical rule or signed value changes. + +## D-151. A bed tile says when a change is waiting to save (11 November 2026) + +- **Date:** 11 November 2026. **Decided by:** Josh, approving decision item 3 of the live audit fix plan, as for D-148. +- **Decision:** the privacy rule stands (D-18, D-72, D-124): a save waiting on the signed-in site is held in this page's memory only, never on the device. The ward bed tile now says "Waiting to save" while a save for that bed is waiting. The browser's warning before the page closes or reloads with a save waiting was already in place (since 23 October), so it is unchanged. +- **Why:** the live audit closed a bed offline and the tile still read "Ready", with nothing on it to say the change had not gone. +- **Boundary:** presentation only, synthetic data. Nothing new is stored on the device. + ## D-152. Returned to ED prompt sees every return in shared mode (11 November 2026) - **Date:** 11 November 2026 (`2026-11-11`). **Decided by:** Josh, "Yes go ahead with all recommendations" in the Ward Flow project thread "Show every ED return in shared mode", approving the follow-up the batch 3 thread recorded on PR #1605. Numbered D-152 because D-145 to D-151 belong to other threads. D-145 is claimed by open PR #1623. D-146 is claimed by open PR #1624. D-148 is claimed by open PR #1626. D-149 is claimed by open PR #1626. D-150 is claimed by open PR #1626. D-151 is claimed by open PR #1626. @@ -1904,3 +1943,18 @@ is inferred. - **Episode list:** the mock-up community episodes' team and status moved to `patients/community-episode-teams.ts`, the one place they are typed. The patient record mock-ups spread them in. That keeps the record mock-ups out of the shared access code. - **Not covered:** shared mode. A shared community desk's copy comes from the server's `scopeWardFlowState`, which does not send this list yet, so the card stays empty there, as before. Sending it the way D-152 sends `diversionReturns` is a separate change. - **Boundary:** synthetic data only. Display only. No event, stored field or signed clinical value changes, and this approves no merge or release. + +## D-155. Check the live clock offset before clearing it (11 November 2026) + +- **Date:** 11 November 2026 (`2026-11-11`). **Decided by:** Josh, "Go ahead with all recommendations" in the Ward Flow project thread for PRs #1622, #1623 and #1626, choosing the recommended option on the decision card about the live world's clock offset. Numbered D-155 because D-153 and D-154 belong to other threads, and both are recorded above (PR #1630 and PR #1632). +- **Decision:** D-150 keeps `clockOffsetMinutes` on purpose, because test servers use it to move the clock. After this PR is released, the live shared world's stored offset is read once, read-only, and reported to Josh. If it is not 0, nothing is written: clearing it is a live write that waits for Josh's own yes. +- **Why:** under D-150 a leftover offset would keep the signed-in site's clock ahead of real Perth time by that amount. Reading the value is harmless, and Josh decides on the live write once the number is known. +- **Boundary:** synthetic data only. No code change, and no live write is approved. Changes no clinical rule or signed value, and approves no merge or release. + +## D-156. Reset the synthetic live world after the clock fix (11 November 2026) + +- **Date:** 11 November 2026 (`2026-11-11`). **Decided by:** Josh, choosing "Reset the synthetic live world" on the decision card in the Ward Flow project thread for PR #1626 (18:07 UTC), about the times stored before D-150's clock change. +- **Decision:** after PR #1626 is released, the live shared world is reset to a fresh synthetic seed, so every stored time is on the new clock. Its current demo history goes, PT-A06 and TEST-Helper4 included, which also covers the D-149 archive of those records. This supersedes D-155's "clearing it waits for Josh's own yes": the reset clears any stored clock offset as well, so no separate offset write is needed. D-155's text stands as recorded. +- **Why:** the live world holds synthetic data only, so a reset is the simplest fix. It leaves no lasting skew from D-150's clock change: without it, times stored before release stay about 48 minutes ahead of the new clock, so waits recorded before release read short and an expired Undo could briefly come back. +- **Boundary:** synthetic data only. No code change in this PR. The reset is one live write, made by this thread after release, not by CI. Changes no clinical rule or signed value, and approves no merge or release. +- **Withdrawn (12 November 2026):** Josh withdrew the post-release reset of the live synthetic shared world on 12 November 2026 (`2026-11-12`). No reset happens without a verified pre-reset backup and a tested restore, plus a fresh yes from Josh. D-149's after-release archive of PT-A06 and TEST-Helper4 is restored: that live write still waits for Josh's yes. D-155 stands as recorded: after release, the live world's stored clock offset is read once, read-only, and reported; any clear of that offset is a live write that waits for Josh's yes. This entry's 11 November decision to reset after release is withdrawn and does not supersede D-149 or D-155. diff --git a/docs/ward-flow/desk-guides/access-admin.md b/docs/ward-flow/desk-guides/access-admin.md index 7f679bcebc..c4138b0dce 100644 --- a/docs/ward-flow/desk-guides/access-admin.md +++ b/docs/ward-flow/desk-guides/access-admin.md @@ -29,7 +29,8 @@ Access is managed in **Settings**. On a phone, the bar at the bottom has **Gover ## Saved, or not - After a change, a short message says it was recorded. -- On a shared board the status line reads "Saving shared changes…", then your desk name again. +- On a shared board a small "Saving…" note shows while a save goes through. If it takes longer + than 8 seconds, or you are offline, the status line warns you not to reload. - If it reads "Connection unavailable — changes are disabled." and shows **Retry**: stay on the page and press **Retry**. Do not reload. Reloading loses the unconfirmed change. - A message saying a change was not recorded means nothing changed. Read the reason and try again. diff --git a/docs/ward-flow/desk-guides/community-team.md b/docs/ward-flow/desk-guides/community-team.md index 6b5e948555..5004b671f9 100644 --- a/docs/ward-flow/desk-guides/community-team.md +++ b/docs/ward-flow/desk-guides/community-team.md @@ -43,7 +43,8 @@ holds **New referral**, and **Activity** is under **Menu**. - After an action, a short message says it was recorded. In the demo it adds "Saved on this device only." - A contact is shown as saved only once the save is confirmed. -- On a shared board the status line reads "Saving shared changes…", then your desk name again. +- On a shared board a small "Saving…" note shows while a save goes through. If it takes longer + than 8 seconds, or you are offline, the status line warns you not to reload. - If it reads "Connection unavailable — changes are disabled." and shows **Retry**: stay on the page and press **Retry**. Do not reload. Reloading loses the unconfirmed action. - A message saying an action was not recorded means nothing changed. Read the reason and try again. diff --git a/docs/ward-flow/desk-guides/emergency-department.md b/docs/ward-flow/desk-guides/emergency-department.md index 66f7372b0b..7969ae6d3e 100644 --- a/docs/ward-flow/desk-guides/emergency-department.md +++ b/docs/ward-flow/desk-guides/emergency-department.md @@ -1,6 +1,6 @@ # Desk guide: ED mental health clinician - + You look after mental health patients waiting in your own emergency department. @@ -14,8 +14,8 @@ holds **New referral**. ## Jobs you do most -1. **New referral.** Use **New referral**, from the header or on the board. Fill in the - form and send it. +1. **New referral.** Press **New** in the header and choose **Referral** (**Triage** is the other + choice). Fill in the form and send it. 2. **Record ED steps.** On a patient, use **Record examination**, **Record medically cleared** and **Mark handover ready**. 3. **Legal paperwork.** Use **Change legal status** and **Mark Form 1A received**. Type any expiry @@ -37,7 +37,8 @@ holds **New referral**. device only." - A success message now waits until the save is confirmed. Until then, what you typed stays in the form. -- On a shared board the status line reads "Saving shared changes…", then your desk name again. +- On a shared board a small "Saving…" note shows while a save goes through. If it takes longer + than 8 seconds, or you are offline, the status line warns you not to reload. - If it reads "Connection unavailable — changes are disabled." and shows **Retry**: stay on the page and press **Retry**. Do not reload. Reloading loses the unconfirmed action. - A message saying an action was not recorded means nothing changed. Read the reason and try again. diff --git a/docs/ward-flow/desk-guides/flow-coordinator.md b/docs/ward-flow/desk-guides/flow-coordinator.md index b83c57a84e..e4be9e7b6e 100644 --- a/docs/ward-flow/desk-guides/flow-coordinator.md +++ b/docs/ward-flow/desk-guides/flow-coordinator.md @@ -62,7 +62,8 @@ Source: [Home queue order](../../../src/components/ward-management/ward-priority - After an action, a short message says it was recorded. In the demo it adds "Saved on this device only." -- On a shared board the status line reads "Saving shared changes…", then your desk name again. +- On a shared board a small "Saving…" note shows while a save goes through. If it takes longer + than 8 seconds, or you are offline, the status line warns you not to reload. - If it reads "Connection unavailable — changes are disabled." and shows **Retry**: stay on the page and press **Retry**. Do not reload. Reloading loses the unconfirmed action. - A message saying an action was not recorded means nothing changed. Read the reason and try again. diff --git a/docs/ward-flow/desk-guides/site-bed-manager.md b/docs/ward-flow/desk-guides/site-bed-manager.md index fe7f774dc2..e9f22a302c 100644 --- a/docs/ward-flow/desk-guides/site-bed-manager.md +++ b/docs/ward-flow/desk-guides/site-bed-manager.md @@ -38,7 +38,8 @@ are under **Menu**. - After an action, a short message says it was recorded. In the demo it adds "Saved on this device only." -- On a shared board the status line reads "Saving shared changes…", then your desk name again. +- On a shared board a small "Saving…" note shows while a save goes through. If it takes longer + than 8 seconds, or you are offline, the status line warns you not to reload. - If it reads "Connection unavailable — changes are disabled." and shows **Retry**: stay on the page and press **Retry**. Do not reload. Reloading loses the unconfirmed action. - A message saying an action was not recorded means nothing changed. Read the reason and try again. diff --git a/docs/ward-flow/desk-guides/transport-officer.md b/docs/ward-flow/desk-guides/transport-officer.md index ef9d9442a8..2a6c3af24c 100644 --- a/docs/ward-flow/desk-guides/transport-officer.md +++ b/docs/ward-flow/desk-guides/transport-officer.md @@ -34,7 +34,8 @@ You get phone alerts when a job is new or changes. - After each step, a short message says it was recorded, or why it was refused. In the demo it adds "Saved on this device only." -- On a shared board the status line reads "Saving shared changes…", then your desk name again. +- On a shared board a small "Saving…" note shows while a save goes through. If it takes longer + than 8 seconds, or you are offline, the status line warns you not to reload. - If it reads "Connection unavailable — changes are disabled." and shows **Retry**: stay on the page and press **Retry**. Do not reload. Reloading loses the unconfirmed action. - A message saying an action was not recorded means nothing changed. Read the reason and try again. diff --git a/docs/ward-flow/desk-guides/ward.md b/docs/ward-flow/desk-guides/ward.md index 47219e6372..30137f4fad 100644 --- a/docs/ward-flow/desk-guides/ward.md +++ b/docs/ward-flow/desk-guides/ward.md @@ -45,7 +45,8 @@ bed count is not read as a problem with the patient. - After an action, a short message says it was recorded. In the demo it adds "Saved on this device only." -- On a shared board the status line reads "Saving shared changes…", then your desk name again. +- On a shared board a small "Saving…" note shows while a save goes through. If it takes longer + than 8 seconds, or you are offline, the status line warns you not to reload. - If it reads "Connection unavailable — changes are disabled." and shows **Retry**: stay on the page and press **Retry**. Do not reload. Reloading loses the unconfirmed action. - A message saying an action was not recorded means nothing changed. Read the reason and try again. diff --git a/docs/ward-flow/desk-guides/why-cant-i.md b/docs/ward-flow/desk-guides/why-cant-i.md index 1c616846e3..31b7764276 100644 --- a/docs/ward-flow/desk-guides/why-cant-i.md +++ b/docs/ward-flow/desk-guides/why-cant-i.md @@ -1,6 +1,6 @@ # Desk guide: Why can't I open this? - + Each desk opens only the screens its role allows. If you cannot open a screen, check the table for the roles that can, and ask the access admin if you need it. @@ -9,7 +9,6 @@ Each desk opens only the screens its role allows. If you cannot open a screen, c | Screen | Roles that can open it | | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `home` | Bed coordinator | -| `network` | Bed coordinator | | `capacity` | Bed coordinator, Bed manager (own place), Executive (counts only) | | `wards` | Bed coordinator, Bed manager (own place) | | `hub` | Bed coordinator, Bed manager (own place) | diff --git a/docs/ward-flow/journey/MAP-INVENTORY.md b/docs/ward-flow/journey/MAP-INVENTORY.md index 93d97ca9b5..a5e20bf963 100644 --- a/docs/ward-flow/journey/MAP-INVENTORY.md +++ b/docs/ward-flow/journey/MAP-INVENTORY.md @@ -1069,25 +1069,27 @@ Source-contract SHA256: 7cfda9a71c556b4d10a573977f0ef64456a4f9bb9890c7a236952cd7 Event/dispatch reference: src/components/ward-management/ward-flow-reducer.ts:1678 Event/dispatch reference: src/components/ward-management/ward-patient-registration-reducer.ts:39 - ARCHIVE_PATIENT — modelled; event roles: coordinator - Source-reviewed command model: Patient removed from active patients list; audit event and sequence retained. + Source-reviewed command model: Patient removed from active patients list (withdrawn-only referrals unlinked, D-149); audit event and sequence retained. Permission source: src/components/ward-management/ward-flow-event-roles.ts:405 Event/dispatch reference: src/components/ward-management/ward-flow-reducer.ts:1680 Event/dispatch reference: src/components/ward-management/ward-patient-archive-reducer.ts:10 Subject: An erroneous standalone patient registration - Before: Patient has only registration fields and no care records/references elsewhere + Before: Patient has only registration fields, and nothing else names it except withdrawn or cancelled front-door referrals, audit rows, or Undo records older than the Undo window (D-149) After: Patient removed from active patients list; audit event and sequence retained Scope: Coordinator only, with shared record scope applied. Shared authenticated command scope additionally checks the permitted place and stored record; EVENT_ROLE alone is not place authority. payload: patientId; reason from PATIENT_ARCHIVE_REASONS (duplicate, test, wrong_person); role and now guards: Patient must exist; listed archive reason - guards: Registration facts include the optional typed details (preferred name, address, GP, catchment team, interpreter language, Indigenous status, and the ADMIN_DETAIL_FIELDS administrative details); refuse any non-registration fact or any state/audit care reference; prior archive-attempt audit entries do not block + guards: Registration facts include the optional typed details (preferred name, address, GP, catchment team, interpreter language, Indigenous status, and the ADMIN_DETAIL_FIELDS administrative details); refuse any non-registration fact, any open or answered referral, or any other state reference. D-149 (Josh, 11 Nov 2026): a front-door referral whose every destination was withdrawn by the referrer or cancelled does not block, audit rows do not block, and an Undo record blocks only while it is inside the Undo window (measured from the event's now). Each refusal names its reason, and the coordinator's card shows it instead of hiding effects: Filters patient from patients; keeps sequence so id is not reused + effects: D-149: a withdrawn or cancelled referral that named the record stays in the referrals list with its patientId removed, so the stored workspace still validates + effects: D-149 review: an Undo record still naming the record (past the Undo window, or stamped after the board's time) is dropped, so it cannot become usable later and bring back a step naming an archived record effects: Reducer audit wrapper retains the archive event/reason; no care record is removed effects: The step can be taken back by UNDO_PATIENT_RECORD within the Undo window. tests: tests/ward-patient-archive.test.ts - Reviewed source: src/components/ward-management/ward-patient-archive-reducer.ts:10; SHA256 bfd91bd2e7955ee0c776cf1c8e5fb3ecb1dd76d2cd0d2c9a71a9789270b95898 + Reviewed source: src/components/ward-management/ward-patient-archive-reducer.ts:10; SHA256 d62abeda9f9da15c550d60692fddf854fe29ece3c2db0bc472ab46c01886a930 Reviewed source: src/components/ward-management/ward-flow-event-roles.ts:407; SHA256 808d614bd517bb11c0ef517ce5632dd3caba8a71758476401f35da82fe26afda - Reviewed source: src/components/ward-management/ward-patient-archive.ts:30; SHA256 2738c8d1a80a5d8fc418865719058ee2603141bb9493d55954cae83742455eb3 - Reviewed source: src/components/ward-management/ward-patient-archive.ts:44; SHA256 2738c8d1a80a5d8fc418865719058ee2603141bb9493d55954cae83742455eb3 + Reviewed source: src/components/ward-management/ward-patient-archive.ts:32; SHA256 0836301ee769bdc651066d09a763d083ca95047425bac33559d6e1538fed7d54 + Reviewed source: src/components/ward-management/ward-patient-archive.ts:54; SHA256 0836301ee769bdc651066d09a763d083ca95047425bac33559d6e1538fed7d54 Reviewed source: src/components/ward-management/ward-access-state.ts:709; SHA256 6749082a89387b340bc0b52cfe76a13f8375532e44cbbcdf17a85d696c94e703 - ACCEPT_REFERRAL — diagram-reviewed; event roles: ward, coordinator, ed, community Diagram action notes reviewed against the recorded source revision. Source digests detect subsequent edits; this is not runtime acceptance. diff --git a/docs/ward-flow/journey/README.md b/docs/ward-flow/journey/README.md index bb1d57fb55..a31dd7cf16 100644 --- a/docs/ward-flow/journey/README.md +++ b/docs/ward-flow/journey/README.md @@ -280,6 +280,18 @@ Source digests were re-reviewed file by file before being re-recorded: After `main` (D-121 to D-127) was merged into this branch (10 Nov 2026), `ward/ward-screen.tsx` and `ward-tasks-drawer.tsx` hold both sides' edits. Each cited line was found again by its text, unchanged in role, payload and guard: the twelve `ward-screen.tsx` citations moved down by three to seven lines, and `RECORD_ESCALATION` in `ward-tasks-drawer.tsx` moved to line 673 (one comment line added beside the D-125 sign-out wait). Only lines and digests were re-recorded. This thread's rulings were then renumbered D-129 and D-130, a comment-only change in the cited files, so those digests (in `actions.json`, `event-dispositions.json` and `machines.json`) were re-recorded with no line moved. +Live audit fixes (#1626, 11 Nov 2026): source digests for three files were re-reviewed. Each cited line was found again by its text, and its role, payload and guard are unchanged. + +- `community/community-screen.tsx`: the signed-in shared workspace no longer shows the Midland demo team (item 6), and a team contact there is not kept in the browser. The `ACCEPT_REFERRAL`, `DECLINE_REFERRAL` and `MARK_NOTICE_READ` dispatches each moved down seven lines. +- `officer/officer-screen.tsx`: the handover copy toast says "1 open job" (item 25), which adds one import line. The four transport events each moved down one line. +- `ward/ward-screen-overlays.tsx`: closing a bed offers an optional reason on its toast (D-148). `SET_BED_CLOSED` is unchanged. Choosing a reason undoes the close and sends it again with that reason. `RECORD_AWAY_AT_EMERGENCY_DEPARTMENT`, `RECORD_RETURNED_FROM_EMERGENCY_DEPARTMENT`, `SET_BED_PREPARATION` and the discharge-barrier dispatch each moved down twelve lines. +- `ward-global-search.tsx`, `tools/ward-demo-panel.tsx`: `ADVANCE_CLOCK` is unchanged, but D-150 hides its controls in shared mode, because the signed-in site runs on real Perth time. The action's screen note says so. `RESET_SCENARIO` and `SET_SCENARIO` are unchanged. +- `ward-patient-archive.ts`, `ward-patient-archive-reducer.ts`: D-149 changed `ARCHIVE_PATIENT`'s guard. A withdrawn or cancelled front-door referral, audit rows and expired Undo records no longer block, and the withdrawn referral is unlinked from the archived record. The command model's before, guards, effects and the `patientArchiveProblem` citation (line 44 to 54) are updated. +- `ward-patient-archive.ts` (review round, 11 Nov 2026): an Undo record now blocks archive through the last minute of the Undo window (`<=`), matching `undoWindowRefusal`, which still allows Undo at exactly that minute. One character changed; no cited line moved and the model's prose ("inside the Undo window") stands, so only the digest was re-recorded. +- `ward-patient-archive.ts` (independent review, 11 Nov 2026): an Undo record stamped after the board's time, which D-150's one-off clock step back can leave, no longer blocks archive, matching `undoWindowRefusal`, which refuses such an Undo. Only the Undo-window filter below the cited lines changed; no cited line moved, so only the digest was re-recorded. +- `ward-patient-archive-reducer.ts` (CodeRabbit review, 11 Nov 2026): archive now drops any Undo record still naming the archived record. Such a record is past the Undo window or stamped after the board's time, so it cannot be used now, but a future-stamped one would become usable once the clock reached it and could bring back a step naming a record that has left the lists. The model gains one effect line; the cited line did not move. +- `ward/ward-screen-overlays.tsx` (merge with main #1608, 11 Nov 2026): the four citations moved down with this PR's toast-choice lines, and `ward-bed-closure-reason.ts` moved to the ward root so the screen-to-screen import count stays at 564. Only an import path changed after that, and the toast's reasoned close now keeps the first close's review time (PR #1626 review), two lines above the citations; the lines and digest were re-recorded. + ## Source review — 10 Nov 2026 (Batch 4 outages and pilot control, PR #1603, D-135) Source digests were re-reviewed file by file against `main` before being re-recorded. Only additive Batch 4 edits were found: diff --git a/docs/ward-flow/journey/actions.json b/docs/ward-flow/journey/actions.json index 5c50823142..d9211a73b2 100644 --- a/docs/ward-flow/journey/actions.json +++ b/docs/ward-flow/journey/actions.json @@ -391,13 +391,13 @@ }, { "path": "src/components/ward-management/community/community-screen.tsx", - "line": 592, - "sha256": "12b4bfd49f402804b24436230478a0c54a70e05434f53b843ff561d99325e354" + "line": 599, + "sha256": "b72e4223d7053454c47367a1c990a63eca503324c13fe6567a8a01054648d058" }, { "path": "src/components/ward-management/ward/ward-screen.tsx", - "line": 1329, - "sha256": "609353a46e34485afe5b65294ebe0e4e4239b09adf13946f6575668d60325ce3" + "line": 1330, + "sha256": "c28c05d4b218898ae15792b2cfe12206b73373de30ef399cbc3940a61e9716bf" }, { "path": "src/components/ward-management/referrals/referral-match.tsx", @@ -493,8 +493,8 @@ }, { "path": "src/components/ward-management/community/community-screen.tsx", - "line": 532, - "sha256": "12b4bfd49f402804b24436230478a0c54a70e05434f53b843ff561d99325e354" + "line": 539, + "sha256": "b72e4223d7053454c47367a1c990a63eca503324c13fe6567a8a01054648d058" }, { "path": "src/components/ward-management/ed/use-ed-screen-decline.ts", @@ -1039,8 +1039,8 @@ }, { "path": "src/components/ward-management/ward/ward-screen.tsx", - "line": 1291, - "sha256": "609353a46e34485afe5b65294ebe0e4e4239b09adf13946f6575668d60325ce3" + "line": 1292, + "sha256": "c28c05d4b218898ae15792b2cfe12206b73373de30ef399cbc3940a61e9716bf" }, { "path": "src/components/ward-management/ward/ward-answer-view.tsx", @@ -1131,8 +1131,8 @@ }, { "path": "src/components/ward-management/ward/ward-screen.tsx", - "line": 1382, - "sha256": "609353a46e34485afe5b65294ebe0e4e4239b09adf13946f6575668d60325ce3" + "line": 1383, + "sha256": "c28c05d4b218898ae15792b2cfe12206b73373de30ef399cbc3940a61e9716bf" }, { "path": "src/components/ward-management/ward/ward-answer-view.tsx", @@ -1853,8 +1853,8 @@ }, { "path": "src/components/ward-management/ward/ward-screen.tsx", - "line": 1427, - "sha256": "609353a46e34485afe5b65294ebe0e4e4239b09adf13946f6575668d60325ce3" + "line": 1428, + "sha256": "c28c05d4b218898ae15792b2cfe12206b73373de30ef399cbc3940a61e9716bf" }, { "path": "src/components/ward-management/ward/ward-answer-view.tsx", @@ -1968,8 +1968,8 @@ }, { "path": "src/components/ward-management/ward/ward-screen.tsx", - "line": 1825, - "sha256": "609353a46e34485afe5b65294ebe0e4e4239b09adf13946f6575668d60325ce3" + "line": 1826, + "sha256": "c28c05d4b218898ae15792b2cfe12206b73373de30ef399cbc3940a61e9716bf" }, { "path": "src/components/ward-management/patients/patient-transit-operations.tsx", @@ -2388,8 +2388,8 @@ }, { "path": "src/components/ward-management/officer/officer-screen.tsx", - "line": 521, - "sha256": "da86cd3b9a7e8018baf1a5abb7477e66bdb918fd911ad8f43779f95de7b68027" + "line": 522, + "sha256": "adc8d3dcda4dd8012363494a18a22910aecaf0a41698dfe2675eeac869e24dd8" }, { "path": "src/components/ward-management/patients/patient-transit-operations.tsx", @@ -2457,8 +2457,8 @@ }, { "path": "src/components/ward-management/officer/officer-screen.tsx", - "line": 528, - "sha256": "da86cd3b9a7e8018baf1a5abb7477e66bdb918fd911ad8f43779f95de7b68027" + "line": 529, + "sha256": "adc8d3dcda4dd8012363494a18a22910aecaf0a41698dfe2675eeac869e24dd8" }, { "path": "src/components/ward-management/patients/patient-transit-operations.tsx", @@ -2534,8 +2534,8 @@ }, { "path": "src/components/ward-management/officer/officer-screen.tsx", - "line": 544, - "sha256": "da86cd3b9a7e8018baf1a5abb7477e66bdb918fd911ad8f43779f95de7b68027" + "line": 545, + "sha256": "adc8d3dcda4dd8012363494a18a22910aecaf0a41698dfe2675eeac869e24dd8" }, { "path": "src/components/ward-management/patients/patient-transit-operations.tsx", @@ -2611,8 +2611,8 @@ }, { "path": "src/components/ward-management/officer/officer-screen.tsx", - "line": 563, - "sha256": "da86cd3b9a7e8018baf1a5abb7477e66bdb918fd911ad8f43779f95de7b68027" + "line": 564, + "sha256": "adc8d3dcda4dd8012363494a18a22910aecaf0a41698dfe2675eeac869e24dd8" }, { "path": "src/components/ward-management/tools/ward-tool-feed.tsx", @@ -3385,8 +3385,8 @@ }, { "path": "src/components/ward-management/ward/ward-screen.tsx", - "line": 1723, - "sha256": "609353a46e34485afe5b65294ebe0e4e4239b09adf13946f6575668d60325ce3" + "line": 1724, + "sha256": "c28c05d4b218898ae15792b2cfe12206b73373de30ef399cbc3940a61e9716bf" }, { "path": "src/components/ward-management/tools/ward-tool-feed.tsx", @@ -3469,8 +3469,8 @@ }, { "path": "src/components/ward-management/ward/ward-screen-overlays.tsx", - "line": 288, - "sha256": "5f299e7db840c3d6209477410076e4072984fdf90ab65f214165ca9d7abb2e47" + "line": 286, + "sha256": "0d4efcd48b41c5c0d1b0c81ae4d555cf2028f9257dfab37db9b903cd2188aea3" }, { "path": "src/components/ward-management/board/ward-board-detail-panel.tsx", @@ -3548,8 +3548,8 @@ }, { "path": "src/components/ward-management/ward/ward-screen-overlays.tsx", - "line": 299, - "sha256": "5f299e7db840c3d6209477410076e4072984fdf90ab65f214165ca9d7abb2e47" + "line": 297, + "sha256": "0d4efcd48b41c5c0d1b0c81ae4d555cf2028f9257dfab37db9b903cd2188aea3" }, { "path": "src/components/ward-management/board/ward-board-detail-panel.tsx", @@ -3691,8 +3691,8 @@ }, { "path": "src/components/ward-management/ward/ward-screen.tsx", - "line": 1748, - "sha256": "609353a46e34485afe5b65294ebe0e4e4239b09adf13946f6575668d60325ce3" + "line": 1749, + "sha256": "c28c05d4b218898ae15792b2cfe12206b73373de30ef399cbc3940a61e9716bf" }, { "path": "src/components/ward-management/board/ward-board.tsx", @@ -3824,8 +3824,8 @@ }, { "path": "src/components/ward-management/ward/ward-screen.tsx", - "line": 1661, - "sha256": "609353a46e34485afe5b65294ebe0e4e4239b09adf13946f6575668d60325ce3" + "line": 1662, + "sha256": "c28c05d4b218898ae15792b2cfe12206b73373de30ef399cbc3940a61e9716bf" }, { "path": "src/components/ward-management/ward-flow-bed-events.ts", @@ -4037,8 +4037,8 @@ }, { "path": "src/components/ward-management/ward/ward-screen.tsx", - "line": 1680, - "sha256": "609353a46e34485afe5b65294ebe0e4e4239b09adf13946f6575668d60325ce3" + "line": 1681, + "sha256": "c28c05d4b218898ae15792b2cfe12206b73373de30ef399cbc3940a61e9716bf" }, { "path": "src/components/ward-management/discharges/discharge-board.tsx", @@ -4106,8 +4106,8 @@ }, { "path": "src/components/ward-management/ward/ward-screen-overlays.tsx", - "line": 311, - "sha256": "5f299e7db840c3d6209477410076e4072984fdf90ab65f214165ca9d7abb2e47" + "line": 309, + "sha256": "0d4efcd48b41c5c0d1b0c81ae4d555cf2028f9257dfab37db9b903cd2188aea3" }, { "path": "src/components/ward-management/ward-flow-bed-events.ts", @@ -4170,8 +4170,8 @@ }, { "path": "src/components/ward-management/ward/ward-screen.tsx", - "line": 1569, - "sha256": "609353a46e34485afe5b65294ebe0e4e4239b09adf13946f6575668d60325ce3" + "line": 1570, + "sha256": "c28c05d4b218898ae15792b2cfe12206b73373de30ef399cbc3940a61e9716bf" }, { "path": "src/components/ward-management/ward/ward-answer-view.tsx", @@ -4694,13 +4694,13 @@ }, { "path": "src/components/ward-management/community/community-screen.tsx", - "line": 835, - "sha256": "12b4bfd49f402804b24436230478a0c54a70e05434f53b843ff561d99325e354" + "line": 842, + "sha256": "b72e4223d7053454c47367a1c990a63eca503324c13fe6567a8a01054648d058" }, { "path": "src/components/ward-management/ward/ward-screen.tsx", - "line": 1104, - "sha256": "609353a46e34485afe5b65294ebe0e4e4239b09adf13946f6575668d60325ce3" + "line": 1105, + "sha256": "c28c05d4b218898ae15792b2cfe12206b73373de30ef399cbc3940a61e9716bf" }, { "path": "src/components/ward-management/ward-inbox-reducer.ts", @@ -4953,10 +4953,10 @@ ], "screen": { "screen": "ward-global-search.tsx; tools/ward-demo-panel.tsx", - "control": "Global Search offers Advance demo clock (+15m), dispatching minutes=15 under role demo; the Demo panel also offers +15 min and +1 hour. Imperative search navigation and desk switching first consult the composed unsaved-work guard." + "control": "Global Search offers Advance demo clock (+15m), dispatching minutes=15 under role demo; the Demo panel also offers +15 min and +1 hour. D-150 (11 Nov 2026): the signed-in shared site runs on real Perth time, so both controls are hidden in shared mode and remain on the public demo only. Imperative search navigation and desk switching first consult the composed unsaved-work guard." }, "review": { - "reviewedOn": "2026-11-05", + "reviewedOn": "2026-11-11", "sources": [ { "path": "src/components/ward-management/ward-flow-event-roles.ts", @@ -4970,13 +4970,13 @@ }, { "path": "src/components/ward-management/ward-global-search.tsx", - "line": 1275, - "sha256": "b7c651d7a0a3110b10e5d46aeb7ab769359393240cf55bb4024fc570504185ac" + "line": 802, + "sha256": "da7ec0be180ef0f2d0009261ed09aa538703e8153afb3ef84b292aac44d21c73" }, { "path": "src/components/ward-management/tools/ward-demo-panel.tsx", - "line": 268, - "sha256": "002918ecd56f5d0f951247f9cbc1b96adccea94e8d024b3a82cb0ed46b6dbebc" + "line": 271, + "sha256": "ba6e115ccc6fb129eb4b2aeb72e975e106930bdd55c7e6cc5cdc17a0d8bb685f" }, { "path": "src/components/ward-management/ward-flow-provider.tsx", @@ -5033,7 +5033,7 @@ { "path": "src/components/ward-management/tools/ward-demo-panel.tsx", "line": 197, - "sha256": "002918ecd56f5d0f951247f9cbc1b96adccea94e8d024b3a82cb0ed46b6dbebc" + "sha256": "ba6e115ccc6fb129eb4b2aeb72e975e106930bdd55c7e6cc5cdc17a0d8bb685f" } ] } @@ -5084,7 +5084,7 @@ { "path": "src/components/ward-management/tools/ward-demo-panel.tsx", "line": 197, - "sha256": "002918ecd56f5d0f951247f9cbc1b96adccea94e8d024b3a82cb0ed46b6dbebc" + "sha256": "ba6e115ccc6fb129eb4b2aeb72e975e106930bdd55c7e6cc5cdc17a0d8bb685f" }, { "path": "src/components/ward-management/ward-flow-reducer.ts", @@ -5700,8 +5700,8 @@ }, { "path": "src/components/ward-management/ward/ward-screen-overlays.tsx", - "line": 346, - "sha256": "5f299e7db840c3d6209477410076e4072984fdf90ab65f214165ca9d7abb2e47" + "line": 344, + "sha256": "0d4efcd48b41c5c0d1b0c81ae4d555cf2028f9257dfab37db9b903cd2188aea3" }, { "path": "src/components/ward-management/board/ward-board-detail-panel.tsx", @@ -6725,8 +6725,8 @@ }, { "path": "src/components/ward-management/ward/ward-screen.tsx", - "line": 1084, - "sha256": "609353a46e34485afe5b65294ebe0e4e4239b09adf13946f6575668d60325ce3" + "line": 1085, + "sha256": "c28c05d4b218898ae15792b2cfe12206b73373de30ef399cbc3940a61e9716bf" }, { "path": "src/components/ward-management/ward-flow-reducer.ts", diff --git a/docs/ward-flow/journey/event-dispositions.json b/docs/ward-flow/journey/event-dispositions.json index 82c7fb6f6d..b0a7d16d19 100644 --- a/docs/ward-flow/journey/event-dispositions.json +++ b/docs/ward-flow/journey/event-dispositions.json @@ -1444,20 +1444,22 @@ { "event": "ARCHIVE_PATIENT", "status": "modelled", - "reason": "Source-reviewed command model: Patient removed from active patients list; audit event and sequence retained.", + "reason": "Source-reviewed command model: Patient removed from active patients list (withdrawn-only referrals unlinked, D-149); audit event and sequence retained.", "source": "src/components/ward-management/ward-patient-archive-reducer.ts", "model": { "subject": "An erroneous standalone patient registration", - "before": "Patient has only registration fields and no care records/references elsewhere", + "before": "Patient has only registration fields, and nothing else names it except withdrawn or cancelled front-door referrals, audit rows, or Undo records older than the Undo window (D-149)", "after": "Patient removed from active patients list; audit event and sequence retained", "payload": ["patientId; reason from PATIENT_ARCHIVE_REASONS (duplicate, test, wrong_person); role and now"], "scope": "Coordinator only, with shared record scope applied. Shared authenticated command scope additionally checks the permitted place and stored record; EVENT_ROLE alone is not place authority.", "guards": [ "Patient must exist; listed archive reason", - "Registration facts include the optional typed details (preferred name, address, GP, catchment team, interpreter language, Indigenous status, and the ADMIN_DETAIL_FIELDS administrative details); refuse any non-registration fact or any state/audit care reference; prior archive-attempt audit entries do not block" + "Registration facts include the optional typed details (preferred name, address, GP, catchment team, interpreter language, Indigenous status, and the ADMIN_DETAIL_FIELDS administrative details); refuse any non-registration fact, any open or answered referral, or any other state reference. D-149 (Josh, 11 Nov 2026): a front-door referral whose every destination was withdrawn by the referrer or cancelled does not block, audit rows do not block, and an Undo record blocks only while it is inside the Undo window (measured from the event's now). Each refusal names its reason, and the coordinator's card shows it instead of hiding" ], "effects": [ "Filters patient from patients; keeps sequence so id is not reused", + "D-149: a withdrawn or cancelled referral that named the record stays in the referrals list with its patientId removed, so the stored workspace still validates", + "D-149 review: an Undo record still naming the record (past the Undo window, or stamped after the board's time) is dropped, so it cannot become usable later and bring back a step naming an archived record", "Reducer audit wrapper retains the archive event/reason; no care record is removed", "The step can be taken back by UNDO_PATIENT_RECORD within the Undo window." ], @@ -1465,7 +1467,7 @@ { "path": "src/components/ward-management/ward-patient-archive-reducer.ts", "line": 10, - "sha256": "bfd91bd2e7955ee0c776cf1c8e5fb3ecb1dd76d2cd0d2c9a71a9789270b95898" + "sha256": "d62abeda9f9da15c550d60692fddf854fe29ece3c2db0bc472ab46c01886a930" }, { "path": "src/components/ward-management/ward-flow-event-roles.ts", @@ -1474,13 +1476,13 @@ }, { "path": "src/components/ward-management/ward-patient-archive.ts", - "line": 30, - "sha256": "2738c8d1a80a5d8fc418865719058ee2603141bb9493d55954cae83742455eb3" + "line": 32, + "sha256": "0836301ee769bdc651066d09a763d083ca95047425bac33559d6e1538fed7d54" }, { "path": "src/components/ward-management/ward-patient-archive.ts", - "line": 44, - "sha256": "2738c8d1a80a5d8fc418865719058ee2603141bb9493d55954cae83742455eb3" + "line": 54, + "sha256": "0836301ee769bdc651066d09a763d083ca95047425bac33559d6e1538fed7d54" }, { "path": "src/components/ward-management/ward-access-state.ts", diff --git a/docs/ward-flow/journey/ward-journey-explorer.html b/docs/ward-flow/journey/ward-journey-explorer.html index 446d353c83..3de03c0c2c 100644 --- a/docs/ward-flow/journey/ward-journey-explorer.html +++ b/docs/ward-flow/journey/ward-journey-explorer.html @@ -1284,7 +1284,7 @@

What to do here