Repository navigation
fix(wework): stop streaming scroll jitter - #2425
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe change adds desktop scroll-stability sampling and bottom-relative user scrolling. It disables virtualizer scroll adjustment during item-size changes. It strengthens the streaming-text E2E scenario and updates its English and Chinese documentation. ChangesStreaming scroll stability
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant StreamingScenario
participant DesktopAutomation
participant MessageListVirtualizer
StreamingScenario->>DesktopAutomation: Start scroll-stability sampling
StreamingScenario->>DesktopAutomation: Scroll upward from the bottom
StreamingScenario->>MessageListVirtualizer: Stream delayed response chunks
MessageListVirtualizer-->>StreamingScenario: Avoid scroll adjustment on size changes
DesktopAutomation-->>StreamingScenario: Return anchor and scroll-event samples
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@wework/src/e2e/automation.ts`:
- Around line 893-903: Validate options.durationMs in the
startScrollStabilitySampling case before starting sampling, requiring a finite
positive number and rejecting invalid values with an error. Preserve the 1,000
ms default when durationMs is omitted, and ensure only the validated duration
reaches the sampling interval/completion logic.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 16031cfb-532f-44e6-864a-db553bfbaa13
📒 Files selected for processing (6)
docs/en/wework/developer-guide/wework-e2e-automation.mddocs/zh/wework/developer-guide/wework-e2e-automation.mdwework/e2e/desktop/scenarios/streaming-text.scenario.mjswework/src/components/chat/MessageList.tsxwework/src/components/chat/MessageList.virtualization.test.tsxwework/src/e2e/automation.ts
Summary
Root cause
TanStack Virtual adjusted
scrollTopwhen the active streaming row changed size, whileScrollableMessageAreaindependently restored the user viewport anchor. Both controllers wrote the same scroll container during streaming.Verification
scrollevents after the user stopped scrolling.scrollevents across 22 stability samples.pnpm --filter wework test— 269 files, 2689 tests passedpnpm --filter wework exec vitest run src/components/chat/MessageList.virtualization.test.tsx— 9 tests passedpnpm --filter wework e2e:desktop:streaming-textpassed after merging the latestmainpnpm --filter wework ai:verifysession reached the complete desktop workbench and was stopped cleanlyE2E evidence
wework/test-results/desktop-e2e/2026-08-04T17-51-29-489Z-34562Summary by CodeRabbit
Bug Fixes
Documentation