Comfy-Org / Comfy-Org/workflow_templates

Video-led LandingHero: no poster/preload/error handling, and getVideoFrameUrl allowlist is stale

Open
#1,070 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
901
Forks
188
Avg merge
23h 10m
Merged PRs (30d)
86

Description

Follow-up from review on #1057.

On video-led landing pages the hero `` (LandingHero.astro) has no `poster`, no `preload`, and no error handling, replacing an `` that had `loading="eager"` + `fetchpriority="high"`. `` is not LCP-priority-eligible, so the hero regresses on every video-led page.

Root issue for the poster fallback: `video-thumbnail.ts` only allowlists `engcomfy.com`, but live hub thumbnails are served from `comfy-hub-assets.comfy.org` (verified: the image-to-3d hero video is `https://comfy-hub-assets.comfy.org/uploads/...mp4`), so `getVideoFrameUrl` returns null for all of them and the fallback is dead in production.

Proposed fix (needs care, so tracked separately):
1. Confirm `comfy-hub-assets.comfy.org` supports Cloudflare `cdn-cgi/media/mode=frame`, then widen `CLOUDFLARE_CDN_DOMAIN` (shared util, site-wide blast radius).
2. Add `poster` (from getVideoFrameUrl) + `preload` + the `ThumbnailDisplay.astro` 3s `paused && readyState < 3` fallback to the hero video.
3. Re-check LCP with Lighthouse.

Reported by @MaanilVerma.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading LandingHero.astro, video-thumbnail.ts, and ThumbnailDisplay.astro to trace the current video, poster, allowlist, and fallback behavior. Confirm whether comfy-hub-assets.comfy.org supports Cloudflare frame URLs, then verify the hero has the proposed poster, preload, and error fallback behavior. Re-check the result with Lighthouse for LCP.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.