feat: Auto-scroll to latest logs for worker sub-tasks#1318
feat: Auto-scroll to latest logs for worker sub-tasks#1318Wendong-Fan merged 25 commits intoeigent-ai:mainfrom
Conversation
|
Can you make a screenshot in the description? Thanks. |
22.02.2026_17.31.15_REC.mp4Hi, I have added screen recording, I added test button for mock testing. (not mentioned on PR, only for test) |
|
could you please review, @bytecii @Wendong-Fan |
|
@bytecii @Wendong-Fan could you please review this PR? |
|
@bytecii I added screenshot for this update, please check once you are available. |
|
@bytecii @Wendong-Fan I see this PR remains opening for several weeks. Regards |
|
Could you let me know your plan, @bytecii @fengju0213 @Wendong-Fan ? Regards |
Wendong-Fan
left a comment
There was a problem hiding this comment.
thanks @spider-yamet 's contribution and sorry for the late review, left some comments below
src/components/WorkFlow/node.tsx
Outdated
|
|
||
| useEffect(() => { | ||
| if (!isExpanded || !selectedTask?.toolkits?.length) return; | ||
| wasAtBottomRef.current = true; |
There was a problem hiding this comment.
wasAtBottomRef.current is reset to true on each toolkit update, so the log panel still jumps to the bottom even if the user has scrolled up to read older logs? i think we should respect users' action
src/components/WorkFlow/node.tsx
Outdated
| const toolkits = selectedTask?.toolkits; | ||
| if (!toolkits?.length) return undefined; |
There was a problem hiding this comment.
The effect depends on useMemo([selectedTask?.toolkits]), but toolkits is mutated in place in chatStore, so some log/message updates may not retrigger auto-scroll
|
@Wendong-Fan Thanks for your feedback, I updated code by following your feedback. Functional behavior diffBefore
After
I tested functionality on my end. |
…spider-yamet/eigent into feat/auto-scroll-to-latest-logs
|
@Wendong-Fan Could you please review current update? :) |
- Remove dead deadline logic in scrollLogToBottom - Remove message from toolkitChangeKey to avoid excessive scroll triggers during streaming - Reset wasAtBottomRef when switching tasks so new task always scrolls to bottom
Wendong-Fan
left a comment
There was a problem hiding this comment.
thanks @spider-yamet , added some enhance in ce13c79, now LGTM
Related Issue
Closes #1315
Description
Implements auto-scroll for the worker sub-task log panel in the Workflow view so the latest toolkit logs stay visible without manual scrolling.
Changes:
src/components/WorkFlow/node.tsx: When the workflow node is expanded and a task is selected, the right-hand log panel (which showsselectedTask.toolkits) now scrolls to the bottom when:This addresses the behavior requested in #1315 (auto-scroll so latest logs are always visible).
Testing Evidence (REQUIRED)
(Attach a short screen recording or screenshots showing: workflow node expanded, task running with toolkit logs, log panel auto-scrolling to the latest entry as new logs appear; optionally, scrolling up and confirming it does not override until you scroll back near the bottom.)
What is the purpose of this pull request?
Contribution Guidelines Acknowledgement