Skip to content

feat(website): give CCC workflow pages their own structured data and meta - #21551

Closed
MaanilVerma wants to merge 12 commits into
maanil/ccc-workflow-ssr-bodyfrom
maanil/ccc-workflow-jsonld
Closed

MaanilVerma wants to merge 12 commits into
maanil/ccc-workflow-ssr-bodyfrom
maanil/ccc-workflow-jsonld

Conversation

@MaanilVerma

@MaanilVerma MaanilVerma commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

A Hub workflow page now has structured data and meta of its own, on the static pages and on the CMS pages. Before this PR, it used the model-page builders, so it described the workflow as a SoftwareApplication with a model title ("{name} API & Playground - Comfy") and a description of up to 170 characters. Now it has a SoftwareSourceCode node, workflow breadcrumbs in the page locale, a workflow title and a meta description of at most 160 characters.

This PR does not change the indexing gates. CCC workflow pages stay noindex until the cutover (SEO3). The JSON-LD has no author. The author will come from the creator stack (#21561, #21564, #21570) after both stacks land.

Changes

Head selection:

  • The new detailPageHead in lib/workshop/detail-head.ts returns the title, the meta description and the JSON-LD for a detail page. It uses the workflow builders when the model has a workflowId, and the model builders otherwise.
  • LegacyDetailPage.astro (the static pages) and catalogDetailHead in lib/cms/detail-page-server.ts (the CMS pages) both call detailPageHead. catalogDetailHead passes the page locale.

Structured data:

  • The new workflowPageJsonLd in utils/workflowJsonLd.ts gives a workflow page a SoftwareSourceCode main entity with name, URL, description, image, genre, runtimePlatform: ComfyUI and the Comfy publisher. The description gets the same cleanSummary as the meta description.
  • The breadcrumbs are Home, then Workflows (/hub/workflows/), then the workflow name. The Home and Workflows names come from translationsFor(locale).

Meta:

  • workflowTitle in lib/workshop/model-title.ts gives "{name} Workflow - Comfy" in the page locale and shortens the name at a word to keep the title at 60 characters or less.
  • shortenAtWord now removes a trailing high surrogate before the ellipsis, so a cut name never ends in half an emoji. modelTitle uses the same function and gets the same fix.
  • workflowMetaDescription in lib/workshop/model-meta-description.ts gives "{name}: {summary} A ComfyUI workflow on Comfy Hub." It drops the last sentence, or cuts only the summary at a word, to keep the text at 160 characters or less.
  • The new cutSummaryToFit holds the summary cut, and modelMetaDescription and workflowMetaDescription both use it. Thus the name always stays, and a summary with no spaces gets a hard cut.
  • New workshop.workflow.meta strings are in en, zh-CN and ja.

QA Focus

  • Run pnpm exec vitest run src/lib/workshop/model-meta-description.test.ts in apps/website. Expected: 26 tests pass. Author: tested at 0403110d8d, 26 pass. At the red commit 6fd154b280, zh-CN and ja gave Flux Kontext Product… and en gave Flux Kontext Product Relight…. Without the hub sentence, 3 failed | 23 passed.
  • Run pnpm exec vitest run src/lib/workshop/model-title.test.ts in apps/website. Expected: all tests pass, in en, ja and zh-CN. Author: tested at 0403110d8d. At 6fd154b280, the zh-CN emoji name ended in a lone surrogate. Without shortenAtWord in workflowTitle, 6 failed | 9 passed.
  • Run pnpm exec vitest run src/lib/workshop/detail-head.test.ts in apps/website. Expected: a static workflow page gets the workflow title, a SoftwareSourceCode node and the /hub/workflows/ crumb. Author: tested at 0403110d8d. If detailPageHead always takes the model branch, 1 failed | 1 passed.
  • Run pnpm exec vitest run src/routes/models/catalog-detail-ssr.test.ts --testTimeout=60000 in apps/website. Expected: all tests pass, with names the workflow breadcrumbs in the page locale among them. Author: tested at 891f5761f0, 227 pass. At 6fd154b280, the breadcrumb test gave ['Home', 'Workflows', ...] in place of the zh-CN names, and it passes at 0403110d8d. The full file was not run again after 0403110d8d.
  • Read the SSR test "gives %s valid JSON-LD". Expected: it runs the exported validateHtml() from scripts/validate-jsonld.ts on the head graph of each of the 30 seed workflows. Author: tested. validate-jsonld.ts reads only dist/*.html, and CMS pages render on request, so the test builds the graph with buildPageGraph the way BaseLayout.astro does.
  • Build the site and read the <title> of dist/hub/workflows/change-material/index.html. Expected: Change a material Workflow - Comfy. Author: not tested, because this round leaves the build to CI. Before the change, the built title was Change a material API &amp; Playground - Comfy.
  • Open a CCC workflow page of the preview and paste its JSON-LD into the Schema.org validator. Expected: no errors, and one SoftwareSourceCode node. Author: not tested, because the preview is noindex and BaseLayout emits no structured data on a noindex page.

Risky areas

  • WARNING: LegacyDetailPage.astro now uses detailPageHead, so the static /hub/workflows/* pages in production change. Their title changes from "{name} API & Playground - Comfy" to "{name} Workflow - Comfy", their meta description changes, and their JSON-LD changes from SoftwareApplication to SoftwareSourceCode. Search engines can show the new titles and descriptions after the next crawl.
  • detailPageHead is shared by the workflow and model pages on both the static and the CMS route. The branch is on model.workflowId. The model-page tests in src/routes and detail-head.test.ts pass.
  • shortenAtWord also serves modelTitle. The surrogate fix changes a model title only when its cut ends in half an emoji.
  • The workflow JSON-LD has no author. When the creator stack and this PR both land, a follow-up can add the author with creatorEntityId and hubCreatorPath from lib/hub/creator-path.ts.
  • modelJsonLd breadcrumbs still ignore the page locale (zh-CN, ja). That builder is outside this PR.

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. test(website): check the long description, FAQ and models in workflow server HTML #21550 test(website): check the long description, FAQ and models in workflow server HTML (open, targets feat(website): Comfy Content Catalog Hub CMS (supersedes #20640, #20933) #21204)
  4. feat(website): give CCC workflow pages their own structured data and meta #21551 feat(website): give CCC workflow pages their own structured data and meta (open, targets test(website): check the long description, FAQ and models in workflow server HTML #21550) (this PR)

Merge #21204 and #21550 before this PR. The creator stack (#21561, #21564, #21570) is a separate chain on #21204. The JSON-LD author follows after both chains merge.

…meta

A CCC workflow page now describes its workflow as a SoftwareSourceCode node.
When the record has a verified creator username, the node links its author to
a Person node at /hub/creators/<username>/. The breadcrumbs go through the
Workflows list. The title uses a workflow form, so it does not match a model
page with the same name. The meta description is at most 160 characters.
@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 7310c18316ee9fe53b56baed4b8766b5121ff29a

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-21551.vercel.app

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

Deployment details

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

Last updated: 2026-10-21T20:10:34Z for 0cba2ff

@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: a7581d37-2c08-4455-a3be-55359c9b5478

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.

…Hub handle

A workflow whose author has no name now gets no author node, so the JSON-LD
does not name a Person "Author unavailable". The username check now uses the
Hub handle rule from cloud: letters, digits and inner hyphens.
MaanilVerma added a commit that referenced this pull request Oct 21, 2026
authorDetails() now keeps the author username only when the matching author record also has a name, the same rule as #21551. A record with a matching uid but no name shows Author unavailable as plain text, not as a link. New tests cover a missing and a blank name, the schema rejecting ../x, and the unlinked author rendering as a span.
@datadog-official

This comment has been minimized.

@MaanilVerma
MaanilVerma marked this pull request as ready for review October 22, 2026 02:36
@MaanilVerma
MaanilVerma requested review from a team and dante01yoon as code owners October 22, 2026 02:36
@MaanilVerma
MaanilVerma removed the request for review from a team October 22, 2026 02:36
@MaanilVerma
MaanilVerma requested review from benjcooley and removed request for a team and dante01yoon 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: CCC workflow JSON-LD and meta

This PR moves the CCC (CMS) workflow head off the model builders and onto workflow-specific JSON-LD, title and meta. The approach is sound. The workflowId check is safe: the schema types it as never on model records. The locale keys exist under workshop.workflow.meta in en, ja and zh-CN. Both length caps hold on every input tried, and the author gate (uid match plus non-blank name) works.

Two behaviour problems need fixing before cutover.

Severity Count
BLOCKER 0
SHOULD FIX 3
TRIVIAL 3

SHOULD FIX

  1. The ja/zh-CN meta description collapses to the workflow name. cutAtWord(lead, 160) cuts at the last ASCII space. In a CJK lead, that space is inside the name. For example, a 170-character zh-CN lead becomes Flux Kontext Product…. Cut only the summary, the way modelMetaDescription does.
  2. Only the CMS path gets the new head. In prod, and in any build with the CMS off, LegacyDetailPage still renders a model title and a SoftwareApplication node for the same /hub/workflows/* URLs.
  3. This duplicates #21570 and #21564. It adds the same authorUsername field and helper in the same files, and a hardcoded creator path that is not locale-prefixed. Rebase onto #21570 and use creatorEntityId / hubCreatorPath.

TRIVIAL: The breadcrumb labels are always English. workflowTitle has no tests, and it can split a surrogate pair. The {1,28} regex needs a named constant, and the PR body cites the wrong source for the 30-character cap.

Tests: every new meta and JSON-LD test runs in en only. Mutation testing found that these changes still pass the suite:

  • dropping the title shortening
  • dropping the "A ComfyUI workflow on Comfy Hub." sentence
  • loosening either part of the username regex

A zh-CN or ja case would have caught item 1.

What was run: a static review of a PR-head snapshot, plus vitest in a throwaway copy. All 35 new SSR tests and the new presentation tests pass. In that patched copy, 32 existing SEO-audit tests in catalog-detail-ssr.test.ts failed. I didn't run them against the base, so please confirm they pass in CI.

)
return (
[full, lead].find((text) => text.length <= WORKFLOW_DESCRIPTION_MAX) ??
cutAtWord(lead, WORKFLOW_DESCRIPTION_MAX)

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.

SHOULD FIX — when the lead overflows, this cuts the whole lead at the last ASCII space. ja/zh-CN leads use a full-width : and CJK summaries have no spaces, so the last space is inside the workflow name and the summary is dropped entirely.

Repro (zh-CN): name Flux Kontext Product Relight, summary ~140 CJK chars → lead is 170 chars → result is Flux Kontext Product…. In en, a summary with no spaces gives Name… the same way.

modelMetaDescription avoids this by cutting only the summary (lead(cutAtWord(summary, summary.length - overflow))), which hard-cuts when there's no space and keeps the name. Do the same here. Also add a ja/zh-CN case: every test in this PR runs only in en.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, in 0403110d8d. workflowMetaDescription now cuts only the summary. I moved the summary cut out of modelMetaDescription into cutSummaryToFit(), and both functions use it, so the name stays and a summary with no spaces gets a hard cut.

The red commit 6fd154b280 adds keeps the name and cuts only a summary without spaces in $locale for zh-CN, ja and en. Against the old code, zh-CN and ja gave Flux Kontext Product… and en gave Flux Kontext Product Relight…. All three pass at 0403110d8d.

Receipt: pnpm exec vitest run src/lib/workshop/model-meta-description.test.ts -> 26 passed.

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.

SHOULD FIX, partly fixed. Cutting only the summary fixes the case I reported. But cutAtWord(summary, …) still breaks at the last ASCII space, so a CJK summary that contains an English word still collapses. That's common in zh/ja copy ("使用 ComfyUI …", "Flux …").

Repro (zh-CN, name Flux Kontext Product Relight, summary 'ComfyUI ' + '把产品照片放进摄影棚场景'.repeat(12)): the result is Flux Kontext Product Relight:ComfyUI…, 37 characters, and about 120 characters of summary are dropped. 使用 ComfyUI 把产品… gives …:使用 ComfyUI….

The new regex test doesn't catch this: .* only proves that the first 10 characters survive. Fix: use the space only when it falls past ~60% of the cut, otherwise hard-cut. Add the case above as a test. Leaving this open.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in comfy-website#26 (this PR moved there): 059e7c0008. cutAtWord now breaks at the last space only when that space is past 60% of the cut. Otherwise it hard-cuts.

Your two repros are a test table in 1056e9020e. The test asserts that the zh-CN description keeps ComfyUI plus 8 repeats of the CJK phrase, at 160 characters or less. Before the fix, both rows did not pass: Flux Kontext Product Relight:ComfyUI… and …:使用 ComfyUI…. After the fix, vitest run src/lib/workshop/ gives 826 passed, so the English word cuts in modelMetaDescription did not change.

@codecov

codecov Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.96970% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...website/src/lib/workshop/model-meta-description.ts 93.33% 0 Missing and 1 partial ⚠️
@@                       Coverage Diff                       @@
##             maanil/ccc-workflow-ssr-body   #21551   +/-   ##
===============================================================
  Coverage                                ?   86.34%           
===============================================================
  Files                                   ?     3925           
  Lines                                   ?   181413           
  Branches                                ?    49720           
===============================================================
  Hits                                    ?   156647           
  Misses                                  ?    22216           
  Partials                                ?     2550           
Flag Coverage Δ
website-unit 80.76% <96.96%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
apps/website/src/lib/cms/detail-page-server.ts 85.18% <100.00%> (ø)
apps/website/src/lib/workshop/detail-head.ts 100.00% <100.00%> (ø)
apps/website/src/lib/workshop/model-title.ts 100.00% <100.00%> (ø)
apps/website/src/utils/workflowJsonLd.ts 100.00% <100.00%> (ø)
...website/src/lib/workshop/model-meta-description.ts 98.07% <93.33%> (ø)
🚀 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.

…ow head

Cut only the summary in the workflow meta description, keep emoji whole in a shortened title, localize the breadcrumbs, and pick the workflow or model head in one helper that LegacyDetailPage and catalogDetailHead share.
@MaanilVerma

Copy link
Copy Markdown
Collaborator Author

I removed the author username code from this PR in 891f5761f0. Ben asked for this on #21570: #21570 (review)

Removed:

  • the catalogDetails.authorUsername schema field and validCreatorUsername (workflow-catalog-details.ts)
  • the authorUsername() helper in catalog-presentation.ts, and its tests
  • the hand-built /hub/creators/ URL, the Person node and the author reference in workflowJsonLd.ts

Why: #21570 adds the same field with a different validator in the same lines. If the two rules drift, the schema refine rejects the whole catalogDetails and the page returns 503. Now lib/hub/creator-path.ts on the creator stack (#21561, #21564, #21570) is the only owner of username validation, the creator link and the creator URL. The JSON-LD author can come back on top of both stacks through creatorEntityId and hubCreatorPath. A name alone is not enough, because catalogDetails.author can be the "Author unavailable" fallback.

The rest of the workflow JSON-LD does not change: SoftwareSourceCode, the publisher, the workflows breadcrumb, the title and the meta description. 0403110d8d also fixes Ben's other threads on this PR:

  • the CJK meta description cut
  • one head helper for the legacy and CMS paths
  • localized breadcrumbs
  • the title surrogate guard and its tests

@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: commits 891f5761f0, 6fd154b280 and 0403110d8d

15fd2d100f is a base merge. It doesn't touch any files in this PR, so I didn't review it.

Five of the six threads are fixed and resolved:

  • detailPageHead now builds the workflow head on both the static and the CMS paths.
  • The duplicated creator logic is removed cleanly.
  • Workflow breadcrumbs are localized.
  • shortenAtWord no longer splits a surrogate pair.
  • The {1,28} regex is gone.

The new tests do catch the original bugs.

Severity Count
BLOCKER 0
SHOULD FIX 2
TRIVIAL 4

SHOULD FIX

  1. A CJK summary that contains an English word still collapses. This is the open thread on model-meta-description.ts. cutAtWord(summary, …) still breaks at the last ASCII space. For example, 'ComfyUI ' + '把产品照片放进摄影棚场景'.repeat(12) in zh-CN gives Flux Kontext Product Relight:ComfyUI…, which is 37 characters.
  2. The PR description is out of date. It still describes the Person author node, authorUsername/validCreatorUsername, the 30-character rule and the "fixed creator path" risk, and none of that is in the diff now. It doesn't mention that static (prod) /hub/workflows/* pages now get the workflow title, description and JSON-LD. Those pages stay noindex for now. Also, no PR in the stack adds the JSON-LD author any more: #21570 adds only the visible link. Either track that as a follow-up or add it in whichever PR lands last.

TRIVIAL

  • No test covers LegacyDetailPage itself. Replacing its detailPageHead call with literals still passes every test.
  • detail-head.test.ts checks only one static workflow page. A table test over all of them would be cheap.
  • The emoji title test exercises the surrogate guard only in zh-CN.
  • The "Comfy Hub sentence" test uses toContain, so a wrong separator in ja/zh-CN would pass.

modelPageJsonLd still has English breadcrumbs. That predates this PR and you scoped it out, so I'm noting it only.

Testing: run in a scratch copy with dependency stubs.

  • The workshop, cms and catalog-detail-ssr suites pass: 1459 tests.
  • catalog-detail-ssr.test.ts passes on the base (193/193) and on the head (228/228).
  • The 33 SEO-audit failures I flagged in round 1 were caused by my environment (a missing dependency made the async component fail silently), not by this PR.
  • About 1,100 fuzz cases stay within 160/170/60 characters, with no lone surrogates.
  • I did not run tsc, lint, e2e or the Astro build.

@MaanilVerma

Copy link
Copy Markdown
Collaborator Author

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

@MaanilVerma

Copy link
Copy Markdown
Collaborator Author

Closing: the website moved; this change lives in Comfy-Org/comfy-website#26.

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