fix(web): fix scroll position for references further down in a file#1036
fix(web): fix scroll position for references further down in a file#1036brendan-kellam merged 2 commits intomainfrom
Conversation
Uses lineBlockAt() instead of coordsAtPos() to get line positions from CodeMirror's internal height map, which works correctly for virtualized lines that haven't been rendered yet. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This comment has been minimized.
This comment has been minimized.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughThis pull request fixes scroll positioning in the chat UI when selecting chat references that target lines located further down in a file. The CHANGELOG documents the fix. The implementation replaces scroll coordinate calculation in referencedSourcesListView.tsx to use CodeMirror's document layout API instead of the previous coordinate method. Changes
Possibly related PRs
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 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 |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Summary
coordsAtPos()withview.lineBlockAt()to get line positions from CodeMirror's internal height mapcodeMirrorRectfor coordinate calculation instead of relying oncoords.topfrom the potentially-unrendered lineTest plan
🤖 Generated with Claude Code
Summary by CodeRabbit