Conversation
Every /workflows/[slug] page gets an #api section: the workflow's JSON graph lazy-fetched from the existing download endpoint, the canonical GET URL for scripting against it, copy/download buttons, and the cloud share deep link (utm_term=api). No new endpoints; English strings fall back for other locales until the translation pipeline fills them. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Adds the documented run-from-code path under the payload: comfy-sdk / @comfyorg/sdk install lines and the Python quickstart from docs.comfy.org/development/api-development/sdks, with the API-format export note and links to the SDK docs and API-key page. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
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: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
🚀 Preview deployed: https://workflow-templates-a8rpmycof-comfyui.vercel.app |
mobeenabdullah
left a comment
There was a problem hiding this comment.
LGTM, verified on the preview build. 30 API links render on desktop and mobile; hrefs are correct and locale-aware (/workflows/{slug}/#api, trailing slash preserved), the #api target exists on detail pages (id="api" + scroll-mt-8 from #1149) so no dead links, and the card root is a div so the inner anchors aren't nested. @click.stop isolates them from the card click. Layout is clean beside the reveal pill.
Only note is merge order: this is stacked on #1149, so #1149 lands first, then retarget this to main.
… CTAs The API section repeated two CTAs the hero already owns (Download JSON, Run on Comfy Cloud). Copy JSON is the only action the payload block adds, so the row is down to that one button and `template.api.runCloud` is gone. The SDK quickstart now speaks each workflow's own graph instead of `<output-node-id>` placeholders: real output node id and type, the prompt node plus the template's own example prompt, a LoadImage input line when the graph has one, and the workflow's title and filename. Graphs come from the repo's templates/ directory at build time (383 pages); the 256 hub-sourced pages have no graph in this repo, so the same pure builder runs in the browser against the payload the section already fetches. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…adata Review round on the API section. The interactive part of the section was a 101-line inline script, the largest in the repo and against the house rule that interactive UI below the fold is a Vue island. It is now ApiPayloadPanel.vue mounted with client:visible and a 400px rootMargin, which also replaces the hand-rolled IntersectionObserver and the data-* plumbing the script needed to read its own props. The copy label is reactive state with a reset timer, so a second click inside the 1200ms window no longer strands it on "Copied". Workflow metadata now stays data rather than code in the generated Python: titles, template names, node ids and node types are escaped as Python string literals (JSON string syntax is a valid subset) and generated comments are collapsed to a single line. Node extraction also checks the shape it is handed, since on hub-sourced pages it runs against a fetched payload rather than a graph from this repo. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The loader accepted any object with a `nodes` key, so a file shaped
`{"nodes": {}}` reached the snippet builder. Extraction already guards the
shape, but the loader should not hand that on as a graph in the first
place. `loadWorkflowGraph` now requires an array and takes its search
directories as an argument so the case is testable without touching cwd.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
A fetched node with no `id` passed the shape filter and reached the snippet as the literal `"undefined"`. Node selection now requires an id that can actually be addressed through the SDK, so a payload missing ids lands on the documented generic snippet instead. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…av/workflow-api-interlinks
Reading graphs from public/workflows/ made the Vercel adapter's file tracer treat them as a runtime dependency of the render function, since it cannot tell the read only happens while pages are prerendered. That took _render from 76MB to 631MB locally and to 1.68GB in CI, past the 250MB function limit, which failed the preview deploy on #1156. The loader now reads only from the repo's templates/ directory. It is the version-controlled source of truth, and it sits outside the site package, so the tracer leaves it alone. Snippet coverage is unchanged: 383 pages built from graphs, the rest filled in client-side. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
On hold along with #1149 (its base), pending Uy's version of this surface. Two notes for whoever picks this up:
|
Adds a quiet API link next to Try now on every workflow card, deep-linking to the #api section that #1149 adds to detail pages. Surfaces run-from-code before a card is even opened and gives crawlers an internal-link path from the hub to the API-intent sections.
nav/workflow-api-payload); merge that first, then retarget or merge this@click.stopkeeps the card click intact#apitargets already havescroll-mt; section renders on every detail page, so the link is never deadValidation: build clean, lint clean, 553/553 unit tests, SSR output on /workflows/ carries the anchors (
href="/workflows/{slug}/#api").🤖 Generated with Claude Code