Skip to content

fix(dashboard): Stop transcript jumps while scrolling up on mobile - #2634

Merged
BYK merged 1 commit into
mainfrom
fix/dashboard-transcript-row-size
Nov 3, 2026
Merged

BYK merged 1 commit into
mainfrom
fix/dashboard-transcript-row-size

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Scrolling up through a loaded Conversation on a phone still jumps after #2511.

Cause. On narrow screens, transcript rows used content-visibility: auto with a 12rem size 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 corrects scrollTop while 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:

Scroll corrections
main ~50 (−99 px to +655 px each)
This PR 1 (the earlier page insert)

Fix. 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-2 on 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 main with 11 corrections.

Refs #2568

via @BYK.

--

View Session in Sentry

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>
@vercel

vercel Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
junior-docs Ready Ready Preview Nov 3, 2026 10:14pm UTC

Request Review

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

18 screenshot changes — 18 changed · 0 added · 0 removed

Review screenshots in Frameshift

Automation Page · Desktop
Automation Page · Desktop
Changed
Automation Run Details · Desktop
Automation Run Details · Desktop
Changed
Automation Run Details Light · Desktop
Automation Run Details Light · Desktop
Changed
Conversation Attachment · Mobile
Conversation Attachment · Mobile
Changed
Conversation Child Agent Drawer · Mobile
Conversation Child Agent Drawer · Mobile
Changed
Conversation Child Agent Page · Mobile
Conversation Child Agent Page · Mobile
Changed
Show 12 more changed screenshots
Conversation Child Agents · Mobile
Conversation Child Agents · Mobile
Changed
Conversation Detail · Mobile
Conversation Detail · Mobile
Changed
Conversation Detail Focused · Mobile
Conversation Detail Focused · Mobile
Changed
Conversation Details Sheet · Mobile
Conversation Details Sheet · Mobile
Changed
Conversation Details Sheet Light · Mobile
Conversation Details Sheet Light · Mobile
Changed
Conversation Fork Dialog · Mobile
Conversation Fork Dialog · Mobile
Changed
Conversation Fork Links · Mobile
Conversation Fork Links · Mobile
Changed
Conversation Review Item Card · Mobile
Conversation Review Item Card · Mobile
Changed
Conversation Review Item Dismissed · Mobile
Conversation Review Item Dismissed · Mobile
Changed
Conversation Unread Marker · Mobile
Conversation Unread Marker · Mobile
Changed
Review Desk Item · Mobile
Review Desk Item · Mobile
Changed
Settings Mcp · Desktop
Settings Mcp · Desktop
Changed

@BYK
BYK merged commit ec3f4cd into main Nov 3, 2026
62 of 63 checks passed
@BYK
BYK deleted the fix/dashboard-transcript-row-size branch November 3, 2026 22:41
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

1 active deployment
Preview – junior-docs — b3d588da Deployed Nov 3, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: high PR risk score: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant