Repository navigation
feat(website): read capability from the Hub workflow list URL - #21549
MaanilVerma wants to merge 10 commits into
Conversation
The workflow list now reads `capability` on load, shows it as a chip, filters the results by it, and keeps it in the URL when the search, sort or other filters change. Removing the chip or pressing Clear drops it from the URL. On the server-filtered list, a capability the catalog does not know stays in the URL and the list shows the empty result with its chip and a Clear button. On the static list, a capability that no workflow has is dropped, so the full list shows.
The debounced watch now calls filterAddress, which builds the list URL from the search, filters and sort. The pre-push complexity audit flagged the larger callback.
📦 Bundle Size
🧩 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
Findings and check detailsThe matrix runs on same-repository version-bump PRs with relevant changes, main-branch pushes, and manual dispatches. This candidate does not qualify, 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. Findings and check detailsNo new findings in the changed files. Reproduce locally# the base the gate compared against
npx fallow audit --root . --quiet --format json \
--changed-since cfcff3a504815861c835bdb52cee50ca1d0f9d6a
Full docs: ADR-DEVEX-LINT-0015 🏛️ Architecture: ✅ PassedFindings and check detailsWarnings (132)
Reproduce locallypnpm architecture:checkFull docs: Frontend domain catalog 🌐 Website E2ETip All tests passed. Test results
🔗 Website PreviewWebsite Preview: https://comfy-website-preview-pr-21549.vercel.app Models is built and gated by PostHog (workshop-enabled), using staging Cloud. Deployment detailsThis commit: https://website-frontend-ak2gizo1g-comfyui.vercel.app Last updated: 2026-10-21T16:59:15Z for |
QA: the Hub workflow list reads capability from the URLI ran
7 pass, 0 fail, 0 escalated, 0 inconclusive. 4 new unit tests (red before the change: 3 failed, 11 passed; green after: 1167 of 1167 in Not covered here: the real CCC staging catalog, because this run used a mock catalog only. Mobile widths, because the change adds no layout. |
|
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 configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
The new catalogueAddress function in models-catalogue.ts builds the list URL from a base search, the search text, the sort and a map of filter values. WorkshopModelsGrid now calls it in place of its own delete loop and appendSelectedFilters. A table test covers the kept keys, the dropped defaults and the filter order.
The workflow list now reports a capability change as a hub_filter_changed event with the new capability filter. It trims each capability from the URL, drops blank values and shows a repeated value one time. The list writes its URL with catalogueAddress.
…-capability-param
benjcooley
left a comment
There was a problem hiding this comment.
Review of the capability URL param.
| Severity | Count |
|---|---|
| BLOCKER | 0 |
| SHOULD FIX | 2 |
| TRIVIAL | 2 |
What I verified
capabilityreaches CCC on the SSR path (catalog-list.ts:78viahub-section.astro) and on the client refetch path (catalogue.json.ts).- The CCC filter is an exact match on
d.tags. The chip values come from the same field. - The
WorkshopModelsGridrefactor keeps the same key set and order. - The analytics
quietly()path does not fire an event for a value restored from the address.
The two SHOULD FIX items:
- The trimming happens only in the island. The SSR fetch sends padded or blank values raw, and CCC rejects them, so the page returns 503.
- On the static (non-CMS) list, every workflow has
capabilities: [], so the static branch drops every capability.
The backend behavior was checked against databases/catalog/website_cards.go on the cloud CCC branch. Staging may differ.
benjcooley
left a comment
There was a problem hiding this comment.
Re-review at 0158ef8.
The only new commit is a clean merge of work/ccc-mar-integration-20261014. This PR's own diff is byte-identical to the one I reviewed at ecd3137, and none of the merged base commits touch the files behind the earlier findings. So all four threads are still open, with no fixes and no replies.
| Severity | Open |
|---|---|
| BLOCKER | 0 |
| SHOULD FIX | 2 |
| TRIVIAL | 2 |
- SHOULD FIX:
catalog-list.tsdoes not normalize the values before the server-side fetch, so a padded or blankcapabilityreturns 503. This is now confirmed against cloudmain. - SHOULD FIX: the static-list capability branch never matches, because every static workflow has
capabilities: []. - TRIVIAL: the
removeChipfallthrough and thecatalogueAddressdoc comment.
No blockers, so I'm leaving this as a comment. I'll approve once the two SHOULD FIX items are fixed or explicitly declined.
Codecov Report❌ Patch coverage is @@ Coverage Diff @@
## work/ccc-mar-integration-20261014 #21549 +/- ##
=====================================================================
- Coverage 86.45% 86.34% -0.11%
=====================================================================
Files 4030 3924 -106
Lines 184642 181393 -3249
Branches 50825 49718 -1107
=====================================================================
- Hits 159627 156620 -3007
+ Misses 22316 22222 -94
+ Partials 2699 2551 -148
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 114 files with indirect coverage changes 🚀 New features to boost your workflow:
|
benjcooley
left a comment
There was a problem hiding this comment.
Re-review at 9e7e9bd, covering 5 commits since 0158ef8. CI is green.
All four earlier findings are fixed and verified, and the threads are resolved:
- Padded or blank capability caused an SSR 503.
cardQuerynow sendsaddressCapabilities(params). The newcatalog-listtest asserts that CCC receives['b'], and it fails if the fix is reverted. - The static-list branch never matched. Capability is now CMS-only, and the static test asserts it is ignored while
modelstill filters. removeChipnow has an explicitmodelbranch, andcatalogueAddresshas a doc comment.
| Severity | New this round |
|---|---|
| BLOCKER | 0 |
| SHOULD FIX | 0 |
| TRIVIAL | 1 |
Non-blocking notes:
- TRIVIAL:
parseCatalogSearch(models-catalogue.ts:510, used byWorkshopModelsGrid) still readscapabilitywithout trimming or deduping. So?capability=+on Models shows the flat grid over an unfiltered list. That is better than the old 503, butcapabilities: addressCapabilities(params)there would make the two readers match. - Follow-up:
cardQuerystill sendscategory,model,use,modalityandproviderraw, and CCC's TrimSpace check rejects padded values, which returns 503. This predates the PR. A shared sanitizer would close it. - Rollout:
cmsEnabled()is false whenVERCEL_ENV === 'production', so?capability=has no effect in production until CMS ships there. Old-tag links from #21554 and the router will land on the unfiltered list until then.
|
Moved to Comfy-Org/comfy-website#21 (the website now lives there). This PR stays open for its review history. |
|
Superseded by Comfy-Org/comfy-website#21. The website moved to Comfy-Org/comfy-website. |






Summary
The CMS Hub workflow list now opens filtered when the URL has
capability, for example/hub/workflows/?capability=Image%20Edit. The redirects from old tag pages (plan item R1) send visitors to these URLs. The capability shows as a chip, and it stays in the URL when the visitor changes the search or sort. The static list has no capability data, so it ignorescapability.Changes
addressCapabilitiesfunction inmodels-catalogue.tsreads everycapabilityvalue from the URL, trims it, drops blank values and keeps a repeated value one time.cardQueryinlib/cms/catalog-list.tssendsaddressCapabilities(params)to CCC. Thus the server-rendered fetch and the island send the same list.readAddressinWorkflowCatalogue.vuereadscapabilityinto a newcapabilitieslist only whenserverPageis set. On the static list,capabilitiesstays empty.catalogueAddressfunction inmodels-catalogue.tsbuilds the list URL from a base search, the search text, the sort and a map of filters. It dropspandcursor.WorkflowCatalogue.vueandWorkshopModelsGrid.vueboth write their URL withcatalogueAddress. The workflow list now writescapabilitynext toq,category,modelandsort.hub_filter_changedevent with the newcapabilityvalue ofHubFilter.removeChipchanges the model filter only for themodelchip kind.capabilitywithq, the URL sync, an unknown capability on the server list, blank and repeated values in the island and in the CCC request, a static list that ignorescapability, the filter event, andcatalogueAddress.QA Focus
pnpm exec vitest run src/components/workshop/WorkflowCatalogue.test.ts src/components/workshop/WorkflowCatalogue.analytics.test.ts src/lib/cms/catalog-list.test.ts src/config/models-catalogue.test.tsinapps/website. Expected: all tests pass. Author: tested,WorkflowCatalogue.test.tshas 15 passing tests at4670bdbbec. In the full website suite at9e7e9bde97, three other files (workshop-contract,workshop-router-openapi,catalog-detail-ssr) timed out under machine load, and all three pass when run alone.pnpm exec vitest run src/lib/cms/catalog-list.test.ts -t capability. Expected: CCC gets onlybforcapability=+&capability=+b+&capability=b. Author: tested. Atccfd08b672(test only), CCC got[" ", " b ", "b"]. Atde91d99b69, the test passes./hub/workflows/?capability=Upscalein CMS mode. Expected: only the Upscale workflows show, with an Upscale chip. Author: tested with a mock CCC catalog, see the QA comment.capabilityafter the sort change and loses it after the chip removal. Author: tested with a mock CCC catalog, see the QA comment./hub/workflows/?capability=Not%20A%20Capabilityin CMS mode. Expected: the empty result shows with the chip, and Clear brings back the full list. Author: tested with a mock CCC catalog, see the QA comment./hub/workflows/?capability=+&capability=+b+&capability=bin CMS mode. Expected: one chip namedb, and the URL writescapability=b. Author: tested in unit testtrims, drops blank and merges repeated capabilities from the address./hub/workflows/?capability=Upscale&model=SeedVR2on the static list. Expected: no Upscale chip shows, and the SeedVR2 filter applies. Author: tested in unit testignores capability on the static list and keeps the other filters. On the island beforec3b415a0dd, the Upscale chip showed.hub_filter_changedevent withfilter: 'capability'. Author: tested in unit testreports a capability the visitor removes but not the one a shared link sets, at9e7e9bde97.pnpm typecheck:website,pnpm knipand eslint on the changed files. Expected: no errors. Author: tested in the first review round, 0 errors. Eslint ignores the test file, and the pre-commit oxlint run passed on both files. Not run again after the second round.Risky areas
WorkshopModelsGrid.vuenow writes its URL withcatalogueAddress. The keys and their order did not change, and the existing grid tests pass.catalogueAddressinWorkflowCatalogue.vuenow deletes and writescapability. Before this PR, the island copiedcapabilitythrough unchanged. If a caller setscapabilityfrom outside the island, the island now owns that value. On the static list, the island thus removescapabilityfrom the URL on the next filter change.databases/catalog/website_cards.goin cloud). A redirect that sends a tag CCC does not have thus lands on the empty result.capabilityshows the full, unfiltered list, because static workflow data has no capability tags.cardQuerytrims onlycapability.categoryandmodelstill go to CCC without a trim, because an existing test keepscategory=on purpose.PR dependency map
main(base)main)Merge #21204 before this PR.