diff --git a/apps/desktop/src/components/assistant-ui/markdown-text.media.test.tsx b/apps/desktop/src/components/assistant-ui/markdown-text.media.test.tsx index e534da37eb9..339bfb18fdf 100644 --- a/apps/desktop/src/components/assistant-ui/markdown-text.media.test.tsx +++ b/apps/desktop/src/components/assistant-ui/markdown-text.media.test.tsx @@ -1,9 +1,9 @@ -import { cleanup, render, screen } from '@testing-library/react' +import { cleanup, render, screen, waitFor } from '@testing-library/react' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import { $connection } from '@/store/session' -import { MarkdownTextContent } from './markdown-text' +import { MarkdownImage, MarkdownTextContent } from './markdown-text' const REMOTE_IMAGE_PATH = '/home/user/project/images/remote-preview.png' const REMOTE_IMAGE_DATA_URL = 'data:image/png;base64,cmVtb3RlLWltYWdl' @@ -50,3 +50,32 @@ describe('MarkdownTextContent remote images', () => { }) }) }) + +// Regression for #40896: generated media often arrives as image markdown +// (`![clip](clip.mp4)`). A raw with a video/audio source paints a +// broken-image icon even though the file is valid, so MarkdownImage must route +// video/audio sources to the proper