Repository navigation
fix(chat): jump to messages without scrolling animation - #27612
Conversation
📝 Walkthrough
Priority: ⬇️ Low Merge Risk: 🔵 Low · up to Native chat jumps request automatic scrolling, but no remaining test verifies that a rail jump lands immediately. Retaining a one-frame landing assertion would reduce the chance of an animation regression going unnoticed. Pre-merge checks |
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/renderer/src/components/native-chat/NativeChatMessageList.rail-history-jump.test.tsx (1)
147-153: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winRetain a one-frame landing assertion for rail jumps.
The remaining tests assert that callers request
behavior: 'auto'or eventually reach the bottom. They do not assert the row's rendered position after one frame. A regression could accept'auto'while still animating the rendered scroll, and these tests would pass. Keep or restore a rail-jump test that advances one frame and checks the row's landing position.
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
54af91c4-d4ba-46bd-8554-66449d1e9023
📒 Files selected for processing (4)
src/renderer/src/components/native-chat/NativeChatMessageList.rail-history-jump.test.tsxsrc/renderer/src/components/native-chat/NativeChatMessageList.subagent-sections.test.tsxsrc/renderer/src/components/native-chat/use-native-chat-transcript-window.options.test.tsxsrc/renderer/src/components/native-chat/use-native-chat-viewport-align.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
|
@coderabbitai Fixing. Will be in the next commit |
|
Tip For best results, initiate chat on the files or code changes.
You are interacting with an AI system. |
Smooth scrolling let rows measured mid-animation shift the target, so jumps could land short or cancel near the end of the transcript. Jumps now write the scroll offset directly, and the align hook keeps its target until the row settles. Tests assert no smooth scroll is requested and that a loaded target lands within one frame.
ELI5
Clicking an old message in the chat rail now jumps directly to it without a scrolling animation.
What Changed
The transcript alignment hook now uses immediate scrolling for message and diff navigation, including the fallback when the virtualized transcript is unavailable. Existing navigation tests expect immediate scrolling. Removed the reduced-motion-specific test because jumps no longer depend on that preference.
Why
Readers can reach older messages without waiting for the transcript to scroll past intervening content. Changing the existing alignment hook keeps its message positioning and older-history loading behavior instead of adding another navigation path or animation setting.
Linked Issue
No linked issue; requested directly by a maintainer.
Visual Proof
Before/after recording not captured. Reviewer check: open a long chat and click an older prompt in the right-hand message rail; the selected message should appear at the top immediately. Repeat with a prompt whose older history needs to load.
Testing
Passed on macOS:
pnpm tc:webpnpm run check:code-quality:changedRendered Electron, Linux, Windows, and SSH checks were not run locally. Full lint, typecheck, test, and build remain for CI.
Review
Self-reviewed the virtualized and fallback alignment paths and the updated assertions.
Agent skill upstream boundary
Notes
Renderer-only scrolling change; no platform-specific paths, keyboard shortcuts, workspace assumptions, or remote protocol changes.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)