mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-05-21 21:09:00 +00:00
*PR Created by the Glary-Bot Agent* --- ## Summary The [`/cloud/supported-nodes`](https://comfy-website-preview-pr-12271.vercel.app/cloud/supported-nodes) page was rendering packs without descriptions, icons, or download counts (PR #12271 preview, [`Release: Website` run](https://github.com/Comfy-Org/ComfyUI_frontend/actions/runs/25866708684/job/76010642686)). The registry enrichment in `apps/website/src/utils/cloudNodes.registry.ts` was silently failing for **two** reasons: 1. **Missing `limit` query parameter.** `api.comfy.org /nodes` applies a default page size of `10` when no `limit` is sent. Each batch of up to 50 `node_id` filters was therefore truncated to 10 results, dropping metadata for every pack past the first ten. 2. **Schema rejected `null` for optional arrays.** The registry serializes empty server-side slices as JSON `null`, so any pack with `supported_os: null` or `supported_accelerators: null` failed Zod validation — and because parse failure is not retryable, the **entire batch** got `null` enrichment. Both bugs produce the same user-visible symptom ("packs fetched, but no metadata"), so they were entangled. ## Changes (2 files) - `cloudNodes.registry.ts`: send `?limit=<batch length>` on every batch and accept `null` for all optional registry fields. The schema normalizes `null → undefined` at the parse boundary via `.transform()`, so the parsed shape continues to match the generated OpenAPI `Node` type contract; downstream code (`toDomainPack`, the rendered `Pack`) is unchanged. - `cloudNodes.registry.test.ts`: two new regression tests: - Server-side default page size: simulates the pre-fix behavior (default `limit=10` truncates) and asserts all 30 batched IDs are enriched. - `null` registry fields: asserts `null` values are normalized to `undefined` on the parsed pack. ## Verification End-to-end fetch against the live registry on this branch (14 packs from the current snapshot): ``` Requested: 14, enriched: 14 comfyui-kjnodes downloads=3,404,416 rgthree-comfy downloads=3,105,034 comfyui-easy-use downloads=2,829,702 comfyui-impact-pack downloads=2,680,589 comfyui_essentials downloads=2,418,367 (supported_os null → undefined) ComfyUI-Crystools downloads=1,729,087 comfyui_layerstyle downloads=1,696,809 comfyui_ultimatesdupscale downloads=1,478,763 comfyui_ipadapter_plus downloads=1,236,442 (supported_os null → undefined) was-node-suite-comfyui downloads=993,960 (supported_os null → undefined) comfyui-advanced-controlnet downloads=600,849 comfyui-animatediff-evolved downloads=503,831 comfyui-cogvideoxwrapper downloads=121,716 (supported_os null → undefined) comfyui_steudio downloads=58,470 (supported_os null → undefined) ``` 5 of 14 packs returned `null` arrays — all parse cleanly now. Sort-by-downloads (already implemented in `useFilteredPacks.ts`) becomes meaningful again once `downloads` is populated. Quality gates: - `pnpm --filter @comfyorg/website test:unit` → 77/77 pass (includes 2 new regression tests) - `pnpm --filter @comfyorg/website typecheck` → 0 errors, 0 warnings on changed files - `pnpm exec eslint` on changed files → clean - `pnpm exec oxfmt --check` on changed files → clean ## Follow-ups (separate tickets) - "New" badge + `dateAdded` field for newly added packs. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-12307-fix-website-restore-registry-metadata-for-cloud-nodes-catalog-3626d73d365081288a2cfc30003160cf) by [Unito](https://www.unito.io) Co-authored-by: Glary-Bot <glary-bot@users.noreply.github.com>