From c8ad2273a277933ba5cd94c342ad28bb5b06b15d Mon Sep 17 00:00:00 2001 From: Maanil Verma Date: Mon, 5 Oct 2026 20:02:50 +0530 Subject: [PATCH 1/7] fix(website): show video thumbnails as a still frame in hub search suggestions --- .../workshop/WorkshopSearchPanel.test.ts | 15 +++++++++++++++ .../components/workshop/WorkshopSearchPanel.vue | 13 ++++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/apps/website/src/components/workshop/WorkshopSearchPanel.test.ts b/apps/website/src/components/workshop/WorkshopSearchPanel.test.ts index ff120de86ca..0f203794c6c 100644 --- a/apps/website/src/components/workshop/WorkshopSearchPanel.test.ts +++ b/apps/website/src/components/workshop/WorkshopSearchPanel.test.ts @@ -59,6 +59,21 @@ describe('WorkshopSearchPanel', () => { ).toBeTruthy() }) + it('shows a video thumbnail as a still frame, not a broken image', () => { + const clip = 'https://media.comfy.org/clip.mp4' + const videoModel: WorkshopModel = { + ...models[1], + thumbnailUrl: clip, + thumbnail: { url: clip, kind: 'video' } + } + render(WorkshopSearchPanel, { + props: { models: [videoModel], query: 'alpha' } + }) + expect( + screen.getByTestId('workshop-search-model-video').getAttribute('src') + ).toBe(`${clip}#t=0.1`) + }) + it('shows an empty state for a query without matches', () => { render(WorkshopSearchPanel, { props: { models, query: 'missing' } diff --git a/apps/website/src/components/workshop/WorkshopSearchPanel.vue b/apps/website/src/components/workshop/WorkshopSearchPanel.vue index 5f712bd830a..1582ad1a61c 100644 --- a/apps/website/src/components/workshop/WorkshopSearchPanel.vue +++ b/apps/website/src/components/workshop/WorkshopSearchPanel.vue @@ -8,6 +8,7 @@ import { filterWorkshopModels, sortWorkshopModels } from '@/config/models-catalogue' +import { isVideoUrl, videoPosterUrl } from '@/config/workshop-playground' import type { Locale } from '@/i18n/translations' import { translationsFor } from '@/i18n/translations' @@ -83,8 +84,18 @@ function sourceOf(model: WorkshopModel): string | undefined { @mousedown.prevent @click="emit('pick', model)" > +