fix(site): ThumbnailDisplay breaks when variant mixes video + image#803
Merged
dante01yoon merged 10 commits intomainfrom Apr 22, 2026
Merged
fix(site): ThumbnailDisplay breaks when variant mixes video + image#803dante01yoon merged 10 commits intomainfrom
dante01yoon merged 10 commits intomainfrom
Conversation
- Use shareId instead of name as MiniSearch document ID since name can be duplicated across different users' workflows - Store slug (name-shareId) in search index for correct URL routing - Make Phase 2 prebuild failures fatal so broken builds don't deploy - Change cron rebuild interval from 15min to 30min
…lbacks - search.ts: add name/slug to WorkflowHit, use allowedNames for badge filtering - SearchPopover: use hit.slug for URLs, allowedNames for badge scoping - build-index.ts: throw on hub API failure instead of silent fallback - hub-api.ts: add loadSerializedTemplates() that fails build when hub API is configured but unavailable (no silent content collection fallback) - Replace 8 duplicate try/catch fallback blocks across astro pages with the shared loadSerializedTemplates() helper
- Use slug (name-shareId) for popular workflow links to avoid 301 redirect - Remove unnecessary `as any` casts on typed `usage` field - Improve fallback console.warn to preserve error diagnostics - Add JSDoc to fetchIndexEntries() documenting null vs throw semantics - Rename shadowed `t` parameter to `tmpl` in category page filters
…ered as video ThumbnailDisplay branched on the primary thumb's media type and then assumed the secondary shared that type, so an image-typed secondary was rendered inside a <video> element. When the secondary URL also 404'd (as on templates_ingi_infl8-06caca08d30b), the JS fallback bailed early because no fallback <img> had been emitted, leaving blank controls. - Add isSecondaryVideo check and render the secondary as <img> when it is not a video. - Videos without an available poster now hide the wrapper on error instead of silently failing. - Image secondaries hide themselves on load error to swallow CDN 404s.
Contributor
🧹 Lint & Format Results
Generated by Site CI workflow |
… fix) The removed 'if (!fallbackImg) return' early-out / wrapper-hide branch is separate hardening for posterless videos and was not needed for the reported bug. With the per-type dispatch, the secondary is rendered as <img>, so no posterless <video> path is introduced by this PR.
Contributor
🔍 SEO Audit Results
📊 SEO Audit DetailsCould not parse SEO output 🔗 Link Check Detailsbroken internal links out of checked Generated by Site CI workflow |
Contributor
|
🚀 Preview deployed: https://workflow-templates-nvda1ulhx-comfyui.vercel.app |
christian-byrne
approved these changes
Apr 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the broken second player on template pages like
templates_ingi_infl8-06caca08d30breported in Slack.Root cause
ThumbnailDisplay.astrodecided its render branch based on only the primary thumb's type (isVideo = isVideoFile(primaryThumb),ThumbnailDisplay.astro:56) and then rendered the secondary thumb as a<video>too, regardless of its actual extension. For the affected template the primary is.mp4and the secondary is.webp, so a<video>was emitted with a webp URL assrc— which browsers can't play, and which additionally 404s from the CDN.The built-in video-fallback safety net also failed:
secondaryVideoPosterUrlwasnull(webp isn't a video), so no<img data-video-fallback-img>was rendered, and the script'sif (!fallbackImg) return(ThumbnailDisplay.astro:300) bailed before attaching anyerror/stalledlisteners. The result was a blank, broken second player.Note: there is also an upstream data issue (a
compareSlider/image_comparisonentry paired a video with a missing image) — that fix belongs to the admin/publish pipeline, not this repo. This PR hardens the frontend so the same shape doesn't render a broken element in the future.Changes
isSecondaryVideoso each thumb is dispatched on its own type.<img>instead of<video>.Test plan
pnpm run checkinsite/— 0 errors