Skip to content

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

Closed
macodev00 wants to merge 1 commit into
mainfrom
cursor/android-safe-transcript-slices-96b0
Closed

macodev00 wants to merge 1 commit into
mainfrom
cursor/android-safe-transcript-slices-96b0

Conversation

@macodev00

Copy link
Copy Markdown
Owner

What Changed

On Android, a long settled assistant message is no longer one list row. It is split into bounded markdown rows, and a code fence longer than 16 lines is windowed into plain text rows. Android also recycles transcript rows. iOS is unchanged.

Each markdown slice is parsed as its own document, so slices are cut only where that stays valid:

  • Lists, blockquotes, GFM tables, HTML blocks, and setext headings stay intact, including lazy continuation.
  • Inline links, images, emphasis, inline code, autolinks, and raw HTML are not cut.
  • Link reference definitions are copied onto a slice that uses them.
  • A backtick fence whose info string contains a backtick stays prose.
  • A construct longer than the budget stays one row instead of being hard-split.
  • Short messages, and a single short fence, stay on the highlighted renderer.

Fixes pingdotgg#13925

Why

Scrolling a long settled thread on Android stalls on the UI thread while Fabric mounts one large selectable text tree, then mounts it again when the row comes back. Smaller rows plus container reuse remove that hitch. The previous attempt cut text at arbitrary offsets, so a link, list, or quote that crossed a boundary rendered as plain prose. This split refuses those cuts.

UI Changes

Android transcript scrolling only. This environment has no Android emulator, so there are no before/after frames. Slice boundaries are covered by apps/mobile/src/features/threads/androidTranscriptSlices.test.ts.

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 

Long settled assistant messages mounted as one selectable text tree, so
scrolling them back into view stalled the Android UI thread. Split those
messages only at markdown-safe boundaries, window long code fences, and
recycle Android list rows.

Fixes pingdotgg#13925
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XXL 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:XXL 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