mirror of
https://github.com/SableClient/Sable.git
synced 2026-11-20 09:01:17 -08:00
The scroll queued at TimelineReset fires when range.end=0 (SDK fires Reset before populating the fresh timeline), so the DOM is empty and the scroll is a no-op. The stay-at-bottom effect then correctly expands the range but never re-queues a scroll, leaving the user at the wrong position. Fix: increment scrollToBottomRef.count in the stay-at-bottom effect before calling setTimeline. The next render sees the new count, the useLayoutEffect fires, and scroll-to-bottom runs against the now-populated DOM. Also adds monitoring: - Sentry breadcrumb (ui.scroll) recording each range expansion + scroll, with rangeGap, eventsLength, and wasReset fields for Replay analysis. - slidingSync onFirstRoomData now records the live-timeline event count at subscription activation time as a Sentry metric and breadcrumb, making the list-to-subscription page size visible in dashboards.