Skip to content

fix(mobile): smooth Android scrolling through long settled threads - #59

Closed
macodev00 wants to merge 1 commit into
mainfrom
cursor/android-transcript-scroll-c586
Closed

macodev00 wants to merge 1 commit into
mainfrom
cursor/android-transcript-scroll-c586

Conversation

@macodev00

Copy link
Copy Markdown
Owner

What Changed

Android transcript scrolling now recycles LegendList row containers and splits expensive assistant messages into bounded slices. Short messages, and a single short code fence, stay on the highlighted markdown renderer. iOS still uses one row per message and does not recycle those containers.

A code fence longer than 16 lines is drawn as plain monospace windows (one non-selectable Text per window). The header copy button still copies the whole fence. GFM tables stay intact.

Why

On Android, each assistant message was one LegendList row and recycleItems defaults to false. Scrolling a long settled thread (tool-call groups and code blocks) remounted the entire selectable text tree on the UI thread (ReactTextView / DynamicLayout) and dropped frames. Web and desktop stay smooth because they do not pay that native text-mount cost.

Recycling the container and capping each row (about 720 characters of prose, or 16 lines of code) keeps a re-entry mount inside a frame. The first slice keeps the message id, and later slices append, so live-follow and scroll-to-end still pin the tail as it grows. User-message anchors are not sliced.

Fixes pingdotgg#13925

pingdotgg#13925

UI Changes

No before/after frames. This environment has no Android emulator, so device frame times were not captured. Unit tests cover the slice splitter, stable ids while a message grows, and the iOS identity path. Mobile tsc is clean.

On Android only, a long code fence loses per-token syntax colors and is shown as joined monospace windows. Copy of the full fence is unchanged. Short fences stay highlighted.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes
Open in Web Open in Cursor 

A settled assistant message was one list row, so scrolling it back into
view mounted the whole text tree on the UI thread in a single frame.
Android now recycles those containers and splits expensive messages into
bounded slices. Live-follow still pins the end as the tail grows.

Fixes pingdotgg#13925
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XL labels Sep 28, 2026
@macodev00

Copy link
Copy Markdown
Owner Author

Opened upstream.

@macodev00 macodev00 closed this Sep 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug][Mobile] Android: scrolling a long, settled thread is janky

1 participant