Repository navigation
feat(website): link CCC workflow authors to their creator page - #21570
MaanilVerma wants to merge 14 commits into
Conversation
The workflow detail page now links the author name to /hub/creators/<username>/ when the catalog author record matches the workflow's author_uid. The link uses the catalog locale prefix. An author with no username, or a record for another account, stays plain text.
|
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 c9b171c35a58c98cbf8095d79f3a039d15db6bee
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-21570.vercel.app Models is built and gated by PostHog (workshop-enabled), using staging Cloud. Deployment detailsThis commit: https://website-frontend-9n4qfd5vr-comfyui.vercel.app Last updated: 2026-10-21T20:17:59Z for |
WorkflowFacts.vue runs in the browser, so it now imports hubCreatorPath() from lib/hub/creator-path.ts. The website build rejected the old import, because it pulled server catalog data into the WorkflowPage bundle. The author username is now kept only when isCreatorUsername() accepts it, so a value such as ../admin never becomes a link.
isCreatorUsername() now uses the cloud handle pattern, which needs at least 3 characters, and keeps the catalog limit of 30. A 2-character value such as ab is no longer a creator username.
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.
This comment has been minimized.
This comment has been minimized.
benjcooley
left a comment
There was a problem hiding this comment.
Review: no blockers. The data flow is sound. The username is only emitted when website_author.uid matches author_uid and the name is non-blank, so no other account's username can leak. hubCreatorPath lowercases and adds the locale prefix, and these match the injected /[locale]/hub/creators/[username] routes and the lowercase 301. The regex is identical to cloud's usernameRegex. Nothing here ships to Vercel production while cmsEnabled() is off there.
| Severity | Count |
|---|---|
| BLOCKER | 0 |
| SHOULD FIX | 3 |
| TRIVIAL | 1 |
SHOULD FIX
- Staff DRAFT preview: the author link 404s for a creator with no Live workflow yet (inline,
catalog-presentation.ts:120). - The link has no style until hover and no focus style, unlike the model links in the same panel (inline,
WorkflowAuthor.vue:14). - #21551 collision. #21551 adds the same
catalogDetails.authorUsernamewith a different validator (validCreatorUsername) and an identicalauthorUsername()helper in the same lines. It also builds its creator URL by hand instead of throughhubCreatorPath/creatorEntityId. You already flagged this. Please make this PR (oncreator-path.ts) the single owner and rebase #21551 onto it, so there aren't two validators. If the two rules drift, the schemarefinefails the wholecatalogDetails(page → 503), not just the link.
TRIVIAL
{1,40}inisCreatorUsernamenever applies because of the 30 cap; add a comment (inline).
Questions
- Does the public detail read (
items?workflow_slug=) apply the same Live/public/hub-surface gate as the creator reads in cloud #14830? If not, a Live workflow that isn't onhublinks to a 404. - Cloud gates creators on
credited_author_uid, while the site matches onauthor_uid. Are those always the same value?
Not run locally: the tests, typecheck, and the page in a browser. I reviewed by reading the code at 385e3c2 against #21564 and cloud #14830.
| : undefined | ||
| return { | ||
| author: name ?? unavailable, | ||
| ...(name ? authorUsername(resolved.username) : {}), |
There was a problem hiding this comment.
SHOULD FIX — In staff DRAFT preview this links to a 404. The creator page reads /api/v1/catalog/creators/{username} without a session (catalog-creators.ts:140). Cloud #14830 returns 404 unless the creator has at least one Live, public, hub workflow. So previewing a new creator's first draft shows an author link that is dead. preview is already in scope at the call site (workflowDetails, line 353), so gate on it:
...(name && !preview ? authorUsername(resolved.username) : {}),For that, pass preview into authorDetails. Smaller point: the author_uid match check only applies here because name is undefined when the uid doesn't match. Pass matches explicitly, like authorAvatar, so a later name fallback can't leak another account's username.
There was a problem hiding this comment.
Still open. The only new commit, 579feb7, is a merge of maanil/ccc-creator-profile, and this line is unchanged.
There was a problem hiding this comment.
Fixed, in 4607da87c8. authorDetails now gets preview from workflowDetails, and authorUsername(linked, value) takes an explicit flag: matches && !!name && !preview. Thus the author_uid match is a direct input, as in authorAvatar, and a later name fallback cannot leak another account's username.
Red test in 22ac6fef89: links no author creator page in a staff DRAFT preview. Before the fix it gave expected { …(16) } to not have property "catalogDetails.authorUsername". It passes after 4607da87c8, and the same test still expects the link outside preview. One older test called catalogPresentation(authored, 'en', true) and expected authorUsername in DRAFT preview. I removed that one expectation, because it asserted the defect.
There was a problem hiding this comment.
DRAFT is fixed in 4607da8, with a good positive/negative test, and matches is now explicit. Thanks. One staff path is still open: a LIVE preview with a now override. catalog-preview.ts persists {view: "LIVE", now}, and catalog.ts:105 / catalog-list.ts:177 compute preview as view === "DRAFT", so it is false there and the link is emitted. A workflow that is Live only as of a future now can belong to a creator with no Live workflow today, so the sessionless creator read still 404s. Since preview also drives translation and model-link behaviour, a separate "public read" flag (e.g. !session at the two call sites) is cleaner than widening preview. Leaving this open.
There was a problem hiding this comment.
Fixed in comfy-website#29 (this PR moved there): 06a53fa8ca. catalogPresentation has a separate publicRead flag, and only that flag controls the author link. catalog.ts and catalog-list.ts pass !session. preview did not change, so translation and model links work as before. When a caller gives no flag, publicRead is !preview.
The red test is in c81aac0180, in catalog.test.ts. It loads one workflow through loadSiteCatalog with no session and with a { view: 'LIVE', now } session. Before the fix, the staff read had authorUsername. After the fix, vitest run src/lib/cms/ plus the two workshop component tests gives 468 passed.
| <component | ||
| :is="href ? 'a' : 'span'" | ||
| :href | ||
| :class="cn('flex items-center gap-2', href && 'hover:underline')" |
There was a problem hiding this comment.
SHOULD FIX — Nothing marks this as a link until you hover, and keyboard focus has no style. The model links in the same panel (WorkflowModelLinks.vue:36) are underlined at rest and have a focus-visible outline. Touch and keyboard users can't tell the author is clickable. Match the model links, for example:
| :class="cn('flex items-center gap-2', href && 'hover:underline')" | |
| :class="cn('flex items-center gap-2', href && 'underline underline-offset-4 hover:text-primary-comfy-yellow focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-primary-comfy-yellow')" |
There was a problem hiding this comment.
Still open. The only new commit, 579feb7, is a merge of maanil/ccc-creator-profile, and this line is unchanged.
There was a problem hiding this comment.
Fixed, in fea222cc00, with your suggestion as written: underline underline-offset-4 hover:text-primary-comfy-yellow and the same focus-visible outline as WorkflowModelLinks.vue. I added no test, because the repo does not test utility classes.
There was a problem hiding this comment.
Classes now match the model links, and the underline renders. But the focus ring is clipped. The author sits in <dd class="min-w-0 truncate"> (overflow: hidden), and the flex root fills the dd, so a ring at outline-offset-4 falls entirely outside the clip box. I checked this in headless Chrome with an equivalent DOM: no ring at all. The model links avoid this because the <a> is itself the truncate element. Suggested one-line fix is inline on WorkflowAuthor.vue:18. Leaving this open.
There was a problem hiding this comment.
Fixed in comfy-website#29 (this PR moved there): a70e87f705, with your suggestion from the line 18 thread. The probe and the test result are in that thread.
benjcooley
left a comment
There was a problem hiding this comment.
Re-review at 579feb7: nothing addressed yet, and still no blockers.
The only commit since my last review is 579feb7, a merge of maanil/ccc-creator-profile pushed 7 seconds after the review. The PR's own diff (+109/-5, 9 files) is byte-identical to 385e3c2. The merge's changes under apps/website are admin queue savedAt sorting and a markdown-twins section removal. They don't touch creator-path.ts, catalog-presentation.ts, catalog-creators.ts, WorkflowAuthor/WorkflowFacts, or the route injection, so the earlier findings stand unchanged.
| Severity | Open | Fixed |
|---|---|---|
| BLOCKER | 0 | 0 |
| SHOULD FIX | 3 | 0 |
| TRIVIAL | 1 | 0 |
Still open:
- DRAFT preview author link 404s (
catalog-presentation.ts:120). - Link has no style at rest and no focus style (
WorkflowAuthor.vue:14). {1,40}is dead behind the 30-character cap (creator-path.ts:14).- #21551 collision: as of 663f499, #21551 still adds its own
validCreatorUsername,authorUsername()helper and schema line, and still hard-codes/hub/creators/. One of the two PRs needs to drop its copy before both land.
The two open questions from the last review are also unanswered: the detail read vs. the creator read gate, and credited_author_uid vs. author_uid.
Not run: tests, typecheck, browser. Verified by comparing the net PR diff before and after the merge and checking the merged files against the PR's dependencies.
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## maanil/ccc-creator-profile #21570 +/- ##
=============================================================
Coverage ? 85.21%
=============================================================
Files ? 3992
Lines ? 186418
Branches ? 47609
=============================================================
Hits ? 158856
Misses ? 25195
Partials ? 2367
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
… r2/ccc-author-links
…username length rule
|
Replies to the review body. The inline threads have the three fixes ( #21551 collision (SHOULD FIX 3): #21551 drops its copy. It keeps no second validator and no hand-built creator URL, so Q1, same gate on the public detail read: Yes. I read cloud #14830 at Q2, Not tested: Q1 and Q2 come from reading the cloud code, not from a run. |
… r2/ccc-author-links
benjcooley
left a comment
There was a problem hiding this comment.
Re-review at 09d96e6 (fix commits 22ac6fe, 4607da8, fea222c): good progress, two partial fixes, no blockers.
| Prior finding | Status |
|---|---|
| DRAFT preview author link 404s | Partly fixed. DRAFT is covered and tested; LIVE + now override still links to a 404 (thread reply) |
| Link affordance / focus style | Partly fixed. Underline and hover now match the model links; the focus ring is clipped by the truncate dd (inline suggestion) |
Dead {1,40} / length rule |
Fixed. Regex is built from CREATOR_USERNAME_MAX, same 3–30 behaviour; thread resolved |
| #21551 duplicate field/validator | Fixed. #21551 (15fd2d1) no longer adds authorUsername / validCreatorUsername |
| Severity | Open |
|---|---|
| BLOCKER | 0 |
| SHOULD FIX | 2 |
| TRIVIAL | 1 |
Verified along the way:
- The
authorUsernameassertion removed atcatalog-presentation.test.ts:~596was in apreview=truetest, so dropping it is correct, not a weakened test. - The base merges (bef6816, 09d96e6) don't change anything the author link depends on.
TRIVIAL: in catalog-presentation.ts:120, matches && is redundant because name is only set when matches is true. It's harmless and reads clearly, so keep it if you prefer.
Tested: creator-path.test.ts 16/16 pass (from a throwaway archive of the head). Focus clipping reproduced in headless Chrome with equivalent markup and CSS. Not run: catalog-presentation.test.ts (local deps missing), typecheck, the real page.
| cn( | ||
| 'flex items-center gap-2', | ||
| href && | ||
| 'underline underline-offset-4 hover:text-primary-comfy-yellow focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-primary-comfy-yellow' |
There was a problem hiding this comment.
SHOULD FIX: the parent <dd class="truncate"> clips this ring entirely: it is drawn 4px outside a box that fills the dd. An inset offset keeps it visible (checked in headless Chrome):
| 'underline underline-offset-4 hover:text-primary-comfy-yellow focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-primary-comfy-yellow' | |
| 'underline underline-offset-4 hover:text-primary-comfy-yellow focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-primary-comfy-yellow' |
Alternative: drop truncate from the author dd in WorkflowFacts.vue and add min-w-0 here, since the inner <span class="truncate"> already ellipsizes.
There was a problem hiding this comment.
Fixed in comfy-website#29 (this PR moved there): a70e87f705. I applied your suggestion as written: focus-visible:-outline-offset-2. CatalogAdminShell.vue already uses the same class.
I did the same probe in headless Chrome, with an overflow: hidden dd and a focused flex link. At outline-offset: 4px the screenshot has 0 ring pixels. At -2px it has 880. WorkflowPreview.test.ts passes (18 passed). I did not add a unit test, because happy-dom does no layout.
|
Moved to Comfy-Org/comfy-website#29 (the website now lives there). This PR stays open for its review history. |
|
Closing: the website moved; this change lives in Comfy-Org/comfy-website#29. |
Summary
On a CCC workflow detail page, the author name now links to the author's creator page at
/hub/creators/<username>/. The link shows only when the catalog author record matches the workflow'sauthor_uidand carries a username.Changes
authorDetails()inlib/cms/catalog-presentation.tsnow copieswebsite_author.usernametocatalogDetails.authorUsernamewhen the record matchesauthor_uid, has a name, andisCreatorUsername()accepts the value. A record with no name shows "Author unavailable" as plain text, and a value such as../adminis dropped.isCreatorUsername()inlib/hub/creator-path.tsaccepts 3 to 30 characters with the cloud handle pattern^[a-z0-9][a-z0-9-]{1,40}[a-z0-9]$(case-insensitive). feat(website): give CCC workflow pages their own structured data and meta #21551 is being aligned to this shared rule.workflowCatalogDetailsSchemainconfig/workflow-catalog-details.tsaccepts the optionalauthorUsernameonly whenisCreatorUsername()accepts it.WorkflowFacts.vuepasseshubCreatorPath(authorUsername, locale)toWorkflowAuthor.vue, so azh-CNpage links to/zh-CN/hub/creators/<username>/.WorkflowAuthor.vuerenders a link when it gets anhrefand the same plain text as before when it does not.hubCreatorPath()inlib/hub/creator-path.ts(added in feat(website): add the Hub creators directory from the catalog #21561). That module has no server data, so theWorkflowPageclient bundle stays within the client boundary check. I did not usehubCreatorUrlinlib/hub/routes.ts, because on this branch it still points atcomfy.org/workflows, and R2 changes it onmain.WorkshopModelCard.vue) show no author name today, and the whole card is one link. Thus this PR adds no author link to cards.QA Focus
pnpm exec vitest run src/components/workshop/WorkflowPreview.test.ts src/lib/cms/catalog-presentation.test.ts src/components/workshop/WorkflowPage.test.tsinapps/website. Expected: all pass. Author: tested, 114 pass withworkflow-catalog-details.test.ts,creator-path.test.tsandcatalog-creators.test.ts. Before each fix, its tests did not pass: the locale links, the no-name and blank-name rows, and theabrow. The schema../xrow and the unlinked-authorSPANcheck pass now and do not pass when I remove therefineor always render ana.pnpm typecheck:website,pnpm knipand eslint on the changed files. Expected: no errors. Author: tested, 0 errors.WorkflowPreviewtests assert thehrefforenandzh-CN.Risky areas
catalogDetails.authorUsernamefield, with a stricter username check, incatalog-presentation.tsandworkflow-catalog-details.ts. Whichever PR merges second must keep one field definition. Both PRs gate the field on a present author name. The shared username rule isisCreatorUsername()(3 to 30 characters), and feat(website): give CCC workflow pages their own structured data and meta #21551 is being aligned to it, so keep one definition.WorkflowAuthor.vuerenders on every CCC workflow detail page. Its root is now anaor aspanwith the same classes, so the author cell looks the same without a username.PR dependency map
main(base)main)Contract provider: cloud #14830 (draft) serves the creator pages that these links open. #21551 adds the same author field and the matching creator
@id. Merge #21204, #21561 and #21564 before this PR.