Conversation
Long settled assistant messages mounted as one selectable text tree, so scrolling them back into view stalled the Android UI thread. On Android, split those messages only at markdown-safe boundaries, window long code fences, and recycle list rows. Empty fences, multiline link definitions, nested same-name HTML, indented fence bodies, and textarea blocks stay intact. Recycled code rows key off the full fence so scroll position and copy state do not leak across blocks. Fixes pingdotgg#13925
Owner
Author
|
Opened upstream. |
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.
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:
<textarea>blocks stay intact through</textarea>.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. Slice boundaries stay on markdown constructs so a link, list, quote, or code fence is not rendered as plain prose.
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