Repository navigation
feat(website): add a WORKSHOP entry to the site header nav - #16975
MaanilVerma wants to merge 255 commits into
Conversation
The coverage test asserts every page under src/pages appears in llms.txt, and /workshop does not, because it is behind a launch flag and carries noindex on every route. Adding it to EXCLUDED_PAGES would have worked and left a trap: the entry would have to be removed by hand at launch, in a different file from the flag that lifts noindex, or llms.txt would silently keep omitting a page that is now public. A page kept out of search indexes has no business in llms.txt either, so the test now derives that half of its exclusions from isNoindexPathname. Lifting noindex at launch makes this test start requiring the page in the same change.
Everything on Workshop is a Router partner model, and the snippet builder said so three times: the TypeScript one imports @comfyorg/sdk, the Python one imports comfy_sdk, and the HTTP one hardcodes the Router URL. Cloud workflows and deployed endpoints are next, and none of those three carry over. A workflow has no comfy.models.run equivalent at all. This puts one interface in front of that. A model resolves to a run target, and the target owns both which snippet languages it can offer and how to build them. The page and the form keep dealing only in fields and values, so neither learns which backend it is describing. Router is still the only implementation and its snippets are byte for byte what they were, which a test asserts directly against the builder. The model record gains an optional runTarget that the current generator does not emit, so the committed catalog is unchanged and every entry resolves to Router by absence rather than by a regenerated field.
WorkshopForm.vue had no test at all, which put the model-page diff under the website's 80% patch-coverage gate. The behaviour worth pinning is the seeding branch. The form is handed an empty value bag when a page first renders, and has to turn that into the model's schema defaults; re-render it after an edit and it must leave the visitor's values alone. Getting that backwards either sends a request with no aspect ratio or throws away what someone typed, and neither shows up as a type error.
One committed blob of 31,674 lines was the wrong shape and got worse with every field: adding the generated form fields would have taken the same file past 51,000. A one-model change produced an unreviewable diff, and the shape was written down twice, once as hand-rolled decoders in the generator and once as interfaces the site read. The catalog is now an Astro content collection: one file per model under src/content/workshop-models, a Zod schema in content.config.ts, and a small manifest holding the source ref. The largest model file is 8 KB, so a model change is a diff on that model. The schema is the only description of the shape. The generator validates against it and the site reads through it, so decodeModel and decodeRole are gone along with the parallel interface, and the generator is 134 lines of parse, project and write. Making Zod the boundary immediately found something the old decoder was hiding. decodeRole rebuilt each role from known fields, silently dropping `extras`, which six Luma roles use to describe base64 input as an alternative to a URL. Nothing renders it yet, but it is real API surface and it is now carried rather than lost a second time. Those six models are the only semantic change in the regenerated catalog; the other 262 are identical. Verified by running the generator against the partner client rather than hand-editing the data.
…o ben/workshop-browse
The catalog moved to a content collection, so the browse page no longer imports a committed blob. It reads the collection at build time and hands the island card-sized records. That also fixes what the previous shape leaked. Each entry carries the model's full input schema under `parameters`, which is the bulk of the record and which a card has no use for. Importing the catalog into a module the island bundled meant shipping all of it to the browser. `toBrowseModel` is now an explicit projection, and a test asserts the projection has no `parameters` key so a future field cannot quietly ride along. The catalog-integrity test reads the collection from disk and parses each file through the schema, so it still fails on a missing or duplicated model and now also fails on one that does not match the schema.
…them
Persisting the derived fields duplicated what `parameters` and `roles`
already say and took the catalog from 31,674 lines to over 51,000. With
the collection in place they are derived from an entry instead, so the
generator writes only what the Router client gives it and the field
policy lives in code where it can be read and tested.
Two conversions were also wrong, and both narrowed what the Router
actually accepts.
A schema shaped `anyOf: [{enum: [...]}, {type: 'string'}]` means "one of
these, or anything". Collecting the enum and ignoring the open variant
turned four fields into closed selects: `voice` on ElevenLabs and Fish
Audio, and `avatar_id` on HeyGen. Those list stock options but also take
an id you cloned yourself, so a closed select made your own voice
unreachable. They are now text fields carrying the listed values as
suggestions.
A float with no `multipleOf` accepts any precision. Defaulting to a step
of 0.01 made 73 fields reject values the provider allows, so the step is
now only set when the schema sets it.
Both are covered directly, and a catalog-wide test asserts no field ends
up with a 0.01 step its schema did not ask for.
…ben/workshop-model-form
The detail page read a single generated JSON blob and a `fields` array baked into it. Both are gone: it now reads the per-model content collection, and derives the form fields at build time from the schema the provider actually publishes. Two field unions had grown in parallel, one per module. They are now one, kept next to the code that derives it, so the page picks up both of the fixes that union carries: values a model merely suggests render as a typable field with completions rather than a closed dropdown, and number fields no longer get a step the provider never asked for. Related models are passed in from the page instead of being read from a module-level array, which is what let the module stop importing the blob.
…n/workshop-model-page
Keeps this branch's run target, and takes the collapsed field union from the parent: the two definitions had drifted, and the parent's is the one carrying the suggestion and step fixes. The catalog-wide target test is now driven by the declared target ids instead of by every model in the snapshot. It was only ever exercising the default path 268 times, and adding an id without an implementation now fails to compile rather than depending on a model electing to use it.
Six hand-picked models, one per output type, linking into Workshop. The section only renders once /workshop is indexable. The homepage is the most linked page on the site and Workshop is still unlisted, so today this builds to nothing; removing the entry in config/indexing.ts turns on the sitemap, llms.txt and this section together rather than one at a time. The featured list is editorial and explicit, not a ranking, so a catalog regeneration cannot quietly change what the homepage leads with. A model the catalog no longer has is skipped instead of throwing, and a test fails when the list names one, so a retired partner model cannot break the build. No client directive, so it renders to HTML and adds no JavaScript: the homepage hydrates the same eight islands as before.
Covers the paths this branch introduced: a field with suggested values renders a typable input with completions rather than a closed list, a plain text field gets no list at all, and an unconstrained step reaches the input as `any`. Writing them turned up that `list` makes the input a combobox rather than a textbox to assistive tech, which is the correct announcement for "type one or pick one" and is now asserted rather than assumed. Also covers clearing a number field and reselecting the placeholder on a select, both of which return undefined and neither of which was exercised.
…n/workshop-model-page
…n/workshop-run-target
# Conflicts: # apps/website/src/config/llms-txt.test.ts
# Conflicts: # apps/website/src/config/routes.ts # apps/website/src/data/mainNavigation.test.ts
benjcooley
left a comment
There was a problem hiding this comment.
Re-review (round 2)
| Severity | Count |
|---|---|
| BLOCKER | 2 |
| SHOULD FIX | 1 |
| TRIVIAL | 2 |
What got fixed
The original blocker is genuinely resolved. BaseLayout.astro evaluates isWorkshopInBuild() at build time and threads it through HeaderMain → both responsive headers, and getMainNavigation only emits the entry when it is true. Production and preview get neither the route nor the link. The two trivial notes (route comment, tautological assertion) are also fixed. Three threads resolved.
I also want to correct something before it spreads: I initially suspected the regenerated baselines would break CI on main. They will not. Neither ci-website-e2e.yaml nor pr-update-website-screenshots.yaml sets VERCEL_ENV or WORKSHOP_IN_BUILD, so isWorkshopInBuild() returns true in both, and the e2e run and the baselines agree. CI stays green.
BLOCKER 1 — the merge deleted apps/website/src/config/routes.test.ts
Merge commit 1f4b0577d2 ("Merge branch 'ben/workshop-homepage' into maanil/workshop-nav") removes the file relative to both of its parents. It is present at 0caf69446a and present on ben/workshop-homepage; it exists on neither side as a deletion. This is a botched conflict resolution, not an intentional change, and nothing in the PR description mentions it.
What went with it:
- the entire
localizeHrefsuite — prefixing for non-default locales, default locale left alone, external URLs passed through, locale-invariant routes never prefixed, and the Japanese-homepage-only rule getRoutes modelsgetRoutes minimaxLicenseProfessionalRequest(both locales)
localizeHref is the function every route on the site flows through, and it now has zero test coverage on this branch — I grepped, nothing else touches it. Please restore the file. The workshop-specific route assertions this PR originally added there are covered by mainNavigation.test.ts, so those do not need to come back, but everything else does.
BLOCKER 2 — a build flag now restructures the global header
showWorkshop no longer just adds a nav item. It moves the desktop/mobile breakpoint from lg to xl for the nav, the mobile sheet and the CTA cluster, and pushes the logo wordmark from xl:w-36 to 2xl:w-36. Flipping one flag changes the header on every page of the site.
On launch day (WORKSHOP_IN_BUILD=1 in the Vercel production environment) every visitor gets:
- 1024–1279px: no desktop nav, and no DESKTOP / TRY CLOUD FOR FREE buttons either — just the logomark and a hamburger. That band is ordinary laptop territory and those two CTAs are the site's primary conversion path.
- 1280–1535px: the "Comfy" wordmark disappears from the header, replaced by the bare logomark. You can see it in the regenerated
pricing-tiers-3-lgbaseline.
None of this has ever been rendered by a preview or production build, because those are exactly the builds where the flag is off. That inverts the invariant config/workshop-release.ts is built on — "Preview and production must agree... A preview whose contents differ from the next release cannot answer the only question a preview is for." Right now the header that ships on launch day is the one configuration nobody can review.
This is a lot of site-wide collateral to fit one nav item. Better options, roughly in order of how little they disturb: put Workshop inside the Products dropdown; shorten the label; let the nav itself compact without moving the mobile breakpoint or hiding the CTAs. If the breakpoint move is genuinely wanted, it should be its own PR, unconditional, reviewed on its own merits — not smuggled in behind a feature flag.
On the four layout commits
keep Workshop navigation responsive → keep desktop navigation above 1280px → preserve release navigation layout → fit Workshop navigation at desktop widths, with two screenshot regenerations interleaved. Four passes at the same problem is usually the code telling you the approach is wrong. I think it is here.
| :locale | ||
| :show-workshop | ||
| :compact="showWorkshop" | ||
| :class="showWorkshop ? 'hidden xl:block' : 'hidden lg:block'" |
There was a problem hiding this comment.
BLOCKER — this makes the site's desktop/mobile breakpoint a function of a build flag.
With showWorkshop true, the desktop nav moves to xl, the mobile sheet takes over below 1280, and the CTA cluster below goes xl:flex as well. So between 1024px and 1279px a Workshop build shows only the logomark and a hamburger — no nav, and no DESKTOP / TRY CLOUD FOR FREE buttons. That is a normal laptop width and those are the primary CTAs.
Because the flag is off in every preview and production build, this layout has never been rendered anywhere a reviewer would see it. It appears for the first time on launch day, site-wide, on every page.
Making room for one nav item should not move the global breakpoint. Consider putting Workshop in the Products dropdown, shortening the label, or compacting the nav without relocating the mobile cutover. If the breakpoint change is wanted on its own merits, make it unconditional in a separate PR.
| class="relative col-span-full row-span-full h-10 w-0 overflow-clip transition-[width] xl:w-36" | ||
| :class="[ | ||
| 'relative col-span-full row-span-full h-10 w-0 overflow-clip transition-[width]', | ||
| showWorkshop ? '2xl:w-36' : 'xl:w-36' |
There was a problem hiding this comment.
BLOCKER (same root cause) — pushing the wordmark from xl:w-36 to 2xl:w-36 means that in a Workshop build the "Comfy" wordmark is gone from the header between 1280 and 1535px, replaced by the bare logomark. Site-wide, every page.
This is visible in the regenerated pricing-tiers-3-lg-visual-linux.png baseline in this PR — I diffed it against the previous one to confirm.
Dropping the brand wordmark at a common desktop width to fit a nav item is a call for design to make, not a side effect of a feature flag.
| screen.getByRole('link', { name: 'Workshop' }).getAttribute('href') | ||
| ).toBe('/workshop') | ||
| await userEvent.setup().click(screen.getByRole('button', { name: /menu/i })) | ||
| expect(screen.getAllByText('Workshop')).toHaveLength(2) |
There was a problem hiding this comment.
SHOULD FIX — the riskiest behaviour in this PR has no test.
These two cases cover presence/absence of the nav entry, which is the part that was already safe. Nothing asserts what showWorkshop does to the breakpoints — desktop lg→xl, mobile lg:hidden→xl:hidden, CTA lg:flex→xl:flex, logo xl:w-36→2xl:w-36. Those are the changes that alter the shipped site.
Happy-dom does not evaluate media queries, so a unit test cannot cover this properly. The right home is e2e/visual-responsive.spec.ts at 3-lg, exercising both flag states — which is also what would surface the fact that the release-shape header currently has no screenshot coverage at all (see the summary).
Separately, toHaveLength(2) conflates the desktop and mobile copies; it would still pass if the desktop item vanished and the mobile one rendered twice. Scoping each assertion to its own subtree would be firmer.
| locale = 'en', | ||
| showWorkshop = false, | ||
| compact = false | ||
| } = defineProps<{ |
There was a problem hiding this comment.
TRIVIAL — compact is always exactly showWorkshop; the parent passes :compact="showWorkshop" and this component already receives showWorkshop. Two props carrying one value. Drop compact and branch on showWorkshop, or drop showWorkshop here and pass only compact plus the already-filtered nav list.
| <HeaderMain | ||
| locale={locale} | ||
| github-stars={githubStars} | ||
| {...(isWorkshopInBuild() ? { showWorkshop: true } : {})} |
There was a problem hiding this comment.
TRIVIAL — the conditional spread obscures a plain boolean. showWorkshop={isWorkshopInBuild()} says the same thing and reads directly; the prop already defaults to false in HeaderMain, so omitting it buys nothing.
benjcooley
left a comment
There was a problem hiding this comment.
Re-review (round 3) — no code changed
| Severity | Count | Status |
|---|---|---|
| BLOCKER | 2 | unchanged |
| SHOULD FIX | 1 | unchanged |
| TRIVIAL | 2 | unchanged |
Every commit between my last review (968d930b42) and this head (f795b13d73) is a merge from the base stack or from main — customer video pages, the Managed Builds nav entry (#17016), the video sitemap, the Workshop indexing fixes. I diffed the two heads restricted to the files I raised:
components/common/HeaderMain/**— byte-identical.HeaderMain.vuelines 57, 73, 78 and 85–86 still carry the flag-driven breakpoints.layouts/BaseLayout.astro— byte-identical.config/routes.test.ts— still deleted (Din the diff against the merge base).
The only edits to routes.ts, mainNavigation.ts and mainNavigation.test.ts came in with the base merge; none of them touch anything I raised.
All five threads from round 2 are still open, none marked outdated by GitHub, and none have a reply. So nothing has been fixed and nothing has been contested — if you disagree with either blocker, say so on the thread and we can settle it there. That is a perfectly good outcome; silently re-requesting review is not.
Restating the two blockers in one line each so they are easy to find:
- Merge
1f4b0577d2deletedapps/website/src/config/routes.test.tsrelative to both parents.localizeHref— the function every route on the site passes through — still has zero test coverage on this branch. Pure collateral from a conflict resolution; restore the file. showWorkshopstill restructures the global header. At launch, 1024–1279px loses the desktop nav and both CTAs; 1280–1535px loses the Comfy wordmark. Site-wide, on every page, in the one configuration no preview or production build ever renders.
I confirmed the release gate is unchanged on this head — workshopReleaseGate() is still registered in astro.config.ts and isWorkshopInBuild() still returns false whenever VERCEL_ENV is production or preview — so both blockers apply exactly as written. The noindex removal on the Workshop pages is a base-branch change and is fine; the gate, not noindex, is what keeps those routes out of a release.
b1d7bd8 to
9c34b0e
Compare
dante01yoon
left a comment
There was a problem hiding this comment.
Requesting changes because the current-head site-wide header regressions remain unresolved. Enabling Workshop moves the desktop/mobile and CTA breakpoint from lg to xl, hiding desktop navigation and both primary CTAs at 1024–1279px: #16975 (comment). It also hides the Comfy wordmark at 1280–1535px: #16975 (comment). The unrelated deletion of apps/website/src/config/routes.test.ts should also be restored. These are broader global-header side effects than adding one Workshop link. I did not duplicate the existing inline threads.
Summary
Adds a Workshop link to the comfy.org header only when Workshop routes are included in the build. The header and route tree read the same build-time switch, so a release-shaped build cannot expose a dead link.
Changes
/workshoproute from every locale rather than emitting dead localized pathsisWorkshopInBuild()decision fromBaseLayoutinto both desktop and mobile navigationxlso it does not overflow at 1024px widthsReview Focus
/workshopTest plan