fix(miner-ui): chat rail stick-to-bottom auto-scroll - #7298
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-19 13:36:40 UTC
Review summary Nits — 5 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. Visual preview
Click any thumbnail to open the full-size screenshot. Before = production · After = this PR's preview deploy. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
…ic (#7847) apps/loopover-miner-ui/src/lib/chat-scroll.ts (isChatViewportNearBottom, scrollChatViewportToBottom, CHAT_NEAR_BOTTOM_PX) had no direct test despite already needing a dedicated bug-fix once (#7229/#7298), and message-list.test.tsx only covers DOM structure, not the scroll math. Add a co-located unit test following the one-test-per-pure-module convention (demo-data.test.ts): cover isChatViewportNearBottom's <= 80px boundary on both sides, short-content and custom-threshold cases, and scrollChatViewportToBottom's Math.max(0, ...) clamp.
Summary
ScrollAreawith optionalviewportRefto the Radix Viewport.MessageListstick-to-bottom auto-scrolls on new messages / content resize; respects manual scroll-up.StreamingTextinto the same ScrollArea via afooterslot so streaming stays in view.Closes #7229
Before / after
Test plan
npm --workspace @loopover/ui-miner run test(includes scrollTop regression cases)npm --workspace @loopover/ui-miner run typecheck