fix: keep question dock submit anchored#469
Conversation
|
Warning Rate limit exceeded
To continue reviewing without waiting, purchase usage credits in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
✨ Finishing Touches🧪 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.
Code Review
This pull request addresses issues with unexpected scroll jumps in the session question dock. Key changes include the introduction of a focusWithoutScrolling utility to prevent the browser from scrolling when focusing elements and enhancements to the renderer diagnostics to more accurately detect scroll incidents following a submission. Additionally, new E2E and unit tests were added to verify the scrolling behavior and diagnostic logic. I have no feedback to provide.
Summary
Why
Long sessions could jump from the latest turn to near the top after the user submitted a message and the assistant entered a pending
questiontool state. The user then lost the question dock position and had to manually scroll back down to answer.Root cause boundary: this is a frontend session scroll/focus contract issue. The fix stays in the question dock focus behavior, session renderer diagnostics, and focused regression coverage. It does not touch backend question tools, blocker ledger, SSE replay, persistence, or protocol/schema layers.
Related Issue
Closes #467
Human Review Status
Pending. A human should make the final merge decision after reviewing the final diff and verification evidence.
Review Focus
preventScrollwithout breaking keyboard focus or option navigation.Risk Notes
Low frontend risk.
preventScrollchanges only programmatic focus insideSessionQuestionDock; keyboard focus is still assigned and covered by the existing keyboard E2E. Diagnostics detection remains gated by recent submit and previous near-bottom state to avoid broad false positives.How To Verify
Screenshots or Recordings
Not included. This bug is hard to reproduce manually in the desktop shell, so the behavior is locked with a deterministic Playwright path: long visible history, real visible prompt submit, pending question dock, timeline remains near bottom. Existing and new E2E also verify keyboard focus still works.
Checklist
dev, and my PR title and commit messages use Conventional Commits in English