From dc49ad2ccbac949f8b08d0e8a71bfd26abb7e45f Mon Sep 17 00:00:00 2001
From: Claude
Date: Sat, 21 Nov 2026 19:27:04 +0000
Subject: [PATCH] Add the distress Help situation and safety wording (needs
clinical review)
Restores the 'They're very distressed or might not be safe' situation,
the TC098 'Checking in on safety' lines, safety not-for lines on TC105,
TC108 and TC109, and the scope note on Help and the Library welcome.
Every new safety line is marked CLINICAL REVIEW NEEDED.
Co-Authored-By: Claude Opus 5.5
Claude-Session: https://claude.ai/code/session_01GxPPxjtHCQRLDHwTbGHhTp
---
.../components/library/start-here-shelf.tsx | 9 +++++++
artifacts/tc-reference/src/lib/cards/TC098.ts | 22 +++++++++++++++++
artifacts/tc-reference/src/lib/cards/TC105.ts | 10 ++++++++
artifacts/tc-reference/src/lib/cards/TC108.ts | 2 ++
artifacts/tc-reference/src/lib/cards/TC109.ts | 4 ++++
artifacts/tc-reference/src/lib/situations.ts | 21 ++++++++++++++++
artifacts/tc-reference/src/pages/help.tsx | 9 +++++++
.../test/fixtures/saved-phrase-snapshot.json | 5 ++++
.../tc-reference/src/test/help-page.test.tsx | 24 +++++++++++++++++++
.../tc-reference/src/test/situations.test.ts | 16 +++++++++----
10 files changed, 118 insertions(+), 4 deletions(-)
diff --git a/artifacts/tc-reference/src/components/library/start-here-shelf.tsx b/artifacts/tc-reference/src/components/library/start-here-shelf.tsx
index 2cdc657..9b97015 100644
--- a/artifacts/tc-reference/src/components/library/start-here-shelf.tsx
+++ b/artifacts/tc-reference/src/components/library/start-here-shelf.tsx
@@ -54,6 +54,15 @@ export function StartHereShelf() {
practise. New here? Begin with the {TOTAL} that cover most
conversations.
+
+ {/* CLINICAL REVIEW NEEDED */}
+ This app helps with words, not clinical risk decisions. Follow your
+ local protocol.
+
= new Map(
diff --git a/artifacts/tc-reference/src/pages/help.tsx b/artifacts/tc-reference/src/pages/help.tsx
index 15c2901..37c5673 100644
--- a/artifacts/tc-reference/src/pages/help.tsx
+++ b/artifacts/tc-reference/src/pages/help.tsx
@@ -91,6 +91,15 @@ function HelpPicker() {
>
What's happening?
+
+ {/* CLINICAL REVIEW NEEDED */}
+ This app helps with words, not clinical risk decisions. Follow your
+ local protocol.
+
{
}
});
+ it("shows the scope note on the picker", () => {
+ renderAt("/help");
+ expect(screen.getByTestId("help-scope-note")).toHaveTextContent(
+ "This app helps with words, not clinical risk decisions.",
+ );
+ });
+
+ it("leads the safety situation with the protocol and 000 note", () => {
+ renderAt("/help/distressed-or-unsafe");
+ const note = screen.getByTestId("help-safety");
+ expect(note).toHaveTextContent("follow your organisation's safety");
+ expect(note).toHaveTextContent("call 000");
+ // The note comes before the first move in reading order.
+ expect(
+ note.compareDocumentPosition(screen.getByTestId("help-first")) &
+ Node.DOCUMENT_POSITION_FOLLOWING,
+ ).toBeTruthy();
+ });
+
+ it("shows no safety note on everyday situations", () => {
+ renderAt("/help/say-no");
+ expect(screen.queryByTestId("help-safety")).not.toBeInTheDocument();
+ });
+
it("reaches a line to say in two taps from the picker", async () => {
const location = renderAt("/help");
fireEvent.click(screen.getByTestId("help-situation-say-no"));
diff --git a/artifacts/tc-reference/src/test/situations.test.ts b/artifacts/tc-reference/src/test/situations.test.ts
index bbefa87..c662dc8 100644
--- a/artifacts/tc-reference/src/test/situations.test.ts
+++ b/artifacts/tc-reference/src/test/situations.test.ts
@@ -28,10 +28,10 @@ const LIBRARY_IDS = new Set(
);
describe("Help me right now situations", () => {
- it("has exactly eight situations with unique ids and labels", () => {
- expect(SITUATIONS).toHaveLength(8);
- expect(new Set(SITUATIONS.map((s) => s.id)).size).toBe(8);
- expect(new Set(SITUATIONS.map((s) => s.label)).size).toBe(8);
+ it("has exactly nine situations with unique ids and labels", () => {
+ expect(SITUATIONS).toHaveLength(9);
+ expect(new Set(SITUATIONS.map((s) => s.id)).size).toBe(9);
+ expect(new Set(SITUATIONS.map((s) => s.label)).size).toBe(9);
for (const s of SITUATIONS) {
expect(s.id, s.id).toMatch(/^[a-z]+(-[a-z]+)*$/);
expect(s.tagline.split(" ").length, s.id).toBeLessThanOrEqual(6);
@@ -71,6 +71,14 @@ describe("Help me right now situations", () => {
}
});
+ it("points the distress situation at local protocol and 000", () => {
+ const s = getSituation("distressed-or-unsafe");
+ expect(s?.safetyNote).toMatch(/organisation's safety or risk protocol/);
+ expect(s?.safetyNote).toMatch(/\b000\b/);
+ // Only the safety situation carries a safety note.
+ expect(SITUATIONS.filter((x) => x.safetyNote)).toHaveLength(1);
+ });
+
it("looks situations up by id", () => {
expect(getSituation("say-no")?.leadCardId).toBe("TC102");
expect(getSituation("missing")).toBeUndefined();