Repository navigation
feat(chat): encrypt and cache photos, and keep sends alive in the background - #963
Merged
Merged
Conversation
Downloaded photos go to a dedicated Kingfisher disk cache keyed by blob id, so they no longer fall back to the blur hash after five minutes. In an encrypted DM a photo is sealed with the shared-core chat cipher, stored with endToEndEncryptedFor set to the chat, and sent as EncryptedContent. Incoming encrypted photos are decrypted before they are drawn, and one that can't be opened shows as unavailable. Blob rejections now log the server's reason code instead of "unknown".
Outgoing photo bubbles show a thin progress bar in the corner: the upload's byte fraction, then a sliding segment while the server processes the blob, which has no progress signal. A send no longer fails when the app is backgrounded mid-send. The READY poll retries through a dropped stream, its deadline only counts time the app is awake, and the send holds a background task assertion. A retry after the bytes are stored polls again instead of uploading again. Pending photos are written to disk at send, so a relaunch restores them: one whose bytes were stored resumes, one that never reached the server comes back failed with retry, and one that already sent is dropped.
bmc08gt
force-pushed
the
feat/chat-media-offline
branch
from
October 5, 2026 22:23
6688e2d to
f26ae2d
Compare
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.
Third of four stacked PRs for chat photos, on top of #962. Encrypts photos in encrypted DMs, caches them on disk, and keeps a send alive through backgrounding and relaunch.
EncryptedContent. Incoming ones are decrypted before they are drawn; one that can't be opened shows as unavailable.Design notes:
.claude/plans/2026-10-03-pending-photo-persistence.md.Stack: #961 → #962 → this → #964.