Skip to content

feat(website): make Router gallery cards clickable, move video higher - #18621

Merged
bertfy merged 6 commits into
mainfrom
website/router-video-and-gallery-links
Sep 24, 2026
Merged

bertfy merged 6 commits into
mainfrom
website/router-video-and-gallery-links

Conversation

@claude

@claude claude Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

<!-- 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 optional modelId field (the Router API's {provider}/{model} id) to each gallery card, set it for all cards, and added modelGalleryHref(), which turns that id into a /models/[slug] href the same way the Router content pipeline already builds its own aliases (id.replace('/', '--'); see workshop-browse-content.ts's modelSlugAliasesFor). Verified against the built [slug].astro output 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 a modelId now 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.astro and .../zh-CN/platform/router.astro: moved RouterVideoSection and RouterCapabilitiesSection to 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: dropped lazy-autoplay; the island directive on both router.astro pages moved from client:visible to client:idle.
    • apps/website/src/templates/platform/RouterVideoSection.test.ts: updated the assertion that expected no native autoplay attribute to expect one, matching the eager-load change above.
  • Model id → page mapping (all confirmed live by building with WORKSHOP_IN_BUILD=1 and checking the redirect target):

    • Seedance 2.5 → byteplus/dreamina-seedance-2-5-260628 → /models/byteplus--seedance-2-5-text-to-video--generate-videos/
    • Nano Banana Pro → vertexai/gemini-3-pro-image → /models/vertexai--gemini-3-pro-image--generate-images/
    • ChatGPT Images 2.5 → openai/gpt-image-2.5-flare → /models/openai--gpt-image-2.5-flare--generate-images/
    • KlingAI 3.0 → kling/kling-3.0-turbo → /models/kling--kling-3.0-turbo-text-to-video--generate-videos/
    • Flux 3 → bfl/flux-3-video → /models/bfl--flux-3-text-to-video--generate-videos/
    • Gemini Omni 1.1 Flash → 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 live https://comfy.org/models/gemini--omni-1.1-flash--animate-images/ page; confirmed the model id from workshop-models.json/workshop-display.json, reused the existing cloud.aiModels.card.geminiOmniFlash i18n key and gemini badge icon, and reused the gemini-omni/card-1.webm + .webp clip that already serves this model on the /cli page's gallery)
    • MiniMax H3 card removed. Its only router entry, minimax/minimax-h3, has incompleteReason: "missing-input-schema" in workshop-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 from modelsGalleryCards.ts (and the tests that referenced it) since Router doesn't fully support it yet.
    • Two catalog entries plausibly match "ChatGPT Images 2.5" (openai/gpt-image-2.5-flare and openai/gpt-image-2.5-sunburst); I picked Flare, the one listed first in router-providers.ts's ROUTER_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 by workshopReleaseGate() only if (isWorkshopInBuild()), and isWorkshopInBuild() defaults to on (process.env.WORKSHOP_IN_BUILD !== '0') — it's only off when a build explicitly sets WORKSHOP_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:visible to 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 to client:idle (hydrates as soon as the main thread is free, without blocking the hero's own client:load work) and dropped lazy-autoplay so the video renders with its native autoplay/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

  • Confirm WORKSHOP_IN_BUILD is on for the production Vercel build (see gate note above).
  • Sanity-check the Flare vs. Sunburst pick for "ChatGPT Images 2.5".
  • client:idle vs client:load for 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-preview check 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

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.
@claude
claude Bot requested review from a team September 23, 2026 18:00
@coderabbitai

coderabbitai Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository: Comfy-Org/ComfyUI_frontend/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 83204812-7c5b-42d3-b05d-633ee5b33395

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@vercel

vercel Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
billing-web Ignored Ignored Sep 23, 2026 10:25pm UTC

Request Review

@github-actions

github-actions Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

🌐 Website E2E

Tip

All tests passed.

Status ✅ Passed
Report View Report

🧩 Custom Nodes Ecosystem Matrix: 🟡 Withheld — could not measure

Executes the frontend JS of every registry pack that ships any, against this change, in both renderers. The eight ecosystem-matrix shard checks are a harness self-test; the pack verdict is matrix-verdict.

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: ✅ Passed

Fallow 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 Preview

Website 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 492e55a

@codecov

codecov Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

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     
Flag Coverage Δ
billing-web-unit ?
website-unit 76.25% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
apps/website/src/config/workshop-router-content.ts 72.97% <100.00%> (+1.54%) ⬆️
...ebsite/src/templates/platform/ModelsApiGallery.vue 100.00% <100.00%> (ø)
...site/src/templates/platform/RouterVideoSection.vue 100.00% <ø> (ø)
...bsite/src/templates/platform/modelsGalleryCards.ts 100.00% <ø> (ø)

... and 33 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@datadog-official

This comment has been minimized.

@github-actions github-actions Bot added the risk:high PR risk grade (advisory shadow check; grader-owned) label Sep 23, 2026
@claude

claude Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor Author

Looked into the website-e2e-shard (3, 4) failure on 1a2126e.

Root cause: not caused by this PR.

The shard's only actual test failure is e2e/models-performance.spec.ts:24:1 › catalogue browsing stays within its JavaScript budget, which asserts the total same-origin JS loaded by /models/ stays under 1,810,000 bytes:

Error: expect(received).toBeLessThan(expected)
Expected: < 1810000
Received:   1831770

This PR only touches apps/website/src/pages/platform/router.astro (+ zh-CN twin), RouterVideoSection.vue, and ModelsApiGallery.vue/modelsGalleryCards.ts (used exclusively by the Router page's gallery, not by /models/). None of those files are reachable from the /models/ catalogue's module graph, so this PR cannot change that page's JS payload.

Confirmed it's pre-existing: main failed the identical test in the identical shard just a few minutes after this run, on an unrelated commit (c6939ddd, PR #18616 — a LiteGraph node-id fix with no website changes):
https://github.com/Comfy-Org/ComfyUI_frontend/actions/runs/35900493588/job/107315267408

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 @visual test elsewhere in the suite (status flaky, i.e. it failed once and then passed on retry) — none of the existing screenshot baselines (home-*, pricing-*, contact-*, gallery-grid-*, about-hero-*, *-faq-*) touch the Router page, which has no visual regression coverage.

I've queued a re-run of the failed jobs on this PR (gh/API: rerun_failed_jobs on run 35899516435) to double-check before merging. Given the JS-budget test is failing the same way on main right now, this is a pre-existing/base-branch issue that should be tracked and fixed separately, not patched in 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.
@claude
claude Bot force-pushed the website/router-video-and-gallery-links branch from 25e7e2a to 91f9616 Compare September 23, 2026 21:14
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.
@bertfy
bertfy added this pull request to the merge queue Sep 24, 2026
Merged via the queue into main with commit a4eebec Sep 24, 2026
90 checks passed
@bertfy
bertfy deleted the website/router-video-and-gallery-links branch September 24, 2026 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:high PR risk grade (advisory shadow check; grader-owned)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants