Repository navigation
fix(platform): say when an email attachment is no longer available - #3193
Merged
Merged
Conversation
A message that advertises an attachment whose bytes are gone offered a download that failed with a browser error and no explanation. Presigning does not prove the object is there — it signs a path. So the read path already re-derived each URL and dropped it when the presign itself failed, but a presign for a missing object succeeds, and the chip went on showing a file size and a download button. The probe rides the presign loop that already walks each attachment, using the existing statOrgBlob rather than a second pass over the same metadata. A probe that THROWS is not evidence of absence — an unreachable store, an unresolved org — so it fails open and the attachment is offered as before. Only a definite miss marks it: url withheld, unavailable stamped, and the chip reads 'No longer available' where the size was. Closes #3017. Supersedes #3104, three of whose files #3125 deleted.
Israeltheminer
force-pushed
the
fix/attachment-unavailable-v2
branch
from
September 4, 2026 09:00
76b4891 to
4718c24
Compare
This was referenced Sep 4, 2026
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.
A conversation attachment whose blob is gone still rendered as a working
download. Clicking it failed in the browser with no explanation. That is what
a deployment sees after a database is recovered without its file storage
(#3017).
Rebase of #3171 onto current main, plus unit coverage the original lacked.
Why presigning is not proof
presignMessageAttachmentssigns a path. Signing succeeds whether or not theobject is there, so the projection now probes for it and marks a missing one
unavailable— dropping the URL rather than flagging it, because a dead linksitting next to a "no longer available" notice is the same bug.
The probe fails open. An unreachable store or an unresolved org throws,
and a throw is not evidence of absence, so the attachment is offered as
before and the reason is logged. Only a definite
nullmarks it.The unit coverage is new
The original PR proved this only through
integration-check.ts, which needsa live stack and an S3 endpoint. I mutation-tested the backend probe and the
mutation survived — nothing running in CI covered it.
attachment-presence.test.tsnow covers all three branches:gone = false)marks it unavailable and drops the URL,offers it anyway when the probe throwsgone = true)offers it anyway when the probe throws — a throw is not absencesays the file is no longer available instead of its sizeThat second mutation is the one worth having a test for: failing closed on a
throw would hide every attachment in a deployment whose store is briefly
unreachable.
Locales
conversations.attachment.unavailablein en, de and fr. It is not in amirrored namespace, so the notification-email mirror needs nothing —
confirmed by
notification_messages.test.ts(21 passed).Gate
typecheck0 errors,oxlint --type-awareclean,oxfmt --checkclean,conversations + i18n suites 131 passed (14 files), the message component
14 passed.