Skip to content

Commit cb0ca68

Browse files
fix(sessions): smooth conversation scroll-up jank (#2960)
1 parent d5fa6c2 commit cb0ca68

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

packages/ui/src/features/sessions/components/VirtualizedList.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,10 @@ export interface VirtualizedListHandle {
3939

4040
const AT_BOTTOM_THRESHOLD = 50;
4141
const ESTIMATED_ROW_SIZE = 80;
42-
const OVERSCAN = 6;
42+
// Render rows well ahead so tall, async rows (markdown, code, diffs) measure and
43+
// paint off-screen instead of shifting and stuttering as they enter view. 12
44+
// erases the scroll-up shift empirically; higher only adds DOM cost.
45+
const OVERSCAN = 12;
4346
// A real upward drift, not a 1-frame measure transient: the DOM bottom sits
4447
// this far below the viewport. Well above any single append's measure gap.
4548
const FAR_DRIFT_THRESHOLD = 400;

0 commit comments

Comments
 (0)