Repository navigation
feat(website): make Router gallery cards clickable, move video higher - #18621
Conversation
Link each Comfy Router landing page gallery card that has a live Models
page to it, using the same {provider}/{model} id the Router API and
content pipeline already key model pages by (id.replace('/', '--')).
MiniMax H3 has no Models page yet (incomplete input schema), so it
stays a plain, non-clickable card.
Move RouterVideoSection (and RouterCapabilitiesSection, which reuses
its stills) up to right below the hero, ahead of the migration banner,
proof strip, gallery and code sample. Since the video is no longer
far down the page, drop `lazy-autoplay` and swap its island directive
from `client:visible` to `client:idle` so it loads eagerly instead of
waiting on a scroll trigger that may already be satisfied at load.
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configurationConfiguration used: Repository: Comfy-Org/ComfyUI_frontend/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
🌐 Website E2ETip All tests passed.
🧩 Custom Nodes Ecosystem Matrix: 🟡 Withheld — could not measureExecutes the frontend JS of every registry pack that ships any, against this change, in both renderers. The eight This candidate changes nothing the matrix measures, so every expensive stage was skipped. Reproduce locally# build one shard's fixture, then run it
python3 scripts/registry-census/build_matrix.py --shard 1/4
MATRIX_RENDERER=vue MATRIX_VUE=1 \
npx vitest run --config vitest.matrix.config.mts
Full docs: scripts/registry-census/README.md 🌾 Fallow: ✅ PassedFallow audits the diff for duplication, complexity and dead code. It gates on new findings only, so when the audit completes, a red is something this PR introduced or moved — never inherited backlog. A red can also mean the audit itself did not finish; the details below say which happened. No new findings in the changed files. Reproduce locally# the base the gate compared against
npx fallow audit --root . --quiet --format json \
--changed-since adc58ea058af894b7efc58450ed5c7d207b3c006
Full docs: ADR-DEVEX-LINT-0015 🔗 Website PreviewWebsite Preview: https://comfy-website-preview-pr-18621.vercel.app Models is built and gated by PostHog (workshop-enabled), using staging Cloud. This commit: https://website-frontend-its8zrn4o-comfyui.vercel.app Last updated: 2026-09-23T22:27:03Z for |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #18621 +/- ##
==========================================
- Coverage 83.63% 83.61% -0.02%
==========================================
Files 3018 2985 -33
Lines 148739 148051 -688
Branches 40301 40131 -170
==========================================
- Hits 124396 123798 -598
+ Misses 23042 22997 -45
+ Partials 1301 1256 -45
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 33 files with indirect coverage changes 🚀 New features to boost your workflow:
|
This comment has been minimized.
This comment has been minimized.
|
Looked into the Root cause: not caused by this PR. The shard's only actual test failure is This PR only touches Confirmed it's pre-existing: Same spec, same line, same "1 failed / 151 passed" pattern. The budget is just riding very close to its ceiling right now (received 1,831,770 vs. a 1,810,000 limit, ~1.2% over) from unrelated catalogue/content growth, not from this diff. The "1 screenshot diff" flagged in the CI summary is also unrelated to this PR: it comes from a flaky I've queued a re-run of the failed jobs on this PR ( Generated by Claude Code |
Router has no Models page for minimax/minimax-h3 (incompleteReason: missing-input-schema in the content pipeline), so the card is removed entirely rather than left unlinked.
Restores coverage for the div-vs-anchor branch in ModelsApiGallery.vue now that the MiniMax H3 card (the only real card without a modelId) has been removed from modelsGalleryCards.ts. Injects a synthetic card via the cards prop instead of relying on real gallery data.
Adds a 6th card to the Comfy Router landing page gallery, linking to gemini/omni-1.1-flash (the animate-images use case, matching the live /models/gemini--omni-1.1-flash--animate-images/ page). Reuses the existing geminiOmniFlash title key, the gemini badge icon already used for other Google models, and the card-1 webm/webp assets already serving this model's clip on the /cli page.
25e7e2a to
91f9616
Compare
modelGalleryHref() built a short {provider}--{model} slug, which
/models/[slug].astro resolves via a client-side redirect since this
site builds statically and can't emit a real 301. Some Router model
ids also have a Models page per use case (Gemini Omni 1.1 Flash has
three), so the id alone can't say which one a card means.
Add getRouterModelHref(modelId, useCase) to resolve a card's model id
and use case directly to its canonical href, and require both fields
together on ModelsGalleryCard so a linked card always names the page
it points to.
modelGalleryHref() called getRouterModelHref(), which pulls in the server-only Router content catalogue. ModelsApiGallery hydrates on the client (client:visible), so bundling that lookup broke the build: the workshop-client-boundary Vite plugin rejects any client chunk that contains catalogue data. Bake each card's resolved href into modelsGalleryCards.ts as a plain string instead of computing it at render time, and add a test that checks each one against getRouterModelHref so the two can't drift.
<!-- ccr-slack-attribution -->
Requested by Robert Paige · Slack thread
Summary
Makes the Comfy Router landing page's model gallery cards clickable and moves the explainer video (plus the capabilities section that reuses its stills) up to right below the hero.
Changes
What:
apps/website/src/templates/platform/modelsGalleryCards.ts: added an optionalmodelIdfield (the Router API's{provider}/{model}id) to each gallery card, set it for all cards, and addedmodelGalleryHref(), which turns that id into a/models/[slug]href the same way the Router content pipeline already builds its own aliases (id.replace('/', '--'); seeworkshop-browse-content.ts'smodelSlugAliasesFor). Verified against the built[slug].astrooutput that each href 301-redirects to the model's real canonical page. The MiniMax H3 card was removed entirely (see below) rather than kept unlinked. A 6th card, Gemini Omni 1.1 Flash, was added afterward at the team's request (see below).apps/website/src/templates/platform/ModelsApiGallery.vue: cards with amodelIdnow render as an<a href>(via<component :is>) instead of a<div>; cards without one are unchanged.apps/website/src/templates/platform/ModelsApiGallery.test.ts: added coverage for a linked card's href.apps/website/src/pages/platform/router.astroand.../zh-CN/platform/router.astro: movedRouterVideoSectionandRouterCapabilitiesSectionto right after the hero, ahead of the migration banner, proof strip, gallery, and code sample (previously between the code sample and provider coverage table).apps/website/src/templates/platform/RouterVideoSection.vue: droppedlazy-autoplay; the island directive on bothrouter.astropages moved fromclient:visibletoclient:idle.apps/website/src/templates/platform/RouterVideoSection.test.ts: updated the assertion that expected no nativeautoplayattribute to expect one, matching the eager-load change above.Model id → page mapping (all confirmed live by building with
WORKSHOP_IN_BUILD=1and checking the redirect target):byteplus/dreamina-seedance-2-5-260628→/models/byteplus--seedance-2-5-text-to-video--generate-videos/vertexai/gemini-3-pro-image→/models/vertexai--gemini-3-pro-image--generate-images/openai/gpt-image-2.5-flare→/models/openai--gpt-image-2.5-flare--generate-images/kling/kling-3.0-turbo→/models/kling--kling-3.0-turbo-text-to-video--generate-videos/bfl/flux-3-video→/models/bfl--flux-3-text-to-video--generate-videos/gemini/omni-1.1-flash→/models/gemini--omni-1.1-flash--animate-images/(added as the 6th card at the team's request, matching the livehttps://comfy.org/models/gemini--omni-1.1-flash--animate-images/page; confirmed the model id fromworkshop-models.json/workshop-display.json, reused the existingcloud.aiModels.card.geminiOmniFlashi18n key and gemini badge icon, and reused thegemini-omni/card-1.webm+.webpclip that already serves this model on the/clipage's gallery)minimax/minimax-h3, hasincompleteReason: "missing-input-schema"inworkshop-router-index.json, so the content pipeline excludes it entirely — there is no Models page to link to. Rather than leave it in the gallery unlinked, the card was dropped frommodelsGalleryCards.ts(and the tests that referenced it) since Router doesn't fully support it yet.openai/gpt-image-2.5-flareandopenai/gpt-image-2.5-sunburst); I picked Flare, the one listed first inrouter-providers.ts'sROUTER_PROVIDER_COVERAGE. Worth a design/PM sanity check if there's a reason Sunburst is the one meant to be featured.Route gate note:
/models/[slug]is registered byworkshopReleaseGate()onlyif (isWorkshopInBuild()), andisWorkshopInBuild()defaults to on (process.env.WORKSHOP_IN_BUILD !== '0') — it's only off when a build explicitly setsWORKSHOP_IN_BUILD=0. I can't read Vercel's actual production env from here, but every other page that links to these same model pages (pages/workshop/index.astro→WorkshopCatalog,WorkshopModelCard,FeaturedBanner, etc.) already does so unconditionally, with no gate check of its own, so I followed that existing pattern rather than inventing new gating logic. Flagging this so a reviewer with deploy access can confirm the gate is on in production before merge.Video loading directive: the video is a heavy 1080p muted-autoplay asset that previously used
lazy-autoplay+client:visibleto defer it until scroll. Now that it sits right below the hero,client:visible's IntersectionObserver may fire at (or before) hydration anyway, so I switched toclient:idle(hydrates as soon as the main thread is free, without blocking the hero's ownclient:loadwork) and droppedlazy-autoplayso the video renders with its nativeautoplay/preload="auto"attributes and can start as soon as the browser has it, instead of waiting on Vue hydration to kick off playback.Before / After
Before: Hero → Migration banner → Proof strip → Gallery (cards not clickable) → Code sample → Video (lazy,
client:visible) → Capabilities → Provider coverage → Roadmap → FAQ → Closing CTA → Product cards.After: Hero → Video (eager,
client:idle) → Capabilities → Migration banner → Proof strip → Gallery (all 6 cards link to their model page) → Code sample → Provider coverage → Roadmap → FAQ → Closing CTA → Product cards.Review Focus
WORKSHOP_IN_BUILDis on for the production Vercel build (see gate note above).client:idlevsclient:loadfor the video is a judgment call; happy to switch if there's a stronger preference.Screenshots
Not attached — this environment doesn't have a way to render the live preview; the
deploy-previewcheck on this PR should produce one once CI runs (https://comfy-website-preview-pr-<number>.vercel.app).🤖 Generated with Claude Code
https://claude.ai/code/session_01MM46WFCvt1e7PGmUtaxKp1
Generated by Claude Code