fix: Bug - Sending files and attachment issues

Normalize attachment MIME types from filenames, hydrate playable media and
gallery tiles from disk without redundant peer requests, reset stalled partial
downloads, and improve gallery retry/hydration UX across chat and DMs.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-14 13:30:13 +02:00
co-authored by Cursor
parent b13f71d2d3
commit 0078c320a5
14 changed files with 388 additions and 15 deletions
@@ -0,0 +1,20 @@
import { shouldResetStalledAttachmentDownload } from './attachment-autodownload.rules';
describe('attachment autodownload rules', () => {
it('resets stalled partial downloads that are no longer actively transferring', () => {
expect(shouldResetStalledAttachmentDownload({
available: false,
receivedBytes: 128
}, false)).toBe(true);
expect(shouldResetStalledAttachmentDownload({
available: false,
receivedBytes: 128
}, true)).toBe(false);
expect(shouldResetStalledAttachmentDownload({
available: true,
receivedBytes: 128
}, false)).toBe(false);
});
});