Uh oh!
There was an error while loading. Please reload this page.
fix(mothership): keep scroll position when user scrolls up during streaming - #5639
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview Mothership chat: Sets
Subagent Reviewed by Cursor Bugbot for commit edca7bf. Bugbot is set up for automated code reviews on this repo. Configure here. |
TheodoreSpeaks
commented
Jul 13, 2026
@greptile review |
Greptile SummaryThis PR changes chat auto-scroll behavior during streaming. The main changes are:
Confidence Score: 4/5The changed scroll reattach paths can leave streaming views detached after content height changes.
apps/sim/hooks/use-auto-scroll.ts; apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/agent-group/agent-group.tsx Important Files Changed
Reviews (1): Last reviewed commit: "fix(mothership): keep scroll position wh..." | Re-trigger Greptile |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Greptile SummaryThis PR changes streaming chat scroll behavior so scrolling up no longer gets pulled back down. The main changes are:
Confidence Score: 4/5The virtualizer resize predicate needs a fix before merging.
apps/sim/app/workspace/[workspaceId]/home/components/mothership-chat/mothership-chat.tsx Important Files Changed
Reviews (1): Last reviewed commit: "fix(mothership): keep scroll position wh..." | Re-trigger Greptile |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Summary
shouldAdjustScrollPositionOnItemSizeChange— set as an instance property, since it's silently ignored when passed as auseVirtualizeroption.useAutoScroll: re-attach now requires downward motion, so a small upward flick's own scroll event (still within the 5px re-attach window) can't instantly undo the detach.BoundedViewportsticky scroll.Type of Change
Testing
Repro'd and verified live against dev with scripted wheel gestures: upward scroll mid-stream now holds position while content grows below; pinned-at-bottom following and scroll-back-down re-attach still work.
bun run lint:checkandbun run check:api-validation:strictpass.Checklist
🤖 Generated with Claude Code
https://claude.ai/code/session_01HE5rFzcWAZ3HwCKneEgD9n