fix: scroll to bottom when sending a message while scrolled up#314
fix: scroll to bottom when sending a message while scrolled up#314
Conversation
Call scrollToBottom({ force: true }) before handleSubmit when the user
is scrolled up. This synchronously sets isAtBottom = true and starts a
smooth animation, so the library's own ResizeObserver picks up the new
content height naturally — no custom observer or ref signal needed.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughA memoized submit handler Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 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 |
Call scrollToBottom({ force: true }) before handleSubmit when the user is scrolled up. This synchronously sets isAtBottom = true and starts a smooth animation, so the library's own ResizeObserver picks up the new content height naturally — no custom observer or ref signal needed.
Summary by CodeRabbit