Repository navigation
fix(dashboard): Stop transcript jumps while scrolling up on mobile - #2634
Merged
Merged
Conversation
Transcript rows on phones used content-visibility: auto with a 12rem size estimate. Each row that had not rendered yet changed size when the reader scrolled near it, so the pinning hook corrected the scroll position while the reader scrolled. Lay rows out at their real size instead. Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
18 screenshot changes — 18 changed · 0 added · 0 removed Review screenshots in Frameshift Show 12 more changed screenshots |
BYK
approved these changes
Nov 3, 2026
thomasjiangcy
pushed a commit
that referenced
this pull request
Nov 4, 2026
Main CI on 38c8693 (#2625) fails `check / types`, `test / junior unit`, and `test / dashboard e2e`. **Types and unit.** #2625 added `web-batch-messages.test.ts` with `webActorFromEmail`. #2630 removed it. The test now uses `webActorFromUser(testViewer(...))`, the same fix as c1e36af in #2631. **Dashboard e2e.** `conversations-mobile.spec.ts` "keeps the message in view while earlier history and late content load" is flaky. It is not a regression from #2622 or #2625: - Main CI: failed on f23838b (#2622, which only changes `ReviewItemContext.tsx`) and 38c8693. Passed only on retry on 38597fb. Each of these failed at line 752, the last step (spacer above the reader). - #2634 added `scrollIntoViewIfNeeded()` right before that step. The scroll event fires on the next frame. When the test appends the spacer first, the transcript's scroll handler records the reader's place from the layout that already has the spacer. The resize correction then sees no shift. Local logs showed this order in every failure and the opposite order in every pass. - The test now waits one frame after each scroll so the scroll event runs first. Assertions are unchanged. Locally the last step went from 6 failures in 16 runs to 0 in 160. **Still open.** Under 4 parallel workers, 7 of the 160 local runs failed one step earlier (after the earlier page loads). I did not measure that step on main without this change. In the one failure I logged, the correction ran twice: `scrollTop` moved by exactly 2× the shift. That points to a product race in `transcriptBottomPinning.ts`, not a test race. This PR does not fix it. I have not seen it fail in CI. <!-- junior-request-attribution:start --> via @dcramer. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:agent%3A586024895340456299c9cfbe04e88e91 --> -- [View Session](https://junior-prod.sentry.dev/conversations/agent%3A586024895340456299c9cfbe04e88e91) [[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3A586024895340456299c9cfbe04e88e91/?project=4510944073809921) <!-- junior-session-footer:end --> --------- Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: David Cramer <23610+dcramer@users.noreply.github.com>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scrolling up through a loaded Conversation on a phone still jumps after #2511.
Cause. On narrow screens, transcript rows used
content-visibility: autowith a12remsize estimate. A row that has not rendered yet has that estimated size. When the reader scrolls near it, it renders and gets its real size. Above the reader, each change moves the content, so the pinning hook correctsscrollTopwhile the reader is still scrolling. On phones, a scroll write during a touch scroll shows as a jump.I measured this in Chromium at the mobile viewport, with 200 events of mixed length and one wheel scroll up through them:
mainFix. Transcript rows lay out at their real size. The scroll anchor now corrects the position only when the layout really changes above the reader, such as an earlier page or a late image. The sidebar list keeps
content-visibility, because its rows have a fixed height.The
-mx-2 px-2on rows kept control outlines inside the paint containment. Without containment it does nothing, so it is gone.Trade-off. Off-screen rows now cost layout on phones again. #2568 bounds this with a capped window and a virtual list.
The mobile earlier-history journey now scrolls up through the loaded rows and checks that the transcript makes no scroll corrections. It fails on
mainwith 11 corrections.Refs #2568
via @BYK.
--
View Session in Sentry