From 25df856e009b7e3a6729eb52fa1a73b9352132ab Mon Sep 17 00:00:00 2001 From: Mike Fara Date: Sat, 31 Oct 2026 00:59:08 -0400 Subject: [PATCH] Place the BSOD AI chat under the results It opened between the summary strip and the report, pushing a long report down. It now sits right after the results, and opening it scrolls it into view from the wand in the strip. Co-Authored-By: Claude Sonnet 5.5 --- pages/Analyzer.tsx | 18 ++++++++++++++---- styles.css | 2 +- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/pages/Analyzer.tsx b/pages/Analyzer.tsx index a455826..88e0dbe 100644 --- a/pages/Analyzer.tsx +++ b/pages/Analyzer.tsx @@ -205,6 +205,14 @@ const Analyzer: React.FC = () => { wasLive.current = live; }, [live]); + // The chat sits under the results, which can be far below the wand: bring it into view when it opens. + useEffect(() => { + if (!aiOpen) return; + const reduce = window.matchMedia('(prefers-reduced-motion: reduce)').matches; + const id = setTimeout(() => document.getElementById('bsod-ai-chat')?.scrollIntoView({ behavior: reduce ? 'auto' : 'smooth', block: 'nearest' }), 0); + return () => clearTimeout(id); + }, [aiOpen]); + const analyzerStructuredData = { "@context": "https://schema.org", "@graph": [ @@ -324,9 +332,6 @@ const Analyzer: React.FC = () => { )} - {summaryOpen && !live && aiOpen && fresh.length > 0 && ( - { setAiOpen(false); setTimeout(() => wandRef.current?.focus(), 0); }} /> - )} {error && } @@ -353,7 +358,12 @@ const Analyzer: React.FC = () => { showAds={true} AdComponent={InFeedAd} /> - + + {/* Under the report it is about, not above it: the wand in the summary strip opens it and scrolls here. */} + {summaryOpen && !live && aiOpen && fresh.length > 0 && ( + { setAiOpen(false); setTimeout(() => wandRef.current?.focus(), 0); }} /> + )} + {/* Vertical ad on desktop, shown alongside results */} {dumpFiles.some(df => df.status !== FileStatus.PENDING) && (