Repository navigation
feat(website): node graph layout for catalog workflows that cannot run - #21581
comfydesigner wants to merge 10 commits into
Conversation
…raph layout A catalog workflow whose Runnable switch is off now gets the Overview, Details and API tabs instead of the single preview column. Overview shows the catalog description, what the reader provides and the sample outputs, with a sticky Try in Cloud (or Download when it cannot open in Cloud) in the About footer. Details shows the graph with its models, custom node packs, output and author, and API keeps the catalog code panel. Inputs and packs are read from the workflow file, with a loading state. The header and FAQ are unchanged.
|
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 |
📦 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 e2c40e45d8dd679c2bd0fb78eb8776fb9a185e32
Full docs: ADR-DEVEX-LINT-0015 🏛️ Architecture: ✅ PassedFindings and check detailsWarnings (111)
Reproduce locallypnpm architecture:checkFull docs: Frontend domain catalog 🌐 Website E2ETip All tests passed. Test results
🔗 Website PreviewWebsite Preview: https://comfy-website-preview-pr-21581.vercel.app Models is built and gated by PostHog (workshop-enabled), using staging Cloud. Deployment detailsThis commit: https://website-frontend-6yoww9k2t-comfyui.vercel.app Last updated: 2026-10-21T23:43:32Z for |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
🔍 Cursor Review — Consolidated panel
Triggered by @comfydesigner.
Found 10 finding(s).
| Severity | Count |
|---|---|
| 🟡 Medium | 4 |
| 🟢 Low | 5 |
| ⚪ Nit | 1 |
Panel: 6/6 reviewers contributed findings.
Each subgraph is expanded once and the walk is capped, so nested instances cannot blow up. Reading the graph waits for mount, aborts on change or unmount, times out, and reports a failed read instead of no needs. Details restores the version picker and the pre-rendered graph fallback, the footer download keeps the page's file name, the runs-in note shows only with an action, and blank catalog descriptions, authors and model names fall back.
…o components Keeps the About panel and the tabs within the repository's complexity limit after the version picker and read states were added.
benjcooley
left a comment
There was a problem hiding this comment.
Review: node graph layout for non-runnable catalog workflows
The layout is cleanly isolated, the fetch race guard is right, and node-graph-inputs parsing (modes, subgraph recursion guard, Object.hasOwn) and its tests are solid. No blockers. But a few things need fixing before merge.
| Severity | Count |
|---|---|
| BLOCKER | 0 |
| SHOULD FIX | 9 |
| TRIVIAL | 4 |
Main points
- Features silently dropped. Swapping
WorkflowPreviewfor the tabs drops the version picker, the model links, the runs/downloads facts, the author avatar and thepreviewUrlfallback for every non-runnable catalog page. The PR description doesn't mention any of this. Please confirm it's intended or carry them over. useNodeGraphNeedsfetches during SSR, and treats failure as "needs nothing". The immediate watcher runs on the server (WorkflowGraphgates onuseMounted; this doesn't), and a failed read hides the inputs and custom-node sections instead of showing they couldn't be read.- Copy and markup regressions.
- The footer says "can only run on your own ComfyUI" whenever
cloudHrefis missing, even whenworksOnCloudisn't false. - About paragraphs lost
whitespace-pre-line/wrap-break-word. - Only the first About paragraph is in the SSR HTML.
- The footer says "can only run on your own ComfyUI" whenever
On your catalog question (@benjcooley): yes, I'd store inputs and custom node packs in the catalog record, or compute them where public/workflow-graphs/ is already read at build time. That fixes the client fetch, the SSR skeleton and the hand-kept node-pack-names.ts table together.
Tests: node-graph-inputs.test.ts passes locally. I could not run the component tests here; the local node_modules is from another branch. Missing coverage is listed inline.
Reuse WorkflowFacts on Details, keep every About paragraph in the server HTML, give the footer copy for download-only workflows, pause hidden samples, select samples by id, and report tab switches and CTA placement.
…4' into comfydesigner/hub-node-graph-ccc
benjcooley
left a comment
There was a problem hiding this comment.
Re-review: fix commits f64ef320, ef4daebc, 8ba0e7a8 (merge ac4eca7b doesn't touch PR files)
Good round. 11 of my 13 threads are fixed and resolved:
- the SSR fetch is gated on mount, with abort and timeout
- the failed state is shown
WorkflowFactsis reused, which brings back model links, runs/downloads and the avatar- the version picker and
previewUrlfallback are back - About text is in the server HTML and keeps its formatting
- the footer copy is correct
- samples are selected by id
placement,tab_switchedandapi_viewedare sent
The parser and pack-name replies are reasonable as deferrals. 55 tests pass at ac4eca7b.
| Severity | Count |
|---|---|
| BLOCKER | 0 |
| SHOULD FIX | 4 (2 new inline, 2 open threads) |
| TRIVIAL | 2 inline + a few below |
SHOULD FIX
- Older Safari.
useNodeGraphNeedscallsAbortSignal.any/AbortSignal.timeoutdirectly. On the older Safari the repo explicitly supports (workshop-safari-abort.spec.ts), every read reports "Couldn't read the workflow file." Use@/utils/abortSignal. New from the fix. - Reused subgraphs undercounted. Expanding each subgraph once fixes the blow-up, but a subgraph used twice now lists its inputs once. New from the fix.
- Sample video never resumes. The video is paused when the reader leaves Overview, but nothing plays it again on return, so the sample stays frozen (open thread).
- No tests for
useNodeGraphNeeds. Removing the abort guard, the mount gate, the timeout or the!okcheck doesn't fail any test (open thread).
TRIVIAL (not inline)
- Orphaned i18n key:
workshop.nodeGraph.runsWhere(en, zh-CN). - Template-backed downloads:
downloadName === truerendersdownload="true". The header has the same existing pattern. - Footer download and the picked version: the footer still downloads the latest file while the inputs follow the picked version. Fine if intended; a comment would help.
Still open from round 1 as a product decision for @benjcooley: inputs and packs are still read in the browser, so the server HTML has skeletons only. That's fine while workflow pages are noindex, but it should be decided before launch.
Play the looping sample video again when Overview returns. Cover useNodeGraphNeeds on its own: the mount gate, timeout, error status, a source change mid-read and an unmount, and check that picking a version re-reads that file.
…aphs Use the abortSignal fallbacks, list a reused subgraph's inputs once per instance, settle a source-less read on the server, let the footer download follow the picked version, and have WorkflowPreview render the shared version picker.
|
Thanks for the re-review. The non-inline items, in 227f08a:
Server-rendering the inputs and packs stays with you as the catalog decision before launch. |
benjcooley
left a comment
There was a problem hiding this comment.
Re-review: a8dd9794, 227f08a3 — approving
All 6 open threads are fixed and resolved; I checked the code and ran the tests (84/84 pass across useNodeGraphNeeds, node-graph-*, WorkflowNodeGraphTabs, WorkflowPage, WorkflowPreview):
- Older Safari:
combineAbortSignals/createTimeoutSignalare used, and tests delete each static. - Subgraph inputs: counted per instance, with each subgraph's result reused, a cycle guard, and output capped at 5000.
- No-source read: settles on the server, with no "Reading" flash and no hydration mismatch.
- Sample video: resumes on return to Overview.
useNodeGraphNeedstests: the mount gate, timeout, abort and stale-response guards now each fail a test when removed.- Version picker:
WorkflowPreviewnow uses the shared picker; itsstandalonebranch and the orphaned i18n key are gone. The footer download follows the picked version.
| Severity | Count |
|---|---|
| BLOCKER | 0 |
| SHOULD FIX | 1 (test fixture for the memo; inline) |
| TRIVIAL | 1 inline + below |
TRIVIAL (non-blocking)
- Untested lines: the
placement: 'versions'event inWorkflowPreviewand thedownload === true ? ''coercion (footer, Versions) have no test. - Header
download="true":WorkflowActionsstill rendersdownload="true"for template workflows. This is on the base branch, not from this PR; normalisingdownloadNameonce at the source would fix all three places. - Picked version: Try in Cloud and the header download stay on the latest file, while Overview's inputs and footer download follow the pick. Fine, but a one-line comment would help the next reader.
- Round-2 nits still open:
shallowRef, the footer's nested ternary in the template, the borrowed i18n keys, the duplicateparagraphs(), andmodel_viewedon this path.
Still open as a product decision, not a code issue: inputs and packs are read in the browser, so the server HTML only shows loading states. Fine while workflow pages are noindex.
Share the paragraph splitter with WorkflowPage, hold the graph read in a shallowRef, name the footer copy in a computed, give the Details tab its own label, and report model_viewed on non-runnable pages. Test the version picker's placement and the download file names.
benjcooley
left a comment
There was a problem hiding this comment.
Re-review: e07862fc, 580bb725 — still approved
Both remaining threads are addressed and resolved, and the tidy-up is clean:
paragraphs()is shared withWorkflowPage.- The graph read is held in a
shallowRef, and nothing mutatesneedsin place. - The footer copy is chosen in a computed.
- The Details tab has its own key (en and zh-CN).
model_viewedis now sent on non-runnable pages.- New tests cover the memo, the input cap, download file names and the Preview picker's placement.
Tests: 89/89 pass across node-graph-*, useNodeGraphNeeds, WorkflowNodeGraphTabs, WorkflowPage and WorkflowPreview. I also ran mutations. The cap, download-name, footer-copy and Preview-placement tests each fail when their code is reverted.
| Severity | Count |
|---|---|
| BLOCKER | 0 |
| SHOULD FIX | 1 (test-only; inline) |
| TRIVIAL | a few, below |
SHOULD FIX (test-only): the model_viewed test doesn't fail if the runnable gate, once or the workflowsEnabled gate is removed (inline).
TRIVIAL (non-blocking)
- Memo test: removing the memo makes it hang rather than fail (see the thread reply).
- Versions placement: the versions download inside
WorkflowNodeGraphTabsisn't asserted to sendplacement: 'versions'; only the Preview path is. paragraphs(): it lives in the layout-specificnode-graph-workflow.ts, andLocalModelPage.vuestill has its own copy. A neutral module would suit it better.model_viewedis sent from two places: the Playground (runnable) and the page (non-runnable), kept complementary by hand. Sending it from the page for both would remove that coupling.- Round-3 nits still open: the repeated
cloudHref || downloadUrl, the resetwatch, and the borrowed i18n keys (cccWorkflow.versionetc.).
benjcooley
left a comment
There was a problem hiding this comment.
Re-review: a7378262 — still approved
The open model_viewed thread is addressed and resolved. The three new tests kill every mutation that survived last round. Each was re-applied on its own against WorkflowPage.vue:
| Mutation | Caught by |
|---|---|
drop !runnable gate |
"leaves a runnable page to the Playground" |
drop once: true |
"reports a non-runnable page once, even when access turns on late" |
drop workflowsEnabled |
"reports nothing while Workflows access is off" |
drop enabled / mounted |
caught (new and existing tests) |
WorkflowPage.test.ts passes, 26/26. mockReset and restoreMocks stop counts leaking between tests, and there are no timers, so I don't expect flakiness.
| Severity | Count |
|---|---|
| BLOCKER | 0 |
| SHOULD FIX | 0 |
| TRIVIAL | 3 |
TRIVIAL (non-blocking)
- Test title: "leaves a runnable page to the Playground" stubs the Playground. It proves
WorkflowPagesends nothing itself, which is what's needed, but the title reads like a no-double-count check. The Playground's single emission is pinned inWorkflowPlayground.test.ts; consider "does not report a runnable page itself". - Payload:
views()matches the event name only. Nothing asserts the payload (page_type,model_slug,workflow_id), whereasWorkflowPlayground.test.tsdoes. - Cosmetic:
flags()returnsworkflowsEnabled, which no caller uses. The older test still inlines themodel_viewedfilter; hoistingviews()to module scope would share it.
|
Moved to Comfy-Org/comfy-website#35, now that the website lives in comfy-website. It's the same change, on top of Ben's Comfy-Org/comfy-website#19. |
Stacked on #21204, so it merges after #21204. Replaces #21462. Brings the node graph workflow design from #21462 to real catalog workflows: a workflow whose Runnable switch is off now uses that layout instead of the single preview column. Runnable workflows are unchanged.
Summary
In
WorkflowPage.vue, the!runnablebranch rendersWorkflowNodeGraphTabsin place ofWorkflowPreview, the About section and the download-only API section. The header (WorkflowActions, as on runnable pages) and the catalog FAQ stay as they are.longDescription, with paragraphs after the first behind "Read more". "What you provide" lists the graph's loader nodes, images first. The footer has a "Runs in ComfyUI" note and a sticky Try in Cloud, in Run's place. With no Cloud link the footer shows Download instead, and says the workflow only runs in your own ComfyUI only whenworksOnCloudis false. Footer clicks fire the sametry_in_cloud_clickedandworkflow_download_clickedevents as the header, with aplacementproperty (header,footerorversions).examplesForModel) with the Example badge, plus the sample gallery.WorkflowGraphon the selected workflow file, with the version select and Download, falling back to the template preview image. The right column is the existingWorkflowFacts(model links, runs, downloads, Cloud row, author), plus a card listing the graph's custom node packs.tab_switched, and the API tab also sendsapi_viewed, as on runnable pages.WorkflowApi(download-only), now inside the tab.Where the data comes from:
nodeGraphWorkflowFromModelmapscatalogDetailsonto the layout. It falls back to the static summary.useNodeGraphNeedsreads them from the workflow file the graph loads. A skeleton shows while it loads.FILE_INPUTS, moved tolib/hub/file-inputs.tsso the island doesn't bundleworkflow-detail.ts's server data, plusLoadImageMask. Muted and bypassed nodes are skipped, and only subgraphs the graph instantiates are read.cnr_id. Display names come fromnode-pack-names.tswhere the repository's pack lists spell them, then theaux_idrepo name, then the id.Not in this PR: #21462's design preview route and sample. Once this lands they are no longer needed.
For the catalog side (@benjcooley): should the catalog store each workflow's inputs and custom node packs, so the page can render them in its first HTML instead of after reading the graph?
Verification
WorkflowNodeGraphTabs.test.tscovers the tabs, inputs read from the graph (images first, with the loading state), the footer for Cloud and local-only workflows, the custom node packs on Details, and the API slot.node-graph-inputs.test.ts,node-graph-workflow.test.ts(including the catalog mapping) and the updatedWorkflowPage.test.ts(the generated code is now behind the API tab) also pass.pnpm typecheck:website, eslint, oxlint, knip andpnpm --filter @comfyorg/website buildpass. The fallow audit's remaining complexity findings are inFacetSheet.vueandExamplesTab.vue, which this PR does not change. Copy is added in en and zh-CN./api/v1/catalog/itemsserving the seed'ssinging-characteras a native workflow document withrunnable: false, at 1440 and 390 wide.