fix: 资料流提早显现内容,避免空白缺口被误认为到底

Reveal 加 300px 前置 viewport margin,内容在进入视口前淡入;
无限滚动预加载触发线 200px → 1000px,下一页提前请求。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
TerryM
2026-05-29 19:04:31 +08:00
parent 33a466841c
commit a7792c117d
2 changed files with 12 additions and 2 deletions

View File

@@ -62,7 +62,9 @@ export function MessageStream({ scope }: MessageStreamProps) {
}
}
},
{ rootMargin: "200px" },
// Prefetch the next page well before the sentinel is visible so content
// is already in place as the user scrolls — no blank gap at the bottom.
{ rootMargin: "1000px" },
);
io.observe(el);
return () => io.disconnect();