fix(frontend): reset live log follow state on resume

This commit is contained in:
User
2026-07-15 12:04:05 +02:00
parent 279b79516c
commit 00c1af5a5a
2 changed files with 43 additions and 1 deletions
+5 -1
View File
@@ -21,9 +21,13 @@ export function CentralStatus({ working }: { working: boolean }) {
const followRef = useRef(true);
useLayoutEffect(() => {
if (!working) {
followRef.current = true;
return;
}
const viewport = scrollRef.current;
if (viewport && followRef.current) viewport.scrollTop = viewport.scrollHeight;
}, [rowCount, tail]);
}, [working, rowCount, tail]);
if (!working || rows.length === 0) return null;