From 4782e2f1a4afde72a99e92707efae53ff5457493 Mon Sep 17 00:00:00 2001 From: Daniel Date: Sat, 12 Sep 2026 20:34:46 +0200 Subject: [PATCH] fix: AI Mode opens on the starters, not on a paragraph about itself MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The rules were explained before anybody had asked anything. What the assistant will and will not do is visible in the answers themselves — each carries its sources, or says it has none — and a page that explains itself up front is a page nobody reads. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01TqXevQJhxFrM7jJg82cgZN --- frontend/src/pages/AiModePage.jsx | 5 ----- frontend/src/pages/AiModePage.test.jsx | 9 +++++++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/frontend/src/pages/AiModePage.jsx b/frontend/src/pages/AiModePage.jsx index b6abae0..262cc31 100644 --- a/frontend/src/pages/AiModePage.jsx +++ b/frontend/src/pages/AiModePage.jsx @@ -443,11 +443,6 @@ export default function AiModePage() { {blank && (
-

- Answers come from your own articles, questions and cards, and each one - carries the source it came from. If your library does not cover - something, it says so instead of filling the gap. -

    {starters.map(starter => (
  • diff --git a/frontend/src/pages/AiModePage.test.jsx b/frontend/src/pages/AiModePage.test.jsx index bf7267c..e46bfea 100644 --- a/frontend/src/pages/AiModePage.test.jsx +++ b/frontend/src/pages/AiModePage.test.jsx @@ -109,10 +109,15 @@ describe('AI Mode', () => { expect(await screen.findByRole('button', { name: 'What is jaundice?' })).toBeInTheDocument() }) - it('is honest about what it will not do before you ask', async () => { + it('opens on the starters, with nothing to read first', async () => { + // The paragraph that used to explain the rules here is gone. What the + // assistant will and will not do is visible in the answers themselves — + // every one carries its sources, or says it has none — and a page that + // explains itself before anyone has asked anything is a page nobody reads. mockApi([]) mount() - expect(await screen.findByText(/says so instead of filling the gap/)).toBeInTheDocument() + expect(await screen.findByRole('button', { name: /What does my library say about managing bronchiolitis/ })).toBeInTheDocument() + expect(document.querySelector('.ai-tip')).toBeNull() }) it('deletes a thread and moves off it', async () => {