Assistant: scroll the thread to a new reply for real #134

Merged
steve merged 2 commits from fix/assistant-thread-scroll into main 2026-08-23 07:10:27 +00:00
Showing only changes of commit e184ae5565 - Show all commits
+5 -1
View File
@@ -40,8 +40,12 @@ export function AssistantTab({ gardenId, canEdit, undo, large = false }: { garde
// Deliberately NOT aborted on unmount: selecting a bed switches the rail to // Deliberately NOT aborted on unmount: selecting a bed switches the rail to
// the inspector, and that must not kill a turn mid-flight. The request runs // the inspector, and that must not kill a turn mid-flight. The request runs
// on; the exchange is persisted server-side; coming back shows it. // on; the exchange is persisted server-side; coming back shows it.
// Instant, not smooth: Chrome left the thread at the top with
// `behavior: 'smooth'` — a smooth scrollIntoView into this nested scroller
// never moved it, so every new reply landed out of view below a long
// conversation (found live, 2026-08-23). The instant form scrolls.
useEffect(() => { useEffect(() => {
bottom.current?.scrollIntoView({ behavior: 'smooth', block: 'end' }) bottom.current?.scrollIntoView({ block: 'end' })
}, [history.data, pending]) }, [history.data, pending])
const send = () => { const send = () => {