Reproducible build image + keep video/GIF bytes across scroll #10

Merged
alex merged 1 commit from build-image-and-media-cache into main 2026-05-19 09:57:34 -04:00
Owner

Add docker/Dockerfile, docker/build.sh, docker/README.md: an Ubuntu
24.04 image with Flutter SDK, Rust, Android SDK + NDK, JDK 17, and
every Linux desktop system library Mochi needs (gtk, webkit2gtk,
mpv, secret, sqlcipher, GStreamer, PipeWire). One entrypoint
dispatches linux / linux-arm64 / apk / appbundle / web / shell.

Image is ~12 GB but it's a one-shot to set up a consistent build
environment for any contributor:

docker build -f docker/Dockerfile -t mochi-build .
docker run --rm -v "$PWD:/work" mochi-build linux

The visibility detector on _FirstFrameThumbnail still tore down the
VideoPlayerController whenever the bubble dipped below 1% visibility.
Drop the teardown branch entirely: the controller now lives for as
long as Flutter keeps the widget mounted (cacheExtent = 6000 px
covers ~15 screen heights), and is disposed in dispose() like normal.
This stops the rapid load/unload loop near the viewport edge.

MxcImage in the chat image bubble and in the video thumbnail had no
cacheKey, so the static byte cache didn't retain anything across
mount/unmount. Pass the event id (and a 'video-thumb-' prefix for
the thumbnail variant) so GIFs and image bytes survive remount.

Add docker/Dockerfile, docker/build.sh, docker/README.md: an Ubuntu 24.04 image with Flutter SDK, Rust, Android SDK + NDK, JDK 17, and every Linux desktop system library Mochi needs (gtk, webkit2gtk, mpv, secret, sqlcipher, GStreamer, PipeWire). One entrypoint dispatches linux / linux-arm64 / apk / appbundle / web / shell. Image is ~12 GB but it's a one-shot to set up a consistent build environment for any contributor: docker build -f docker/Dockerfile -t mochi-build . docker run --rm -v "$PWD:/work" mochi-build linux The visibility detector on _FirstFrameThumbnail still tore down the VideoPlayerController whenever the bubble dipped below 1% visibility. Drop the teardown branch entirely: the controller now lives for as long as Flutter keeps the widget mounted (cacheExtent = 6000 px covers ~15 screen heights), and is disposed in dispose() like normal. This stops the rapid load/unload loop near the viewport edge. MxcImage in the chat image bubble and in the video thumbnail had no cacheKey, so the static byte cache didn't retain anything across mount/unmount. Pass the event id (and a 'video-thumb-' prefix for the thumbnail variant) so GIFs and image bytes survive remount.
Reproducible build image + keep video/GIF bytes across scroll
Some checks failed
Pull Request Workflow / code_tests (pull_request) Failing after 1m26s
Pull Request Workflow / build_debug_apk (pull_request) Has been skipped
Pull Request Workflow / build_debug_web (pull_request) Has been skipped
Pull Request Workflow / build_debug_linux (pull_request) Has been skipped
9c993fe7ad
Add docker/Dockerfile, docker/build.sh, docker/README.md: an Ubuntu
24.04 image with Flutter SDK, Rust, Android SDK + NDK, JDK 17, and
every Linux desktop system library Mochi needs (gtk, webkit2gtk,
mpv, secret, sqlcipher, GStreamer, PipeWire). One entrypoint
dispatches linux / linux-arm64 / apk / appbundle / web / shell.

Image is ~12 GB but it's a one-shot to set up a consistent build
environment for any contributor:

    docker build -f docker/Dockerfile -t mochi-build .
    docker run --rm -v "$PWD:/work" mochi-build linux

The visibility detector on _FirstFrameThumbnail still tore down the
VideoPlayerController whenever the bubble dipped below 1% visibility.
Drop the teardown branch entirely: the controller now lives for as
long as Flutter keeps the widget mounted (cacheExtent = 6000 px
covers ~15 screen heights), and is disposed in dispose() like normal.
This stops the rapid load/unload loop near the viewport edge.

MxcImage in the chat image bubble and in the video thumbnail had no
cacheKey, so the static byte cache didn't retain anything across
mount/unmount. Pass the event id (and a 'video-thumb-' prefix for
the thumbnail variant) so GIFs and image bytes survive remount.
alex merged commit 430b1a9da5 into main 2026-05-19 09:57:34 -04:00
alex deleted branch build-image-and-media-cache 2026-05-19 09:57:34 -04:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
alex/Mochi!10
No description provided.