Page MenuHomePhabricator

Add thumbhash field to multimedia messages
ClosedPublic

Authored by bartek on May 15 2023, 1:10 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 16, 9:53 AM
Unknown Object (File)
Mon, Apr 15, 3:54 PM
Unknown Object (File)
Mon, Apr 15, 3:47 PM
Unknown Object (File)
Mon, Apr 15, 3:39 PM
Unknown Object (File)
Mon, Apr 15, 9:48 AM
Unknown Object (File)
Mon, Apr 15, 3:16 AM
Unknown Object (File)
Sat, Apr 13, 3:54 PM
Unknown Object (File)
Sat, Apr 13, 3:40 AM
Subscribers

Details

Summary

Final diff which glues all parts together. Added the thumbHash / thumbnailThumbHash field
to all places where it's needed (plenty of them).
The flow is more or less like that: media mission step -> input-state-container -> keyserver upload endpoint -> database -> upload fetcher -> multimedia message -> client db serialize/deserialize -> multimedia.react.js -> expo-image components.
Also for local uploads: ... -> input-state-container -> redux update message -> ...

Depends on D7803, D7782

Test Plan

At this point, e2e thumbhash for sending and receiving multimedia messages should work. Sent a few of them, disabled local media cache and artifically delayed decryption To make effect more visible.
Tested both iOS and Android, both encrypted and non-encrypted media.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bartek held this revision as a draft.
bartek published this revision for review.May 15 2023, 6:33 AM
ashoat added 1 blocking reviewer(s): atul.

This diff is huge and it's hard to tell if it's "exhaustive" (eg. that everything has been covered).

Going to add @atul as blocking to make sure we get a second pair of eyes on it.

Separately, want to encourage you to make sure you've tested all of the cases. It would be good to test iOS and Android, encrypted and non-encrypted, and images and video.

native/input/input-state-container.react.js
807 ↗(On Diff #26439)

I guess this was an accidental omission from an earlier diff. It would be good to put this sort of thing in its own diff

1163–1170 ↗(On Diff #26439)

Should this whole thing be read-only?

This revision is now accepted and ready to land.May 15 2023, 1:15 PM

Separately, want to encourage you to make sure you've tested all of the cases. It would be good to test iOS and Android, encrypted and non-encrypted, and images and video.

That's what I did! I'll amend the test plan to emphasize it

native/input/input-state-container.react.js
807 ↗(On Diff #26439)

Leftover from my experiments (temporarily wanted encryption steps at the top). I'll delete this

This diff is huge and it's hard to tell if it's "exhaustive" (eg. that everything has been covered).

I can relate. Adding a single field to the message is overwhelming and requires touching so many places in the codebase. And one Flow type change starts the snowball effect making it difficult to split into smaller (yet readable) diffs
I tested various scenarios and also looked for all occurrences of e.g. encryptionKey that I was adding recently to see all places where I made changes then.

bartek edited the test plan for this revision. (Show Details)

Removed accidental leftover. Made types read-only

This revision was automatically updated to reflect the committed changes.