From a69497cf61d4535f95b58188a8a58471be0c6c20 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 17 Oct 2026 09:15:45 +0000 Subject: [PATCH 1/5] fix(ui): bring the overseas AI line back on the Answer home, centred The owner chose to keep the line on the Answer home in the same centred style as the line under each answer. Both use the one shared wording. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01QSauML59o7cTRNznSdX4sQ --- data/repo-awareness-snapshot.json | 5 ++++ ...26-10-17-no-overseas-line-on-home-pages.md | 4 ++- ...17-overseas-line-centred-on-answer-home.md | 11 ++++++++ src/components/ClinicalDashboard.tsx | 28 +++++++++++-------- .../answer-provider-notice.tsx | 4 +-- tests/answer-provider-notice.dom.test.tsx | 11 +++++--- 6 files changed, 45 insertions(+), 18 deletions(-) create mode 100644 docs/decisions/2026-10-17-overseas-line-centred-on-answer-home.md diff --git a/data/repo-awareness-snapshot.json b/data/repo-awareness-snapshot.json index e04b749201..58642b26e8 100644 --- a/data/repo-awareness-snapshot.json +++ b/data/repo-awareness-snapshot.json @@ -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", diff --git a/docs/decisions/2026-10-17-no-overseas-line-on-home-pages.md b/docs/decisions/2026-10-17-no-overseas-line-on-home-pages.md index e278c408d6..adf43ef754 100644 --- a/docs/decisions/2026-10-17-no-overseas-line-on-home-pages.md +++ b/docs/decisions/2026-10-17-no-overseas-line-on-home-pages.md @@ -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" +- **Source:** `src/components/ClinicalDashboard.tsx`, find "Centred to match the line under each answer" 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 @@ -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. diff --git a/docs/decisions/2026-10-17-overseas-line-centred-on-answer-home.md b/docs/decisions/2026-10-17-overseas-line-centred-on-answer-home.md new file mode 100644 index 0000000000..4b35e82b98 --- /dev/null +++ b/docs/decisions/2026-10-17-overseas-line-centred-on-answer-home.md @@ -0,0 +1,11 @@ +# 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 "Centred to match the line under each answer" + +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 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. diff --git a/src/components/ClinicalDashboard.tsx b/src/components/ClinicalDashboard.tsx index d850e24520..796404b7d4 100644 --- a/src/components/ClinicalDashboard.tsx +++ b/src/components/ClinicalDashboard.tsx @@ -2809,17 +2809,23 @@ 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. - { - setQuery(recentQuery); - void ask(recentQuery); - }} - /> + <> + { + setQuery(recentQuery); + void ask(recentQuery); + }} + /> + {/* Before the first question is sent: where an Answer question goes. Centred to + match the line under each answer (owner decision, 17 Oct 2026). Below the home + content, so the composer never moves. */} + {searchMode === "answer" && !clientDemoMode ? ( + + ) : null} + ) : activeModeResultKind === "differentials" ? ( { 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(/ file.endsWith(".tsx")) .filter((file) => readFileSync(resolve(process.cwd(), "src", file), "utf8").includes(" 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* Date: Sat, 17 Oct 2026 09:22:04 +0000 Subject: [PATCH 2/5] docs: say the answer line is centred by PR 3605, not yet on main Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01QSauML59o7cTRNznSdX4sQ --- docs/decisions/2026-10-17-no-overseas-line-on-home-pages.md | 2 +- .../2026-10-17-overseas-line-centred-on-answer-home.md | 6 ++++-- src/components/ClinicalDashboard.tsx | 6 +++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/docs/decisions/2026-10-17-no-overseas-line-on-home-pages.md b/docs/decisions/2026-10-17-no-overseas-line-on-home-pages.md index adf43ef754..2a19aa4fd1 100644 --- a/docs/decisions/2026-10-17-no-overseas-line-on-home-pages.md +++ b/docs/decisions/2026-10-17-no-overseas-line-on-home-pages.md @@ -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 "Centred to match the line under each answer" +- **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 diff --git a/docs/decisions/2026-10-17-overseas-line-centred-on-answer-home.md b/docs/decisions/2026-10-17-overseas-line-centred-on-answer-home.md index 4b35e82b98..2a689372d3 100644 --- a/docs/decisions/2026-10-17-overseas-line-centred-on-answer-home.md +++ b/docs/decisions/2026-10-17-overseas-line-centred-on-answer-home.md @@ -1,10 +1,12 @@ # 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 "Centred to match the line under each answer" +- **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 wording +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. diff --git a/src/components/ClinicalDashboard.tsx b/src/components/ClinicalDashboard.tsx index 796404b7d4..6846dadd07 100644 --- a/src/components/ClinicalDashboard.tsx +++ b/src/components/ClinicalDashboard.tsx @@ -2819,9 +2819,9 @@ function ClinicalDashboardContent({ void ask(recentQuery); }} /> - {/* Before the first question is sent: where an Answer question goes. Centred to - match the line under each answer (owner decision, 17 Oct 2026). Below the home - content, so the composer never moves. */} + {/* 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. Below the home content, so the composer never moves. */} {searchMode === "answer" && !clientDemoMode ? ( ) : null} From 9907d02075c8d491f1a605375e0062fa591ae0a1 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 17 Oct 2026 09:24:47 +0000 Subject: [PATCH 3/5] docs: mark the removal decision superseded in its status line Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01QSauML59o7cTRNznSdX4sQ --- docs/decisions/2026-10-17-no-overseas-line-on-home-pages.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/decisions/2026-10-17-no-overseas-line-on-home-pages.md b/docs/decisions/2026-10-17-no-overseas-line-on-home-pages.md index 2a19aa4fd1..20ffe781ff 100644 --- a/docs/decisions/2026-10-17-no-overseas-line-on-home-pages.md +++ b/docs/decisions/2026-10-17-no-overseas-line-on-home-pages.md @@ -1,6 +1,6 @@ # Decision: The overseas AI line comes off the home pages -- **Status:** decided 2026-10-17 +- **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 From 78b3d48b5a2de0c35079743dd5bd65067023684b Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 17 Oct 2026 09:31:57 +0000 Subject: [PATCH 4/5] fix(ui): keep the Answer home and its overseas line in one grid item On tall desktop windows the home canvas grid split them into two stretched rows, leaving the line far below the home. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01QSauML59o7cTRNznSdX4sQ --- src/components/ClinicalDashboard.tsx | 6 ++++-- tests/answer-provider-notice.dom.test.tsx | 4 ++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/components/ClinicalDashboard.tsx b/src/components/ClinicalDashboard.tsx index 6846dadd07..93c1161766 100644 --- a/src/components/ClinicalDashboard.tsx +++ b/src/components/ClinicalDashboard.tsx @@ -2809,7 +2809,9 @@ 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, …). - <> + // One grid item for the home and its line, so the canvas centres them together + // instead of splitting them into two stretched rows on tall desktop windows. +
) : null} - +
) : activeModeResultKind === "differentials" ? ( { expect(source).toMatch( /searchMode === "answer" && !clientDemoMode \? \(\s*\s*]*\/>\s*\) : null\}\s*<\/div>/, + ); expect(source).toMatch( /explicitDemoMode \|\|\s*answer\.demoMode === true[^?]*\? null : \(\s* Date: Sat, 17 Oct 2026 09:35:23 +0000 Subject: [PATCH 5/5] fix(ui): hang the Answer home line below the home, out of layout flow The centred home stack no longer grows in Answer mode, so the home and its composer sit in the same place in every mode, on phones and desktop. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01QSauML59o7cTRNznSdX4sQ --- src/components/ClinicalDashboard.tsx | 10 +++++----- tests/answer-provider-notice.dom.test.tsx | 8 +++++--- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/components/ClinicalDashboard.tsx b/src/components/ClinicalDashboard.tsx index 93c1161766..35cca36dc0 100644 --- a/src/components/ClinicalDashboard.tsx +++ b/src/components/ClinicalDashboard.tsx @@ -2809,9 +2809,8 @@ 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, …). - // One grid item for the home and its line, so the canvas centres them together - // instead of splitting them into two stretched rows on tall desktop windows. -
+ // One grid item, so a tall canvas cannot split the home and its line into two rows. +
{/* 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. Below the home content, so the composer never moves. */} + 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 ? ( - + ) : null}
) : activeModeResultKind === "differentials" ? ( diff --git a/tests/answer-provider-notice.dom.test.tsx b/tests/answer-provider-notice.dom.test.tsx index 418ec10080..69c7788143 100644 --- a/tests/answer-provider-notice.dom.test.tsx +++ b/tests/answer-provider-notice.dom.test.tsx @@ -35,11 +35,13 @@ describe("AnswerProviderNotice", () => { 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*\s*]*\/>\s*\) : null\}\s*<\/div>/, + /
\s*]*\/>\s*\) : null\}\s*<\/div>/, ); expect(source).toMatch( /explicitDemoMode \|\|\s*answer\.demoMode === true[^?]*\? null : \(\s*