fix: Bug - Sending files and attachment issues (gallery load and speed)

Route small images through in-memory receive instead of serialized disk
chunk-acks, and improve gallery hydration for local copies and pending
downloads so thumbnails display without minutes-long progress stalls.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-14 13:19:12 +02:00
co-authored by Cursor
parent fa45052432
commit b13f71d2d3
12 changed files with 206 additions and 34 deletions
@@ -0,0 +1,4 @@
/** True when a resolved on-disk path contains bytes worth streaming to a peer. */
export function shouldServeAttachmentFromDiskPath(fileSize: number | null | undefined): boolean {
return typeof fileSize === 'number' && Number.isFinite(fileSize) && fileSize > 0;
}