Skip to content

feat(website): read capability from the Hub workflow list URL - #21549

Closed
MaanilVerma wants to merge 10 commits into
work/ccc-mar-integration-20261014from
maanil/ccc-list-capability-param
Closed

MaanilVerma wants to merge 10 commits into
work/ccc-mar-integration-20261014from
maanil/ccc-list-capability-param

Conversation

@MaanilVerma

@MaanilVerma MaanilVerma commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

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 ignores capability.

Changes

  • The new addressCapabilities function in models-catalogue.ts reads every capability value from the URL, trims it, drops blank values and keeps a repeated value one time.
  • cardQuery in lib/cms/catalog-list.ts sends addressCapabilities(params) to CCC. Thus the server-rendered fetch and the island send the same list.
  • readAddress in WorkflowCatalogue.vue reads capability into a new capabilities list only when serverPage is set. On the static list, capabilities stays empty.
  • 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 filters. It drops p and cursor.
  • WorkflowCatalogue.vue and WorkshopModelsGrid.vue both write their URL with catalogueAddress. The workflow list now writes capability next to q, category, model and sort.
  • A capability change now sends a hub_filter_changed event with the new capability value of HubFilter.
  • Each capability shows as a filter chip. Removing the chip or pressing Clear removes it from the URL. removeChip changes the model filter only for the model chip kind.
  • A capability makes the list show the results grid in place of the category rows.
  • Unit tests cover capability with q, 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 ignores capability, the filter event, and catalogueAddress.

QA Focus

  • Run 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.ts in apps/website. Expected: all tests pass. Author: tested, WorkflowCatalogue.test.ts has 15 passing tests at 4670bdbbec. In the full website suite at 9e7e9bde97, three other files (workshop-contract, workshop-router-openapi, catalog-detail-ssr) timed out under machine load, and all three pass when run alone.
  • Run pnpm exec vitest run src/lib/cms/catalog-list.test.ts -t capability. Expected: CCC gets only b for capability=+&capability=+b+&capability=b. Author: tested. At ccfd08b672 (test only), CCC got [" ", " b ", "b"]. At de91d99b69, the test passes.
  • Open /hub/workflows/?capability=Upscale in CMS mode. Expected: only the Upscale workflows show, with an Upscale chip. Author: tested with a mock CCC catalog, see the QA comment.
  • Change the sort, then remove the chip. Expected: the URL keeps capability after the sort change and loses it after the chip removal. Author: tested with a mock CCC catalog, see the QA comment.
  • Open /hub/workflows/?capability=Not%20A%20Capability in 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.
  • Open /hub/workflows/?capability=+&capability=+b+&capability=b in CMS mode. Expected: one chip named b, and the URL writes capability=b. Author: tested in unit test trims, drops blank and merges repeated capabilities from the address.
  • Open /hub/workflows/?capability=Upscale&model=SeedVR2 on the static list. Expected: no Upscale chip shows, and the SeedVR2 filter applies. Author: tested in unit test ignores capability on the static list and keeps the other filters. On the island before c3b415a0dd, the Upscale chip showed.
  • Remove a capability chip on the CMS list with analytics on. Expected: one hub_filter_changed event with filter: 'capability'. Author: tested in unit test reports a capability the visitor removes but not the one a shared link sets, at 9e7e9bde97.
  • Run pnpm typecheck:website, pnpm knip and 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.
  • Open the list against the real CCC staging catalog. Expected: the same results. Author: not tested, because this PR used a mock catalog only.

Risky areas

  • WorkshopModelsGrid.vue now writes its URL with catalogueAddress. The keys and their order did not change, and the existing grid tests pass.
  • catalogueAddress in WorkflowCatalogue.vue now deletes and writes capability. Before this PR, the island copied capability through unchanged. If a caller sets capability from outside the island, the island now owns that value. On the static list, the island thus removes capability from the URL on the next filter change.
  • An unknown capability on the server list shows "No workflows match your search and filters." The CCC cards query matches capability tags exactly (databases/catalog/website_cards.go in cloud). A redirect that sends a tag CCC does not have thus lands on the empty result.
  • A redirect to the static list with capability shows the full, unfiltered list, because static workflow data has no capability tags.
  • The capability chip shows the raw value as its label, because CCC sends no capability facet with display labels.
  • cardQuery trims only capability. category and model still go to CCC without a trim, because an existing test keeps category= on purpose.

PR dependency map

  1. main (base)
  2. feat(website): Comfy Content Catalog Hub CMS (supersedes #20640, #20933) #21204 feat(website): Comfy Content Catalog Hub CMS (supersedes feat(website): Hub admin redesign, content editor and a shareable demo preview #20640, feat(website): stage CCC admin and Preview primitives #20933) (open, targets main)
  3. feat(website): read capability from the Hub workflow list URL #21549 feat(website): read capability from the Hub workflow list URL (open, targets feat(website): Comfy Content Catalog Hub CMS (supersedes #20640, #20933) #21204) (this PR)

Merge #21204 before this PR.

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.
@github-actions

github-actions Bot commented Oct 21, 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.

No verdict is available. Open the workflow run to confirm the check was intentionally skipped, or fix the collection failure and re-run it.

Findings and check details

The 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: ✅ 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.

Findings and check details

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

Findings and check details

Warnings (132)

  • billing path matches no source files: src/components/dialog/content/credit/**. Remove or update it in docs/architecture/domains/records/billing.domain.json.
  • workspace path matches no source files: src/platform/workspace/fixtures/**. Remove or update it in docs/architecture/domains/records/workspace.domain.json.
  • src/components/graph/selectionToolbox/LinkSelectionActions.vue is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/searchbox/v2/filterChip.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/ui/Popover.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/ui/card/Card.stories.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/ui/card/Card.vue is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/ui/card/CardFooter.vue is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/ui/card/CardHeader.vue is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/ui/card/card.variants.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/widgetHistory/WidgetHistoryButtons.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/widgetHistory/WidgetHistoryButtons.vue is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/composables/billing/useSubscriptionPaywall.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/composables/billing/useSubscriptionPaywall.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/composables/graph/menuOption.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/composables/useWidgetValueHistory.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/composables/useWidgetValueHistory.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/composables/widgetHistoryScope.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/composables/widgetHistoryScope.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/core/graph/litegraphServiceAccess.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/core/graph/nodeDef/ComfyNodeDefImpl.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/core/graph/widgets/dynamicGroupDiagnostics.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/core/graph/widgets/dynamicGroupDiagnostics.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/core/selection/selectionIntent.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/extensions/core/agentPanel.historyIdentity.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/extensions/core/cameraInfo.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/extensions/core/dynamicPrompts.serializeValue.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/extensions/core/load3d/load3dHost.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/extensions/core/load3d/load3dHost.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/extensions/core/load3d/load3dInstances.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/extensions/core/load3d/reportLoadModelOutcome.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/extensions/core/load3d/reportLoadModelOutcome.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/i18n.literalMessages.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/lib/litegraph/src/LiteGraphGlobal.cloneObject.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/lib/litegraph/src/canvas/canvasClassAccess.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/lib/litegraph/src/canvas/linkHideTransition.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/lib/litegraph/src/canvas/linkHideTransition.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/lib/litegraph/src/canvas/linkSelection.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/lib/litegraph/src/canvas/linkSelection.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/lib/litegraph/src/canvas/linkSnapGeometry.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/lib/litegraph/src/canvas/linkSnapGeometry.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/platform/auth/authStoreAccess.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/platform/auth/currentUserAccess.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/platform/auth/session/sessionCookieAccess.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/platform/auth/session/sessionRevokedError.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/platform/auth/session/webSessionFetch.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/platform/auth/sso/ssoRequiredContext.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/platform/missingModel/releaseModelOptions.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/platform/missingModel/releaseModelOptions.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/platform/telemetry/billingActionNames.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • …and 82 more
Reproduce locally
pnpm architecture:check

Full docs: Frontend domain catalog

🌐 Website E2E

Tip

All tests passed.

View Report

Test results
Status ✅ Passed

🔗 Website Preview

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

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

Deployment details

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

Last updated: 2026-10-21T16:59:15Z for ecd3137

@MaanilVerma

Copy link
Copy Markdown
Collaborator Author

QA: the Hub workflow list reads capability from the URL

I ran astro dev from this branch in CMS mode (SITE_CATALOG_API_URL set) against a mock CCC catalog. The mock has five workflow cards with capability tags and filters capability by exact tag match, as the cloud cards query does. Playwright drove each case and asserted the result, and the trace holds every step.

What it checks Proof
/hub/workflows/?capability=Upscale opens with only the two Upscale workflows and an Upscale chip · unit opens the capability and search from the address as results, and keeps both in sync
Changing the sort to Name keeps capability=Upscale in the URL and adds sort=name · same unit test
Removing the Upscale chip drops capability from the URL and shows every workflow · same unit test
?q=compare&capability=Image%20Edit opens with the search text and the chip, and shows one workflow · same unit test
An unknown capability shows the empty result with its chip, and the list does not break · unit shows the empty result for a capability the server does not know, and clears it
Clear on the unknown capability drops it from the URL and brings back the full list · same unit test
On the static list, a known capability filters the list and an unknown one is dropped unit restores a known capability from a shared URL and drops one no workflow has
All six browser steps, replayable with pnpm exec playwright show-trace trace

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 src/components/workshop/), 6 screenshots, 1 trace, against a mock CCC catalog.

Not covered here: the real CCC staging catalog, because this run used a mock catalog only. Mobile widths, because the change adds no layout.

@github-actions github-actions Bot added the risk:high PR risk grade (advisory shadow check; grader-owned) label Oct 21, 2026
@coderabbitai

coderabbitai Bot commented Oct 21, 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: f744c8f0-148c-4b4d-93a6-e6df7d0f838b

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.

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.
@MaanilVerma
MaanilVerma marked this pull request as ready for review October 22, 2026 02:36

@benjcooley benjcooley 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.

Review of the capability URL param.

Severity Count
BLOCKER 0
SHOULD FIX 2
TRIVIAL 2

What I verified

  • capability reaches CCC on the SSR path (catalog-list.ts:78 via hub-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 WorkshopModelsGrid refactor 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:

  1. 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.
  2. 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 benjcooley 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.

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.ts does not normalize the values before the server-side fetch, so a padded or blank capability returns 503. This is now confirmed against cloud main.
  • SHOULD FIX: the static-list capability branch never matches, because every static workflow has capabilities: [].
  • TRIVIAL: the removeChip fallthrough and the catalogueAddress doc 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

codecov Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.46154% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...site/src/components/workshop/WorkflowCatalogue.vue 86.66% 0 Missing and 2 partials ⚠️
...ite/src/components/workshop/WorkshopModelsGrid.vue 0.00% 0 Missing and 1 partial ⚠️
@@                          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     
Flag Coverage Δ
billing-web-unit ?
website-unit 80.73% <88.46%> (+<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/models-catalogue.ts 91.17% <100.00%> (+0.70%) ⬆️
apps/website/src/lib/cms/catalog-list.ts 87.17% <ø> (ø)
apps/website/src/scripts/workshop-analytics.ts 95.45% <ø> (ø)
...ite/src/components/workshop/WorkshopModelsGrid.vue 91.91% <0.00%> (+0.18%) ⬆️
...site/src/components/workshop/WorkflowCatalogue.vue 94.26% <86.66%> (+0.14%) ⬆️

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

@benjcooley benjcooley 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.

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. cardQuery now sends addressCapabilities(params). The new catalog-list test 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 model still filters.
  • removeChip now has an explicit model branch, and catalogueAddress has a doc comment.
Severity New this round
BLOCKER 0
SHOULD FIX 0
TRIVIAL 1

Non-blocking notes:

  • TRIVIAL: parseCatalogSearch (models-catalogue.ts:510, used by WorkshopModelsGrid) still reads capability without trimming or deduping. So ?capability=+ on Models shows the flat grid over an unfiltered list. That is better than the old 503, but capabilities: addressCapabilities(params) there would make the two readers match.
  • Follow-up: cardQuery still sends category, model, use, modality and provider raw, 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 when VERCEL_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.

@MaanilVerma

Copy link
Copy Markdown
Collaborator Author

Moved to Comfy-Org/comfy-website#21 (the website now lives there). This PR stays open for its review history.

@MaanilVerma

Copy link
Copy Markdown
Collaborator Author

Superseded by Comfy-Org/comfy-website#21. The website moved to Comfy-Org/comfy-website.

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