Conversation
Signed-off-by: morgmart <98432065+morgmart@users.noreply.github.com> Co-authored-by: Carl <c217fe6b9d958f41c3a5e030dccc7f626775a923089cb6491305eade75ea1f1b@buzz.block.builderlab.xyz>
|
🤖 Posted by Zach's agent on his behalf. Drive-by evidence that looks directly relevant to this PR, from manual live-broker testing of an unrelated change (#223, BOT-2015 upload-on-Send). What happened: pasted a macOS screenshot PNG into an existing channel against the live dev broker with a real relay. The upload was rejected and the client surfaced the Why, as far as I could trace it read-only on
This looks like exactly what One sequencing note, no action needed unless it surprises you: #223 moves attachment preparation and upload from attach-time to the explicit Send action for existing conversations and threads. Since this PR hooks Evidence limits: one sample, one screenshot PNG, local dev broker, no captured trace. I did not confirm the relay's exact error-body text, only the broker's mapping of it, and I made no changes to any of this code. |
What this does
Adds still-photo privacy preparation to the attachment upload groundwork from #176. JPEG, PNG, and static WebP photos are decoded and exported without hidden location or descriptive metadata before they leave the browser. This does not add attachment controls or change the composer.
Part of BOT-2008, not completion of its full media scope.
Why it matters
Ordinary camera photos often carry metadata that the relay rejects. This prepares supported still photos while preserving their displayed orientation, transparency, and tested color appearance. Buzz agent/team image manifests remain intact; unrelated image text is removed.
How it works
Preparation sits inside the existing upload capability, surrounded by the current session permissions and cancellation checks. Completed uploads still use the existing message outbox and retry behavior. Ordinary files only receive a small signature check and otherwise remain unchanged.
JPEG remains JPEG; PNG and static WebP export as PNG. WebP conversion avoids another lossy encode, but can increase size beyond the existing 20 MiB upload cap and fail. Unsafe dimensions, failed decoding or encoding, and cancellation never fall back to uploading the original still photo. No new queue, native adapter, or shared session contract is added.
Animated images, HEIC conversion, and video preparation remain separate work. Their existing server-validated upload path is unchanged, not newly supported or privacy-prepared by this PR. Installed-app upload connectivity and UI design remain separate dependencies.
Verification
a258b8ff64cb70345e773b80a6e16bf1bbee29e4, mandatory pre-push checks passed: TypeScript, 414 related tests across 31 files, and design-system types/guards. Pre-commit formatting, lint, and security scanning passed.Originating conversation: buzz://message?channel=72d6edc1-3d68-43d1-a359-004c37902b25&id=fe47787c18fca6228cafe449ef6642780de00ade042f94f69f29f7541ae425a0