diff --git a/packages/app/src/session/timeline/virtualizer.tsx b/packages/app/src/session/timeline/virtualizer.tsx index 274b8f1df63..57a558ee4ec 100644 --- a/packages/app/src/session/timeline/virtualizer.tsx +++ b/packages/app/src/session/timeline/virtualizer.tsx @@ -279,11 +279,11 @@ export function createTimelineVirtualizer(input: Input) { let deferredTop: number | undefined let precommittedTop: number | undefined let flushScrollFrame: (() => void) | undefined - let lastHeaderWidth: number | undefined // Sizes held back from rows still streaming, applied once their text completes. const shrinks = new Map() - const [headerHeight, setHeaderHeight] = createSignal(48) + // The session header is a fixed 48px, the same fallback --sticky-accordion-top uses. + const headerHeight = 48 const virtualizer = createVirtualizer({ get count() { @@ -296,18 +296,7 @@ export function createTimelineVirtualizer(input: Input) { reportRect = (rect) => { const widthChanged = Math.abs(rect.width - (instance.scrollRect?.width ?? 0)) >= 1 if (widthChanged) rewrap() - const height = Math.max(0, rect.height - bottomInset()) - const root = listRoot() - batch(() => { - // The container-responsive header can be 48px or 80px; the composer covers the viewport's bottom edge. - if (root && (widthChanged || lastHeaderWidth !== rect.width)) { - lastHeaderWidth = rect.width - setHeaderHeight( - parseFloat(getComputedStyle(root).getPropertyValue("--session-header-height")) || 48, - ) - } - callback({ width: rect.width, height }) - }) + callback({ width: rect.width, height: Math.max(0, rect.height - bottomInset()) }) } return observeElementRect(instance, (rect) => { @@ -435,7 +424,7 @@ export function createTimelineVirtualizer(input: Input) { paddingEnd: tailSize, // Revealed prompts sit below the solid header and its 16px fade. get scrollPaddingStart() { - return input.showHeader() ? headerHeight() + 16 : 0 + return input.showHeader() ? headerHeight + 16 : 0 }, get rangeExtractor() { return rangeExtractor()