Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions data/repo-awareness-snapshot.json
Original file line number Diff line number Diff line change
Expand Up @@ -2454,6 +2454,11 @@
"section": "decisions",
"catalogued": true
},
{
"path": "docs/decisions/2026-10-17-overseas-line-centred-on-answer-home.md",
"section": "decisions",
"catalogued": true
},
{
"path": "docs/decisions/2026-10-16-stuck-final-attempt-uses-existing-recovery.md",
"section": "decisions",
Expand Down
6 changes: 4 additions & 2 deletions docs/decisions/2026-10-17-no-overseas-line-on-home-pages.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Decision: The overseas AI line comes off the home pages

- **Status:** decided 2026-10-17
- **Source:** `src/components/ClinicalDashboard.tsx`, find "the owner removed it from the home pages on"
- **Status:** decided 2026-10-17; superseded by 2026-10-17-overseas-line-centred-on-answer-home.md
- **Source:** `src/components/ClinicalDashboard.tsx`, find "where an Answer question goes. Centred on the"

The owner asked for the line "Questions are sent to an overseas AI service (OpenAI) to search and write
answers. Don't include patient details." to be removed from the home pages. The Answer home was the only
Expand All @@ -10,3 +10,5 @@ information, and the privacy page still says questions may go to the OpenAI API
replaces the 13 Oct 2026 wish to show the line on the Answer home before the first question.

If this summary and the source ever differ, the source wins.

**Superseded the same day** by [the centred Answer home line](2026-10-17-overseas-line-centred-on-answer-home.md): the owner chose to keep the line on the Answer home, centred.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Decision: The overseas AI line stays on the Answer home, centred like the line under each answer

- **Status:** decided 2026-10-17
- **Source:** `src/components/ClinicalDashboard.tsx`, find "where an Answer question goes. Centred on the"

The owner first asked for the overseas AI line to come off the home pages, then chose to keep it on the
Answer home in the same style as the line under each answer: centred, with the same wording. The
line under each answer is centred by PR #3605, which is still open when this is recorded; until it
merges, only the home line is centred. The wording
itself is set once in `src/components/clinical-dashboard/answer-provider-notice.tsx`, so both places
always say the same thing. This replaces the earlier 17 Oct 2026 decision to remove the line from the home pages.

If this summary and the source ever differ, the source wins.
30 changes: 19 additions & 11 deletions src/components/ClinicalDashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2809,17 +2809,25 @@ function ClinicalDashboardContent({
// mode-specific branch so picking a mode on `/` changes only its
// presentation and composer target; mode-owned content stays behind
// its own route (/tools, /favourites, /dsm, …).
// No overseas-processing line here: the owner removed it from the home pages on
// 17 Oct 2026. It still shows under each answer, and /privacy carries the full wording.
<SharedHomeEmptyState
modeId={searchMode}
desktopComposerSlotId={desktopHomeComposerSlotId}
recentQueries={recentQueries}
onSelectRecent={(recentQuery) => {
setQuery(recentQuery);
void ask(recentQuery);
}}
/>
// One grid item, so a tall canvas cannot split the home and its line into two rows.
<div className="relative w-full">
<SharedHomeEmptyState
modeId={searchMode}
desktopComposerSlotId={desktopHomeComposerSlotId}
recentQueries={recentQueries}
onSelectRecent={(recentQuery) => {
setQuery(recentQuery);
void ask(recentQuery);
}}
/>
{/* Before the first question is sent: where an Answer question goes. Centred on the
Answer home (owner decision, 17 Oct 2026); PR #3605 centres the line under each
answer to match. It hangs below the home without taking layout space, so the
centred home and its composer sit in the same place in every mode. */}
{searchMode === "answer" && !clientDemoMode ? (
<AnswerProviderNotice className="absolute inset-x-0 top-full mt-2 justify-center px-4 text-center" />
) : null}
Comment thread
BigSimmo marked this conversation as resolved.
Resolved
</div>
) : activeModeResultKind === "differentials" ? (
<DifferentialsHome
query={deferredQuery}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ export const ANSWER_PROVIDER_NOTICE_TEXT =
"Questions are sent to an overseas AI service (OpenAI) to search and write answers. Don't include patient details.";

/**
* One quiet line under the latest answer. It was also on the Answer home before the first question
* (owner decision, 13 Oct 2026) until the owner removed it from the home pages on 17 Oct 2026.
* One quiet line under the latest answer, and centred on the Answer home before the first question
* is sent (owner decisions, 13 and 17 Oct 2026).
*
* It says where a clinical question goes, which the composer's privacy line ("Do not enter
* patient-identifiable information.") does not. It sits below the answer rather than beside
Expand Down
17 changes: 13 additions & 4 deletions tests/answer-provider-notice.dom.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,28 @@ describe("AnswerProviderNotice", () => {
expect(note).toHaveAttribute("data-testid", "answer-provider-notice");
});

it("is mounted under the latest answer only, never on the home and never in demo mode", () => {
it("is mounted on the Answer home and under the latest answer, never in demo mode", () => {
// Source check as a stopgap: mounting the full ClinicalDashboard in each mode is too heavy for a unit
// test. Cost: harmless reformatting can break it, and it cannot tell live code from dead code; the
// Production UI tests cover the rendered notice.
const source = readFileSync(resolve(process.cwd(), "src/components/ClinicalDashboard.tsx"), "utf8");
expect(source.match(/<AnswerProviderNotice\b/g)).toHaveLength(1);
// The owner removed it from the home pages on 17 Oct 2026, so nothing else in src may mount it,
// including the shared home components.
expect(source.match(/<AnswerProviderNotice\b/g)).toHaveLength(2);
// Both mounts live in the dashboard, so nothing else in src may mount it.
const mounts = readdirSync(resolve(process.cwd(), "src"), { recursive: true, encoding: "utf8" })
.filter((file) => file.endsWith(".tsx"))
.filter((file) => readFileSync(resolve(process.cwd(), "src", file), "utf8").includes("<AnswerProviderNotice"))
.map((file) => file.split(sep).join("/"));
expect(mounts).toEqual(["components/ClinicalDashboard.tsx"]);
// The home line is Answer-only, centred like the answer line (owner decision, 17 Oct 2026).
expect(source).toMatch(
/searchMode === "answer" && !clientDemoMode \? \(\s*<AnswerProviderNotice className="(?=[^"]*\bjustify-center\b)(?=[^"]*\btext-center\b)[^"]*"/,
);
// The home and its line share one grid item, so a tall canvas cannot split them into two rows, and
// the line is out of flow, so it cannot move the centred home or its composer.
expect(source).toMatch(/<AnswerProviderNotice className="absolute inset-x-0 top-full [^"]*"/);
expect(source).toMatch(
/<div className="relative w-full">\s*<SharedHomeEmptyState[\s\S]*?<AnswerProviderNotice className="[^"]*"[^>]*\/>\s*\) : null\}\s*<\/div>/,
);
expect(source).toMatch(
/explicitDemoMode \|\|\s*answer\.demoMode === true[^?]*\? null : \(\s*<AnswerProviderNotice/,
);
Expand Down
Loading