Repository navigation
fix(web): decode timeline image attachments asynchronously - #19923
Merged
juliusmarminge merged 3 commits intoOct 20, 2026
Merged
Conversation
2 tasks done
Contributor
Member
|
Taking over this one as maintainer for composer-chat-01. Resuming the existing worktree, preserving the focused async decode hint and original author commits; I will verify it on current main before pushing. |
TheDarkPhantom
added a commit
to TheDarkPhantom/avicode
that referenced
this pull request
Oct 26, 2026
…#19923) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
Large stored image attachments can stall the timeline during decoding. Add
decoding="async"to the regular user attachment image, including the existing HEIC wrapper. This keeps image URLs and layout intact and applies to web and the shared Electron UI.Fixes #19922. Maintainer takeover of #19923; original implementation and synthetic reproduction by @rohan-patnaik. Original author commit retained; main merged without rebasing.
At 25b51d885d:
MessagesTimeline.logic.test.ts,timelineScrollAnchoring.test.tsx, andExpandedImagePreview.test.ts. Added tests: 0 before → 0 after; no attribute-only assertions.git diff --checkpass.The running app was measured in headless Linux Chromium at 1280 × 800 with 13 synthetic 4590 × 8160 stored JPEGs and fresh blob URLs for cold decoding. Three six-second unrecorded trials had maximum frame gaps of 2800/2917/2950 ms on the base versus 267/2567/1317 ms with async decoding. P95 was 17–33 ms on the base and 83–133 ms after. All 13 images loaded. These results support reducing the worst freeze, not uniformly smoother frames; async decoding can defer visible pixels. Raw frame intervals. Current uploads resize images; this fixture represents stored originals.
Before (base, settled images):

After (head, same viewport, fixture, and scroll position):

Before recording · After recording. Recording adds overhead and is separate from the measurements.
Not verified: macOS, Windows, iOS, Android, native Electron desktop, Safari, Firefox, or remote/relay/tunnel browsers. No provider turn was sent. Human review of the performance tradeoff remains required; unmerged.
Model: GPT-6.1 Sol (high), Codex harness in T3 Code. Tests: GPT-6 Astra (high); reviews: Claude Opus 5.5 and GPT-6 Sol.