Skip to content

Commit f723ed9

Browse files
authored
fix(channels): satisfy thread scroll dependencies
Drive the thread auto-scroll effect from the memoized timeline and agent phase so React Doctor sees complete dependencies without maintaining partial message fields. Generated-By: PostHog Code Task-Id: 87a79e23-20c4-440b-818b-28154924ffbc
1 parent c9cb075 commit f723ed9

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

packages/ui/src/features/canvas/components/ThreadPanel.tsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -425,16 +425,10 @@ function ThreadConversation({
425425
[taskId],
426426
);
427427

428-
// biome-ignore lint/correctness/useExhaustiveDependencies: scroll on new content
428+
// biome-ignore lint/correctness/useExhaustiveDependencies: scroll when rendered thread content changes
429429
useEffect(() => {
430430
scrollRef.current?.scrollTo({ top: scrollRef.current.scrollHeight });
431-
}, [
432-
messages.length,
433-
promptMsgs.length,
434-
agentMsgs.length,
435-
agentMsgs[agentMsgs.length - 1]?.text,
436-
agentStatus?.phase,
437-
]);
431+
}, [timeline, agentStatus?.phase]);
438432

439433
const isTaskAuthor =
440434
!!currentUser?.uuid && currentUser.uuid === task.created_by?.uuid;

0 commit comments

Comments
 (0)