Skip to content

The agent that grows with you

fix(desktop): let sidebar wheel scrolling chain past the virtualized list

Teknium6b39ae490d7b
diff --git a/apps/desktop/src/app/chat/sidebar/virtual-session-list.test.tsx b/apps/desktop/src/app/chat/sidebar/virtual-session-list.test.tsx
index 3dec464df15..54d98c150c6 100644
--- a/apps/desktop/src/app/chat/sidebar/virtual-session-list.test.tsx
+++ b/apps/desktop/src/app/chat/sidebar/virtual-session-list.test.tsx
@@ -82,4 +82,29 @@ describe('VirtualSessionList', () => {
expect(spacer?.style.paddingTop).toBe('')
expect(spacer?.style.paddingBottom).toBe('')
})
+
+ it('lets wheel overscroll chain to the outer sidebar scroller (#84964)', () => {
+ const { getByTestId } = render(
+ <VirtualSessionList
+ activeSessionId={null}
+ onArchiveSession={noop}
+ onDeleteSession={noop}
+ onResumeSession={noop}
+ onTogglePin={noop}
+ pinned={false}
+ rows={rows}
+ sortable={false}
+ />
+ )
+
+ const scroller = getByTestId('divider-Today').parentElement?.parentElement?.parentElement
+
+ // The inner virtualized scroller must NOT contain overscroll: it is nested
+ // inside the sidebar's own scroll container, and containing it swallowed
+ // wheel events at the inner scroll boundary — the mid-list wheel dead-zone
+ // at 25+ sessions. Chaining stays inside the sidebar because the OUTER
+ // scroller keeps overscroll-contain.
+ expect(scroller?.className).toContain('overflow-y-auto')
+ expect(scroller?.className).not.toContain('overscroll-contain')
+ })
})
diff --git a/apps/desktop/src/app/chat/sidebar/virtual-session-list.tsx b/apps/desktop/src/app/chat/sidebar/virtual-session-list.tsx
index 48cbe683960..5e4e93cca91 100644
--- a/apps/desktop/src/app/chat/sidebar/virtual-session-list.tsx
+++ b/apps/desktop/src/app/chat/sidebar/virtual-session-list.tsx
@@ -155,10 +155,16 @@ export const VirtualSessionList: FC<VirtualSessionListProps> = ({
// fade bar reserves its 4px on every platform but stays invisible until
// hover — and the wrapper no longer stacks a second scroller, so the
// double-gutter this class change was reaching for is already gone.
- className={cn(
- 'scrollbar-fade relative min-h-0 flex-1 overflow-x-hidden overflow-y-auto overscroll-contain',
- className
- )}
+ //
+ // No `overscroll-contain` here: this scroller is NESTED inside the
+ // sidebar's own scroll container (index.tsx SCROLL_Y). Containing
+ // overscroll on the inner scroller swallowed wheel events at its scroll
+ // boundaries instead of chaining them to the outer sidebar scroller,
+ // which read as a wheel dead-zone mid-list once 25+ sessions
+ // virtualized (#84964) — the scrollbar still dragged, only the wheel
+ // died. The outer sidebar scroller keeps its own overscroll-contain, so
+ // the gesture still never escapes the sidebar.
+ className={cn('scrollbar-fade relative min-h-0 flex-1 overflow-x-hidden overflow-y-auto', className)}
ref={scrollerRef}
>
<div className="relative" style={{ height: `${totalSize}px` }}>