Skip to content

Commit 8e290fc

Browse files
committed
fix(web): prevent auto-scroll when toggling work log expansion
Expanding a work log group during a running session would trigger scheduleStickToBottom via the timelineEntries effect, yanking the viewport to the bottom. Disable auto-scroll on toggle so the user stays where they clicked; the scroll-to-bottom button is shown if they want to jump back.
1 parent 644b808 commit 8e290fc

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

apps/web/src/components/ChatView.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3435,6 +3435,8 @@ export default function ChatView({ threadId }: ChatViewProps) {
34353435
return false;
34363436
};
34373437
const onToggleWorkGroup = useCallback((groupId: string) => {
3438+
shouldAutoScrollRef.current = false;
3439+
setShowScrollToBottom(true);
34383440
setExpandedWorkGroups((existing) => ({
34393441
...existing,
34403442
[groupId]: !existing[groupId],

0 commit comments

Comments
 (0)