Skip to content

fix(chat): load a bubble-sized rendition for chat photos - #1758

Merged
bmc08gt merged 1 commit into
code/cashfrom
fix/chat-photo-preview-rendition
Oct 11, 2026
Merged

bmc08gt merged 1 commit into
code/cashfrom
fix/chat-photo-preview-rendition

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Oct 11, 2026

Copy link
Copy Markdown
Collaborator

A user reported photos in a group chat staying on the BlurHash. The bubble was downloading the full-size original for every photo: the group's last three were 3.5, 3.8 and 5.5 MB, while the server also sends 800 and 1600px renditions of each. On a slow link the BlurHash stays up for the whole download, and leaving the chat cancels it, so the next visit starts over.

  • MediaMessageBubble loads renditionForSize(bubble width), falling back to the original when the server derived nothing. Sealed photos and photos still being sent only have the original.
  • ChatPhotoSource carries the original separately as fullModel. The viewer and share use it, with the bubble's cached rendition as the placeholder while it loads.
  • ChatPhotoFetcher logs when a download starts (role and size), finishes, or is cancelled. Disk-cache hits stay quiet.
  • ChatViewModel logs when the viewer starts or stops previewing a group, since that blurs every photo with nothing on screen saying why.

On a Seeker, the Pokemon TCG group's bubbles downloaded the DISPLAY rendition (110–180 KB, about 0.5 s each), and opening one full screen downloaded the 750 KB original.

A photo bubble downloaded the full-size original, 3.5-5.5 MB for the
recent photos in one group, though the server also derives 800 and
1600px renditions. On a slow link the BlurHash stayed up for the whole
download, and leaving the chat cancelled it.

The bubble now loads the smallest derived rendition that fills its
width and falls back to the original when there is none (sealed photos,
or ones still processing). The viewer and share still use the original,
with the bubble's cached image as the placeholder.

Also logs when a photo download starts, finishes or is cancelled, and
when a chat switches to previewing, which blurs every photo in it.
@bmc08gt bmc08gt self-assigned this Oct 11, 2026
@github-actions github-actions Bot added the type: fix Bug fix label Oct 11, 2026
@bmc08gt
bmc08gt merged commit ed54a32 into code/cash Oct 11, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant