Repository navigation
feat(website): one registry of every /models address - #19386
MaanilVerma wants to merge 11 commits into
Conversation
…rom the URL registry
… the redirect list does
…-pages' into maanil/fe-2986-models-url-registry
…hecks can load it
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or 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 |
|
QA for FE-2986. Base build is
Preview sitemap: |
🌾 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 1d06193570e1f6fa2b30f06a8dd1077ccda5cc15
Full docs: ADR-DEVEX-LINT-0015 🧩 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 🌐 Website E2ETip All tests passed.
🔗 Website PreviewWebsite Preview: https://comfy-website-preview-pr-19386.vercel.app Models is built and gated by PostHog (workshop-enabled), using staging Cloud. This commit: https://website-frontend-86k31ll0v-comfyui.vercel.app Last updated: 2026-09-29T19:59:30Z for 📦 Bundle Size
|
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## maanil/fe-2961-kill-switch-keeps-pages #19386 +/- ##
=======================================================================
Coverage 84.14% 84.14%
=======================================================================
Files 3201 3202 +1
Lines 155710 155760 +50
Branches 42175 42186 +11
=======================================================================
+ Hits 131019 131069 +50
Misses 22982 22982
Partials 1709 1709
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🔍 Cursor Review — Consolidated panel
Triggered by @MaanilVerma.
Found 9 finding(s).
| Severity | Count |
|---|---|
| 🟠 High | 1 |
| 🟡 Medium | 3 |
| 🟢 Low | 4 |
| ⚪ Nit | 1 |
Panel: 8/8 reviewers contributed findings.
…ame isWorkshopRoute's input a route
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
…2986-models-url-registry
benjcooley
left a comment
There was a problem hiding this comment.
Review
No blockers. I traced the three systems this touches (@astrojs/sitemap 3.7.3, markdown-twins.ts, workshop-release-gate.ts) and the registry/gate pairing holds up better than the bot review suggests — see the note below. What is left is maintainability, not correctness.
| Severity | Count |
|---|---|
| BLOCKER | 0 |
| SHOULD FIX | 3 |
| TRIVIAL | 1 |
On the "fail open" finding (bot, High)
I don't think it stands, and I'd rather say so than let it sit. In astro 7.2.1, astro:build:done's pages array is populated only for route.type === 'page' (core/build/generate.js:406,423). Both consumers of isWorkshopRoute read that same array: markdown-twins.ts iterates pages.map(p => p.pathname), and @astrojs/sitemap builds pageUrls from pages plus static-pathname routes it filters with if (r.type !== 'page') return urls. So the set the gate audits is exactly the set that can leak into the sitemap or a .md twin. The residual holes the bot named — configured redirects (type: 'redirect'), endpoints, public/ passthrough files — are invisible to the sitemap and the twin writer too, so they can't leak either. The subtree-by-default alternative would be safer only against a leak path that doesn't exist.
One consequence worth writing down somewhere: that equivalence is load-bearing and undocumented. If markdownTwins ever switches to walking dist/, or a future @astrojs/sitemap starts emitting redirect routes, the gate silently stops covering the leak surface.
Verified and fine
- Built-vs-registered for models is exact:
routerWorkshopModelPathsisworkshopModels+routerModelSlugAliases.keys(), which is what the registry feeds in. Workflows and apps are a deliberate superset (all declared display entries vs. the filtered built set) — safe direction. page.jsonreservations matchpage.json.ts'sgetStaticPaths(workshopPages, canonical only — no aliases, no apps).- No import cycle: nothing in the
workshop-browse-contentgraph reaches back toworkshop-release.ts. - The
?rawavoidance works —workshop-workflow-catalog.tsis the only?rawmodule in that neighbourhood and the registry doesn't reach it.workshop-client-boundarystill catches any client import, because the forbiddenworkshop-browse-content.tsis one hop away. /zh-CN/modelsis unaffected;isWorkshopRoutenever matched it before either.
…reuse parsed display data Reads the already-parsed display entries from workshop-browse-content instead of parsing workshop-display.json again, derives the registry base from its hub entry so the gate cannot audit the wrong base, only lets aliases point at navigable pages, and derives test slugs from content.
benjcooley
left a comment
There was a problem hiding this comment.
Approving. The three SHOULD FIXes in my earlier review (#19386 (review)) are worth doing but none of them block: the duplicate display-JSON parse is a build-time cost, the base/registry decoupling is a trap for the FE-2972 follow-up rather than a live defect (both parameters currently default and agree), and the hard-coded content slugs are test maintenance. Happy to see them folded in here or picked up later.
What I verified rather than assumed:
- Built-vs-registered is exact for models (
routerWorkshopModelPathsis preciselyworkshopModels+routerModelSlugAliases.keys(), which is what the registry is fed) and a deliberate superset for workflows and apps — the safe direction. page.jsonreservations line up withpage.json.ts'sgetStaticPaths: canonical slugs only, no aliases, no apps.- No import cycle — nothing in the
workshop-browse-contentgraph reaches back toworkshop-release.ts. - The
?rawavoidance is real, andworkshop-client-boundarystill catches any client import because the forbiddenworkshop-browse-content.tssits one hop from the registry. - The gate is a sound backstop:
astro:build:done'spagescovers exactlyroute.type === 'page', which is the same setmarkdown-twinsand@astrojs/sitemapread, so the audited set equals the leak surface. Details in the earlier review — I don't think the "fails open" finding stands.
The one thing I'd like written down somewhere in models-url-registry.ts: that equivalence between the gate's input and the sitemap/twin input is load-bearing and currently implicit. If the twin writer ever switches to walking dist/, or a future @astrojs/sitemap starts emitting redirect routes, coverage drops with nothing failing. Worth a line before #19359 lands /models/* redirects.
benjcooley
left a comment
There was a problem hiding this comment.
Re-reviewed 3a17225ea1 only. All four items are genuinely fixed in code, not just acknowledged — I checked each against the diff rather than taking the replies at face value. Threads resolved.
| Item | Status |
|---|---|
| Duplicate 554 KB display-JSON parse | Fixed — workshopDisplayEntries exported from workshop-browse-content.ts and reused; the shadowing displaySlugs is now slugsOfType |
base/registry could disagree |
Fixed, and then some — ModelsUrlRegistry is { base, entries }, base derived from the single hub, base parameter gone |
| Tests hard-coded live content slugs | Fixed in all four files — workshopModels[0] and first APP / CLOUD-SERVERLESS display entry |
Alias could target a reserved address |
Fixed — navigableKinds, with a test case |
The two new invariants (exactly one hub; every entry under it) go beyond what I asked for and are the right shape — a registry that can't say where it lives was the actual defect, not just the unused parameter. Also confirmed astro/tsconfigs/strict doesn't set noUncheckedIndexedAccess, so hubs[0].path and the const [{ slug }] = workshopModels destructures typecheck.
Approving. One new note below, forward-looking only — it doesn't affect anything this PR builds, but it does contradict the migration plan in the PR description, so better to settle it before PR B is written than after.
benjcooley
left a comment
There was a problem hiding this comment.
Re-reviewed bc8747d92b only. Both items fixed, threads resolved, nothing new. Done reviewing — ship it once CI is green.
The roots change is the right generalization, and better than what I proposed. I suggested exempting aliases from the under-the-hub check; you found that wouldn't have been enough, because the hub-workflows branch also registers pages under /hub/workflows. Dropping the single derived base for an explicit roots list fixes the general case: the registry now declares which URL spaces it governs rather than inferring one from the hub, which is what the gate actually needs to know.
Checked this round:
assertOneHubruns before the roots check, so the two-hub case reports "exactly one hub" rather than the misleading "outside" error. The test depends on that ordering and it holds.isUnderRootsmatches the root itself, not just paths under it, sounregisteredModelsPathsnow also checks/models. Registered ashub, so no behaviour change today — and correct once/modelsbecomes an alias.- The
${root}/guard stops a root from swallowing a sibling prefix: with roots['/model'],/models/xis correctly not under it. - Overlapping roots are harmless (
.some). - The
aliases across rootstest is the FE-2972 shape end to end, and the sitemap semantics fall out right:/hub/modelsishubso it stays listed,/modelsbecomesaliassoisWorkshopRoutedrops it — which is what you want for a redirect stub. - Trailing-slash normalization now covers
baseinmodelsUrlEntriesand every root inbuildModelsUrlRegistry, withregistry.rootsasserted in the test. AsiteRedirectsrow goes in as-is. - No
registry.basereferences left anywhere; the only non-test caller is the module singleton.
One thing I deliberately did not raise as a finding, just so it's on the record rather than a surprise later: indexing.ts still hardcodes /models/showcase, /models/apps/cinematic-studio and /models/apps/reshoot in NOINDEX_ROUTES, independent of the registry. That's correctly out of scope here and belongs to whichever PR moves the namespace.
Three rounds, four findings, two forward-looking notes, all addressed with tests that encode the failure each time. I have nothing further.
…2986-models-url-registry
benjcooley
left a comment
There was a problem hiding this comment.
Re-approving at 8a695a9e. To be accurate about what this round was: the only commit since my last review is a merge of the base branch, not new registry work. So I reviewed the merge resolution rather than re-reading the feature.
That was worth doing, because the base branch moved under this PR in exactly the files it touches — it rewrote the gate's astro:build:done to take assets and check unbuilt/leaked through it, and it reverted isWorkshopRoute to startsWith('/models/') on its own line of history. A clean textual merge would not have guaranteed a coherent result.
What I checked in the merged tree:
workshop-release.tskept the registry-basedisWorkshopRouteand the base'sassertWorkshopCloudEnvForBuildchanges. No duplication, nothing dropped.workshop-release-gate.tskeeps theunregisteredModelsPathsblock on top of the base's newassets-driven checks. The two gates are complementary: one says every Models route must build, the other says everything built must be registered.- The real resolution work was in
workshop-release-gate.test.ts.buildDonegrew both parameters as(assets = builtModelsRoutes(), modelsPages = []), withassetskept first so the base's existing call sites still work, and the two registry tests updated to passbuiltModelsRoutes()explicitly. I walked all nine call sites — none passes an array whereassetsis expected, which was the obvious way for this merge to go wrong silently. workshop-display.jsonchanged 56 lines, but the slug and type sets are byte-identical across the merge (331 entries before and after), so the registry's address space is untouched. The tests deriving slugs fromworkshopModels[0]rather than hardcoding them earned their keep here.workshop-workflows.jsonlmoved too, but built workflow and app pages are still derived from display entries, so built stays a subset of registered regardless.app.astrogained video models in its runnable list without touchingappPagePaths, so no address change.
No new findings, all threads still resolved. Ship it once CI is green — and remember the base branch has to land first.
## Summary **Deploy gate: comfy-router#46 is merged and live (2026-09-30). Its follow-up comfy-router#48 (serves `/hub/models.md` instead of 301ing it to a /workflows 404) must be deployed before this merges. After the merge, purge Cloudflare for `/hub/models*`, `/hub/workflows*` and the 30 workflow names in `hub-workflow-names.json`. The redirects ship as 307; FE-3083 flips them to 308 later.** This branch combines every Workshop /models SEO PR, so merging it to main replaces merging them one by one. It also launches: Comfy-Org#19405 commits `launchedModelPages = 'all'`, so all 148 model pages become indexable in the same deploy as the URL move. Part of FE-2912, FE-2942 (PR 2 is FE-3086), FE-2974 (/minimax 308 is FE-3087) Fixes FE-2978, FE-2989, FE-2991, FE-2990, FE-2959, FE-2981, FE-2977, FE-2979, FE-3014, FE-2936, FE-2980, FE-2975, FE-3085, FE-2972, FE-2935, FE-2950, FE-2940, FE-2930, FE-2985, FE-2957, FE-2961, FE-2986, FE-2921, FE-2922, FE-2947 ## Changes Router follow-up: comfy-router#48 (`/hub/models.md` routing, 324/324 router tests), deploy before this merges. The included PRs, in merge order. Every head was checked as contained at the final tip. | PR | Ticket | What | Ben | |---|---|---|---| | Comfy-Org#18887 | FE-2978 | Pricing Product markup and full video `uploadDate` | approved | | Comfy-Org#18889 | FE-2989 | A unique meta description on every model page | approved | | Comfy-Org#18890 | FE-2991 | Model page JSON-LD, emitted once noindex lifts | approved | | Comfy-Org#18892 | FE-2990 | Cleaner tag pills, guard against duplicate summaries | approved | | Comfy-Org#18893 | FE-2959, 2981, 2977, 2979 | Social tags, hub title, Organization data. The FE-2977 title was confirmed by the owner | approved | | Comfy-Org#19362 | FE-3014 | Every non-production build is noindex | approved | | Comfy-Org#19366 | FE-2936 | Model titles lead with "API & Playground" | approved | | Comfy-Org#19402 | FE-2980 | Every internal link ends with a slash, plus a CI check | approved | | Comfy-Org#19419 | FE-2975 | Footer links the catalogue on every page and locale | approved | | Comfy-Org#19476 | FE-3085 | `NOINDEX_ROUTES` decides noindex for serverless-animation | approved; re-approval pending on a one-line follow-up (CodeRabbit approved) | | Comfy-Org#19359 | FE-2974 | One typed redirect list that generates `vercel.json` | approved | | Comfy-Org#19369 | FE-2972 A | The old to new model URL map | approved | | Comfy-Org#18891 | FE-2935 | Model content shows whatever the flag says | approved | | Comfy-Org#18899 | FE-2942 | Model pages render in the static HTML | approved | | Comfy-Org#18898 | FE-2950 | Catalogue h1 and A to Z links in the static HTML | approved | | Comfy-Org#19375 | FE-2940 | Related models leave no page unlinked | approved | | Comfy-Org#19385 | FE-2930 | Examples show the prompt that made them | approved | | Comfy-Org#19394 | FE-2985 | Render guard e2e: no loader, no layout shift | approved | | Comfy-Org#19357 | FE-2957 | robots.txt stops blocking our scripts and styles | approved | | Comfy-Org#19360 | FE-2961 | Turning Workshop off keeps every Models page | approved (a CodeRabbit changes-requested review is still open) | | Comfy-Org#19386 | FE-2986 | One registry of every Models address | approved | | Comfy-Org#19421 | FE-2972 B1 | Model pages served at `/hub/models` | approved | | Comfy-Org#19422 | FE-2972 B2 | Every old model URL redirects (307) | approved | | Comfy-Org#19424 | FE-2972 B3 | Workflow pages at `/hub/workflows` with redirects | approved | | Comfy-Org#19399 | FE-2921 | One switch decides model robots and sitemap listing | approved | | Comfy-Org#19404 | FE-2922 | Clean markdown twins for model pages | approved | | Comfy-Org#19405 | FE-2947 | Lifts noindex on every canonical model page | approved | | comfy-router#46 | FE-3075 | Serves `/hub/models*` from the website and routes `/hub/workflows` by manifest. Merged and live | merged | These fixes exist only on this branch, because they only break once two PRs meet: - `scripts/check-models-html.ts` reads each page at `model.href` and skips models without a page (f1df1e4). - `e2e/fixtures/modelsCatalogue.ts` reads `dist/hub/models` (f87bb4c). - `routerIdsByModelPage` accepts an optional `href`, since Comfy-Org#19421 made it optional and Comfy-Org#19405 no longer typechecked (9783819). - `ModelStatus` links a successor only when it has a page, for the same reason on Comfy-Org#18899 (c4761d8). - The model breadcrumb in `modelJsonLd.ts` points at `/hub/models/` instead of the `/models/` redirect (eb985b6). Its label still says "Models" while the nav says "Hub". - Twin, meta-description and entry tests use the hub pages and the new tag set (86ac3b0, d4ffc0f). - The render guard finds the catalogue through `getRoutes().workshop`, and its `test.fail` is gone now that Comfy-Org#18898 renders the h1 (831499f). - A new test renders a real model page and checks its markdown twin has the model's h1 (9a6c5cb). - Main's newer catalogue and workflow e2e cases use the hub addresses (2aeda77). - `resetWorkshopAccountSource` resets `decision`; a clean auto-merge of main's Comfy-Org#19454 into Comfy-Org#18891 left it assigning a variable that no longer exists (c28c7a7). The conflict resolutions, briefly: `ALTERNATE_TWIN_SOURCES` stays deleted as Comfy-Org#18898 wants, so `/hub/models.md` comes from the real catalogue. The hub keeps Comfy-Org#18898's single static h1 instead of the `WorkshopHero` h1 that main's Comfy-Org#19320 added. `ExamplesTab` keeps Comfy-Org#19385's figure and caption with main's video poster. The Comfy-Org#19399/Comfy-Org#19405 indexing tests were rewritten for hub paths. The Comfy-Org#19359 redirect test no longer builds `/enterprise//` from slash-ended routes. The Comfy-Org#19369 URL-map test imports `PROVIDER_NAMES` from its new home. The full table of 47 resolutions is in the integration report. ## Review Focus - Launch rides along with the URL move. If launch should stay a separate step, set `launchedModelPages` in `apps/website/src/config/model-page-launch.ts` to `new Set()` before merging. - Main's Comfy-Org#19320 gives the catalogue island its own h1 through `WorkshopHero`. This branch keeps Comfy-Org#18898's static h1 and renders only the subtitle in `ModelsCatalogue.vue`, so the hub has exactly one h1. - Comfy-Org#19476 overlaps the open community PR Comfy-Org#18591 (same sitemap exclusion for serverless-animation). One of them should be closed once this lands. ## QA - [x] Gates: `pnpm typecheck` and website typecheck clean, `pnpm lint` 0 errors, eslint on `apps/website` clean, `pnpm knip` clean - [x] Website unit: 547 files, 10347 passed, 4 skipped - [x] Build A (`build:e2e`, CI env): 1193 pages; release gate, `check:hreflang`, `validate:llms-txt-links` (225 links), `validate:jsonld` (947 pages), `check:link-slashes`, `check:models-html` (148 pages) all pass - [x] Build B (`WORKSHOP_IN_BUILD=0`): same 182 Models pages as the on build, no `dist/workshop`, `/` is noindex; with the flag stubbed on, no Run, no Hub nav and no Firebase requests - [x] Build C (preview shape): 945 of 945 pages noindex, no canonicals except redirect stubs, no hreflang in the sitemap - [x] E2E on Build A: 644 of 645 passed; the one mobile failure passed on rerun. Earlier load flakes (navigation, demos, fdct, wan-3.0, network isolation, render guard) all passed when rerun alone - [x] Launch: 148 model pages indexable with canonicals, 149 hub entries in the sitemap, 148 non-empty twins with the model h1, 148 in `llms-full.txt`, 0 titles over 60, 30 workflow pages still noindex - [x] Redirects: 853 rules, 782 to /hub all 307, the MiniMax rows 307, every /hub destination built - [x] comfy-router#46 under `wrangler dev` in front of this build: 312 router tests pass; 148 old model URLs (both slash forms) 307 then 200; 30 workflow names served by the website and their old URLs 307; a non-manifest workflow 302 with no-store; `manifest.json` passes through; `/workflows/` and bare `/hub` unchanged - [x] After the router deploys and this merges: purge Cloudflare, then curl `https://comfy.org/hub/models/` for a 200 and three old `/models/<slug>/` URLs for one 307 each - [x] Rich Results Test on `/pricing/` and `/learning/animations/character-sheet/`, then "Validate fix" on Merchant listings and Videos - [x] Rich Results Test on two live model pages: breadcrumbs valid and the breadcrumb URL returns 200 with no redirect - [x] GPTBot and Googlebot curls on the hub and one model page, then a GSC live test on both - [x] Resubmit the sitemap in Search Console and URL-inspect about 20 model pages on day 0 and day 14 - Not covered: Rich Results and GSC need production; the redirect matrix used a local shim for `vercel.json`, since `astro preview` ignores it --------- Co-authored-by: GitHub Action <action@github.com> Co-authored-by: benjcooley <benjcooley@gmail.com> Co-authored-by: Deep Mehta <42841935+deepme987@users.noreply.github.com>
|
Superseded by the integration branch #19494, which combined this PR with every other Workshop SEO slice and has been merged to main. Closing this one. |
Summary
Every
/modelsaddress is now registered once, with its kind (hub, model, workflow, app, alias or reserved). The sitemap filter, the markdown twins and the release gate read that one list, and two pages can no longer claim the same address. Built output is unchanged.Stacked on #19360.
Fixes FE-2986 (https://linear.app/comfyorg/issue/FE-2986/one-list-of-every-models-address-so-different-page-types-cant-clash)
Changes
src/config/models-url-registry.tsbuilds the registry from the router models, the router aliases, and the workflow and app entries inworkshop-display.json.buildModelsUrlRegistry()throws when two entries share a path, and when an alias points at anything other than a registered page.isWorkshopRoute()now asks the registry instead of matching every/models/*path. The sitemap and the twins both go through it (viaisExcludedFromSitemap), so an address the registry doesn't mark as Workshop, like a future/models/local/, gets listed and twinned./models/isn't in the registry, with or without Workshop. Adding a page type means registering its addresses first.?rawworkflow catalogue), so plain-Node checks likecheck:hreflangcan still importindexing.ts.Changed from the ticket:
/p/supported-modelsslug allowlist and the placeholder reserved names (video,local,how-we-test). Once those pages are registered, the duplicate-path check catches a clash on its own, and with the move to/hub/models/they'd be reserving the wrong namespace.How FE-2972 / FE-2974 plug in: the registry records the path roots it governs.
buildModelsUrlRegistry(entries, roots)rejects any entry that sits under none of them, and the release gate flags a built page under any root that nothing registers. This PR passes['/models']. PR B passes['/models', '/hub/models'], builds the pages under/hub/models, and keeps each old/models/<slug>registered as{ kind: 'alias', destination }, so the old addresses stay out of the sitemap and the twins and the gate still covers both trees. That is the same source/destination pair as asiteRedirectsrow in #19359, so the alias entries can be fed from that list with a map and no redesign. A trailing slash on the base or a root is dropped, so those rows can go in as they are. The builder already rejects an alias that lands on another alias, which is the one-hop rule.Review Focus
models-url-registry.ts,displaySlugs). The gate guarantees the other direction.page.jsonandcatalogue.jsonare registered for collision checks but Astro doesn't pass endpoints toastro:build:done.