From 03175d2209bedc4bbde21c9f0391e361d4820fba Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 23 Sep 2026 10:33:06 +1000 Subject: [PATCH 1/2] fix(web): grow tool groups when details expand --- .../src/components/chat/MessagesTimeline.tsx | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/apps/web/src/components/chat/MessagesTimeline.tsx b/apps/web/src/components/chat/MessagesTimeline.tsx index 1ade3af63861..6161b958a1e6 100644 --- a/apps/web/src/components/chat/MessagesTimeline.tsx +++ b/apps/web/src/components/chat/MessagesTimeline.tsx @@ -3178,6 +3178,7 @@ function ExpandedWorkGroupEntries({ ); const [restoringPosition, setRestoringPosition] = useState(initialScrollIndex !== undefined); const listRef = useRef(null); + const [expandedContentHeight, setExpandedContentHeight] = useState(0); const [fades, setFades] = useState({ top: false, bottom: false, viewportHeight: 0 }); const [appendState, setAppendState] = useState({ entries, follow: false }); // Capture the pre-change edge once per incoming array, before new layout @@ -3260,6 +3261,19 @@ function ExpandedWorkGroupEntries({ [workspaceRoot], ); + const updateExpandedContentHeight = useCallback(() => { + const state = listRef.current?.getState(); + let height = 0; + for (const entryId of viewState.expandedEntries) { + if (state?.indexByKey(entryId) === undefined) continue; + // Keep the compact rows bounded, but give disclosed content its own space. + height += Math.max(0, (state.sizes.get(entryId) ?? 24) - 24); + } + setExpandedContentHeight(height); + }, [viewState]); + + useLayoutEffect(updateExpandedContentHeight, [entries, updateExpandedContentHeight]); + return ( @@ -3286,12 +3300,14 @@ function ExpandedWorkGroupEntries({ onLoad={handleLoad} onScroll={handleScroll} onLayout={updateScrollFades} + onItemSizeChanged={updateExpandedContentHeight} tabIndex={0} role="region" aria-label="Tool calls" data-tool-group-scroll + style={{ maxHeight: `calc(min(18rem, 50dvh) + ${expandedContentHeight}px)` }} className={cn( - "scrollbar-gutter-stable max-h-[min(18rem,50dvh)] scroll-py-6 overflow-x-hidden rounded-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring/70", + "scrollbar-gutter-stable scroll-py-6 overflow-x-hidden rounded-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring/70", getVirtualizedScrollFadeClassName(fades), )} /> From 073d796ea5539b35d42563da30f567b1e98f99d1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 23 Sep 2026 10:40:06 +1000 Subject: [PATCH 2/2] refactor(web): share compact tool row height --- apps/web/src/components/chat/MessagesTimeline.tsx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/apps/web/src/components/chat/MessagesTimeline.tsx b/apps/web/src/components/chat/MessagesTimeline.tsx index 6161b958a1e6..a6a5f44e62f7 100644 --- a/apps/web/src/components/chat/MessagesTimeline.tsx +++ b/apps/web/src/components/chat/MessagesTimeline.tsx @@ -3161,6 +3161,9 @@ function WorkingTimer({ createdAt }: { createdAt: string }) { ); } +// Matches the grouped WorkLog row's min-h-6. +const compactWorkEntryHeight = 24; + function ExpandedWorkGroupEntries({ anchorKey, disclosureAnchorKey, @@ -3266,8 +3269,11 @@ function ExpandedWorkGroupEntries({ let height = 0; for (const entryId of viewState.expandedEntries) { if (state?.indexByKey(entryId) === undefined) continue; - // Keep the compact rows bounded, but give disclosed content its own space. - height += Math.max(0, (state.sizes.get(entryId) ?? 24) - 24); + // Each open row adds room for its details, including while scrolled out of view. + height += Math.max( + 0, + (state.sizes.get(entryId) ?? compactWorkEntryHeight) - compactWorkEntryHeight, + ); } setExpandedContentHeight(height); }, [viewState]); @@ -3283,7 +3289,7 @@ function ExpandedWorkGroupEntries({ extraData={workspaceRoot} keyExtractor={workEntryKey} renderItem={renderEntry} - estimatedItemSize={24} + estimatedItemSize={compactWorkEntryHeight} drawDistance={240} recycleItems {...(initialScrollIndex ? { initialScrollIndex } : {})}