Skip to content

feat(website): the Hub's Models catalogue behind the flag - #21102

Open
mariana953 wants to merge 5 commits into
mariana/hub-model-pagefrom
mariana/hub-models
Open

mariana953 wants to merge 5 commits into
mariana/hub-model-pagefrom
mariana/hub-models

Conversation

@mariana953

@mariana953 mariana953 commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Builds on #21101. With hub-home-enabled on, /hub/models/ opens the Hub's Models catalogue: its own hero with a featured-launch carousel, category tabs, a how-you-use-it filter (Run here / API) and a resolution menu. Everyone else, and the server render, keep today's grid.

  • Switch. ModelsHalf picks HubModelsGrid (lazy) or today's WorkshopModelsGrid from the same flag gated on mount, as AppsHalf does. The Hub grid brings its own h1, so ModelsCatalogue emits hero and ModelsPage drops its heading only while it shows.
  • Compare stays hidden. Side-by-side compare is in the code but only appears with the hub-models-compare design tweak on (agreed in the rollout thread to keep it out for now). Off by default, including on the preview.
  • Design tweaks panel. PreviewControls lists each preview switch under the page it changes (comfy.org home, Hub · Models) with a line on what it does. It renders only when VERCEL_ENV !== 'production', on the home page and the Models catalogue. The Workflows switches leave the registry until the Workflows catalogue lands.
  • Data. catalogue.json now carries each model's priceEstimate (via a new modelPriceEstimate, shared with the model page), and browse content adds resolutions read from each Router input schema; both are optional in the schema. This also fills the resolution column of feat(website): the Hub's model page behind the flag #21101's provider table.
  • Shared components stay as published. The redesign branch restyled the model card, rewrote FacetSheet and dropped price sorting; none of that is carried. The Hub grid uses today's cards and sheet, and its own sort list (HUB_SORT_ORDERS). WorkshopFilterMenu gains an optional access group and title; useCaseOptions/useCases become optional, and every existing caller still passes them.
  • Additive lib changes. model-access, resolution, section-title (optional tab), hub-list-memory (rememberListOnClick), card-layout (CARD_GRID_BESIDE_NAV), HubFilter values, generic sortWorkshopModels.
  • Size: ~3.5k lines of non-test code, most of it new files only the flagged grid loads. Compare (explorer/compare/*, same-prompt, 20 sample images) could move to its own PR if preferred.

Verification

  • vitest over components/workshop, components/home, lib/workshop (2,029 passing) and earlier over config, routes, scripts. New: the catalogue switch (flag closed keeps today's grid and heading; open swaps in the Hub grid and its hero), Compare hidden until its tweak is on, the tweaks panel (grouped by page, persists per browser, absent on production), plus the redesign's own specs for the grid, tabs, task sidebar, compare and libs.
  • vue-tsc/astro check 0 errors; eslint, oxlint, format, knip and the complexity/duplication audit clean.
  • Preview loads /hub/models/ (200) and serves the catalogue JSON with prices and resolutions; the flagged view needs a signed-in staff session and was not viewed from this environment.

With hub-home-enabled on, /hub/models/ opens the redesigned catalogue: its
own hero with featured launches, category tabs, a how-you-use-it filter,
a resolution menu and side-by-side compare. Everyone else keeps today's
grid, and the server render is unchanged.

The catalogue JSON now carries each model's resolutions and price
estimate so the new filter and hero have them. The filter menu learns an
optional access group and title without changing what today's pages pass.
@mariana953
mariana953 requested review from a team and dante01yoon as code owners October 15, 2026 11:41
@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. 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: ce2edca6-4ca2-4cb4-86ff-d66784b7123b

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
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

📦 Bundle Size

⏳ Size data collection in progress…

🧩 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 b34dd5efbb2b64ed76387eb6927ba8193fb3d4e1

Full docs: ADR-DEVEX-LINT-0015

🌐 Website E2E

Tip

All tests passed.

Status ✅ Passed
Report View Report

🔗 Website Preview

Website Preview: https://comfy-website-preview-pr-21102.vercel.app

Models is built and gated by PostHog (workshop-enabled), using staging Cloud.

Deployment details

This commit: https://website-frontend-kq4591lfe-comfyui.vercel.app

Last updated: 2026-10-21T23:11:57Z for e212c7d

@codecov

codecov Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.54037% with 52 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
.../website/src/components/workshop/HubModelsGrid.vue 88.46% 7 Missing and 11 partials ⚠️
...ps/website/src/components/workshop/HubTaskRows.vue 86.20% 2 Missing and 2 partials ⚠️
...pps/website/src/lib/workshop/catalogue-features.ts 77.77% 0 Missing and 4 partials ⚠️
apps/website/src/lib/workshop/hub-list-memory.ts 66.66% 2 Missing and 1 partial ⚠️
apps/website/src/lib/workshop/models-hub.ts 92.68% 1 Missing and 2 partials ⚠️
...bsite/src/components/workshop/HubChoiceSidebar.vue 88.88% 0 Missing and 2 partials ⚠️
...ts/workshop/explorer/compare/CompareColumnCard.vue 86.66% 0 Missing and 2 partials ⚠️
...ts/workshop/explorer/compare/CompareSamePrompt.vue 92.00% 1 Missing and 1 partial ⚠️
...nents/workshop/explorer/compare/CompareToolbar.vue 83.33% 1 Missing and 1 partial ⚠️
...mponents/workshop/explorer/compare/CompareTray.vue 88.23% 0 Missing and 2 partials ⚠️
... and 9 more
@@                    Coverage Diff                     @@
##           mariana/hub-model-page   #21102      +/-   ##
==========================================================
+ Coverage                   85.90%   85.94%   +0.04%     
==========================================================
  Files                        3643     3683      +40     
  Lines                      173462   174254     +792     
  Branches                    47703    47890     +187     
==========================================================
+ Hits                       149011   149764     +753     
- Misses                      22542    22548       +6     
- Partials                     1909     1942      +33     
Flag Coverage Δ
website-unit 79.33% <93.54%> (+0.46%) ⬆️

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

Files with missing lines Coverage Δ
.../website/src/components/workshop/CatalogueHero.vue 100.00% <100.00%> (ø)
...c/components/workshop/FeaturedCarouselProgress.vue 100.00% <100.00%> (ø)
...ebsite/src/components/workshop/ModelsCatalogue.vue 100.00% <100.00%> (ø)
...pps/website/src/components/workshop/ModelsHalf.vue 100.00% <100.00%> (ø)
...pps/website/src/components/workshop/ModelsPage.vue 88.88% <100.00%> (+0.20%) ⬆️
...ebsite/src/components/workshop/PreviewControls.vue 100.00% <100.00%> (ø)
...ite/src/components/workshop/WorkshopFilterMenu.vue 85.93% <100.00%> (+1.72%) ⬆️
...te/src/components/workshop/WorkshopModelsEmpty.vue 100.00% <100.00%> (ø)
.../src/components/workshop/WorkshopModelsResults.vue 100.00% <100.00%> (ø)
...ite/src/components/workshop/explorer/ModelTabs.vue 100.00% <100.00%> (ø)
... and 46 more

... and 4 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.

@github-actions github-actions Bot added the risk:high PR risk grade (advisory shadow check; grader-owned) label Oct 15, 2026
…s by page

Compare stays in the Models catalogue but only shows once its preview
switch is on, as agreed in the rollout thread. The tweaks panel now lists
each switch under the page it changes with a line on what it does, and
sits on the home page and the Models catalogue of preview builds only.
Workflows switches leave the list until the Workflows catalogue lands.
Ports #21047 from main. The guard timed the /hub/models/ loader from
navigation start, so its 1s grace also covered booting the site's
JavaScript on the runner and the catalogue cases failed on timing.

Copy link
Copy Markdown
Contributor Author

website-e2e-shard (3, 4) failed on 69fbf6f in models-render-guard.spec.ts, on the /hub/models/ cases (the loader was last seen 1.2–1.6 s after navigation, against a 1 s budget). The cause is not this PR: the guard counted from navigation start, so the budget also covered booting the site JS on the runner. Locally the same case also fails on 4fd844d, the head before the merge.

#21047 on main fixes this by timing from island hydration. I ported it verbatim in e212c7d; it becomes a no-op once the stack picks up main. Locally, after the port, the catalogue cases pass on repeat.


Generated by Claude Code

@dante01yoon dante01yoon left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed against mariana/hub-model-page at e212c7d. The switch follows the pattern from the rest of the stack: hubModels is gated on useMounted(), so the server frame and today's grid/heading are unchanged for flag-closed visitors. Compare is hidden behind its design tweak, and PreviewControls renders only when !isProductionBuild(). The resolutions/priceEstimate additions are optional in presentationSchema, and they come from the website's own Router contract catalog rather than a hand-declared API response type (Gate 3 OK). accessFor/runsHere read build config and the catalogue entry, not account state (Gate 2 OK). CI is green; I did not run the specs locally.

Requesting changes only for added comments, which AGENTS.md and docs/guidance/engineering.md treat as blocking. One sizing suggestion below.

Unanchored

  • suggestion: this is ~3.5k non-test lines. As the description already offers, moving Compare (explorer/compare/*, compare*.ts, same-prompt.ts, data/compareSamePrompt.ts and the 20 sample images, ~1k lines) to its own PR would make this one easier to review. Compare is behind a separate tweak and off by default, so nothing here depends on it shipping together.

type RenderGuardWindow = Window & { __renderGuard?: RenderGuard }

const CLS_BUDGET = 0.1
// Counted from the moment the page's island hydrates, not from navigation:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue: new // comment block. AGENTS.md bans added comments in tests too, and suggests a test.step name, an it title, or a well-named constant instead. For example, rename LOADER_GRACE_MS to LOADER_GRACE_AFTER_HYDRATION_MS and put the "counted from hydration, not navigation" rationale in the commit message.

}
;(window as RenderGuardWindow).__renderGuard = guard
observer.observe({ type: 'layout-shift', buffered: true })
// Astro dispatches a non-bubbling `astro:hydrate` on each <astro-island>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue: same rule. Extracting the listener into a named function (e.g. recordIslandHydrationInCapturePhase) would carry this rationale without a comment.

const HOSTED_ACCESS: readonly ModelAccess[] = ['run', 'api']
const API_ACCESS: readonly ModelAccess[] = ['api']

/**

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue: this JSDoc grew from one line to a five-line block explaining callers and rationale. The rule allows only curt JSDoc on exported API. Please trim it back to a single line (e.g. the original "Whether a visitor can run this model from its Hub page.") and move the reasoning to the PR description or a test title.

Copy link
Copy Markdown
Contributor Author

Thanks @dante01yoon, all fair. The added comments (including the long JSDoc in model-access.ts) are my mistake, and splitting Compare into its own PR makes sense.

Heads-up: the website moved to Comfy-Org/comfy-website on Oct 22 and apps/website here is frozen, so I'm not pushing to this stack anymore. I'm moving to another project, so @MaanilVerma will carry these fixes into the port in the new repo. Maanil, could you take a look?


Generated by Claude Code

This branch was previously deployed

1 inactive (outdated) deployment
website-approval — 1183a73e Deployed Oct 15, 2026 by mariana953 via fast-lane #4248
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.

2 participants