Repository navigation
feat(website): Comfy Content Catalog Hub CMS (supersedes #20640, #20933) - #21204
benjcooley wants to merge 154 commits into
Conversation
One Draft list merges catalog changes and workflow submissions, with a review sheet, Run in Comfy Cloud, publish that approves the included workflows, multi-reject, All content, publish history with rollback, and a slimmer preview bar with a time picker and a changes list. Adds shadcn-vue Switch, Checkbox and Popover in the site's style.
Moves listing filters, stats, rows, review details, the time picker and the changes list into their own components, and the filtering rules into tested helpers, so each template stays small.
The admin and the preview bar are work tools, so they now use the developer platform's graphite palette, type scale and controls instead of the marketing site's ink and yellow: a sidebar shell, dense tables, status dots, 8px controls and neutral dialogs and side panels. Admin primitives (button, dialog, side panel, status label, page header) live in components/cms/ui on top of reka-ui, and BaseLayout gains a bare mode so the admin can bring its own chrome.
A pull request labelled cms-demo now builds its Vercel preview with the Hub admin running on in-memory sample data, so design can share a link without a backend. The mock that pnpm dev:cms serves moves to lib/cms/mock-ingest.ts; in demo mode the site API and catalog reads are answered by it instead of the network. The flag is baked in at build time and refused when VERCEL_ENV is production. All content's row actions become icon buttons with platform tooltips.
…in a new tab Also split the middleware so the demo error wrapper stays small.
Replaces the middleware wrapper; the demo build alone injects /500.
On Vercel the function failed to import ScrollToPlugin by name from gsap's ESM files, which sit in a package Node reads as CommonJS.
One person publishing in the shared demo emptied the Draft for everyone else on that function instance. Each sign-in now gets its own credential and its own in-memory catalog.
Live is now a preview view instead of leaving preview, so the bar stays until Exit preview. The bar stacks above the sticky header, which docks below it. The admin sidebar title gets the Comfy mark.
…w flow The preview bar only shows on the site, not in the admin. Preview draft opens the list of changed pages on arrival and is hidden when the draft is empty. The bar counts page changes, which is what the preview shows, and says workflow submissions are checked in Comfy Cloud. Sheets cover the bar again, and the reject note no longer mentions the review API.
…lk review
From the workshop standup review of the admin design:
- Content editor at /admin/edit/{uid}: name, summary, credit and tags in
English and Chinese, cover, examples with prompts, each input's default
and whether it is basic, advanced or hidden, visibility and schedule.
Saving puts the item in the draft through the site API's item endpoint,
after checking it against the schemas the website renders from.
- Add content starts from a copy of an existing item; archive and restore
are saves with the deleted flag. All content lists new and archived
items and links each row to its editor.
- Publish history can restore any earlier publish, not only the previous.
- The Draft queue includes, leaves out or rejects everything a filter or
search shows.
- The preview bar links back to the admin and to the editor of the page
in view, and in Draft labels the cards and links the draft changes.
- The demo mock saves items, archives, and restores real LIVE snapshots.
…parts Keeps each template and function within the complexity limits: the editor's header, details, cover and publishing panel are their own components, parameter rows render separately, history moves to its own Astro component, and the publish, revert and reject actions and the mock save are split into single-purpose functions.
The cover and each example take an uploaded image or video as well as a link. Until the site API has file storage, only the demo accepts uploads and keeps them inline, up to 3 MB; elsewhere the button explains why it is off. Draft items now go through the checks a reviewer makes before publishing: the page builds, and it has a name, a description, a cover and, for models, examples. Gaps show on the row, in the review panel and in the publish confirmation, and never block publishing. The demo's new sample model is left incomplete to show them.
Draft preview now reads at a glance: a blue top edge, a tinted bar, a 'Draft preview' pill with a live dot, and a thin blue frame around the page. The live view uses green and no frame, so the two never look alike.
… ones waiting The workflow review panel previews the Hub card with a 'Pending approval' tag, and the preview's change list says how many workflows wait for approval, since unapproved ones never appear on a page. 'Preview draft' becomes 'View draft on site', which says where it goes. Loading submissions moves to one helper the admin and the preview share.
- Split Draft into workflow submissions and content changes. Each submission gets explicit Approve and Reject; only approved ones go out with the publish, and the rest keep waiting. - Replace the four count tiles with one line on what still needs a decision, what has gaps and what is scheduled. - Review panel: actions first, a one-line readiness note when every check passes, then what changes. Image fields show before and after pictures instead of links. - Undo one draft change (back to the live version), or remove a never-published item, from the review panel or the editor. Saves that match the live value no longer count as draft changes. - All content: a Needs attention view runs the readiness checks over every page, with a filter per missing field. - Editor: a live Hub card preview that updates while typing. - Kind-specific placeholders for missing thumbnails, and video covers seek to a frame so they don't render blank.
…d version history Follows the catalog API's editorial staging so the admin can be wired to it without reshaping the UX. - Every draft change, team edit or submitted workflow, is To review, Approved or Later. Draft shows one tab per status, with Approve and Later on each row and in bulk (workflows can also be rejected). - Editing an approved change sends it back to review and flags it as "Edited after approval". - Final review opens once nothing is left to review. It lists the approved changes, their gaps, and how many stay for later; only the approved ones are published (`approved_uids`). - Deciding in the review panel moves on to the next change. - The editor lists each save with who made it and when, marks the live and current ones, and restores any earlier save into the draft. - Diffs show dates in readable UTC. - Staging and version history each go through one module (`lib/cms/staging.ts`, `lib/cms/versions.ts`); the demo mock answers them, and they are the only files to change for the catalog API.
…e sidebar The always-on card repeated the name, summary and cover beside the form, which read as a second set of fields. A View card button in the header now opens it in a dialog, and the sidebar keeps only settings.
catalog-styles.test.ts expected .data-[state=checked]:bg-admin-card in the staff stylesheet, but 412603f removed the last component using that class, so Tailwind no longer generates it and the test fails. Assert data-[state=open]:bg-admin-hover instead, the state-variant admin colour the staff components still use.
The Draft change list now defaults to a natural, case-insensitive name order. When the server reports when each change was saved, a Sort menu also offers latest change first; items without a save time follow in name order. The save time is read from the staging item's saved_at, where the backend puts it, falling back to content.saved_at for older reads. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A Vercel preview now reads the catalog from WORKSHOP_CLOUD_BASE_URL, the Cloud origin the PUBLIC_WORKSHOP_CLOUD_ENV family already selects (stagingcloud, or testcloud with the workshop-test label), so the preview no longer depends on SITE_CATALOG_API_URL being set in Vercel. That variable still overrides the origin for local development and the local demo. Production keeps the static Hub regardless. All catalog reads go through catalogApiOrigin(); cmsEnabled() and the layout's history relay use the same rule. Co-Authored-By: Claude <noreply@anthropic.com>
The preview deploy for ef7f2b7 was skipped by Actions. Co-Authored-By: Claude <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
|
Hi Ben, thanks for carrying this forward and wiring it to the real catalog API! I've been away for a week, so some of this may already have been decided in conversations I missed. If so, just point me to it. I compared this branch ( Screens
Things that seem to be in the code but don't show up
Review panel Editor Preview bar
Wording on Draft A short list in the PR body would help me a lot: what's coming back here, what's a follow-up, and what was dropped on purpose. Then I can close #20640 with a clear picture. Thanks! Generated by Claude Code |
dante01yoon
left a comment
There was a problem hiding this comment.
question: apps/website no longer exists on main. #21861 (merged 2026-10-26) removed the frozen monorepo copy now that comfy.org and the Hub deploy from Comfy-Org/comfy-website, and it disconnected website CI, translation generation and deploy here. This PR's changes would land in a directory that is no longer built or deployed, so I haven't done a line-by-line review in this repo.
Could this be ported to Comfy-Org/comfy-website (and this PR closed)? I'm happy to review it there. If there is a reason it needs to land here first, could you share it?
Summary
This is the Comfy Content Catalog (CCC) Hub CMS frontend as one PR. It supersedes #20640 (Mar's Hub admin redesign) and #20933 (CCC admin/Preview primitives). Both contain contradictory transports and preview controls, so neither should merge on its own.
It keeps Mar's admin layout:
a2bbfb4458. Two of that head's three newest commits (production-static gate, dropping unreadable items) were already here in adapted form. The third (catalog publish before legacy approvals) is applied inb7202648b6.Surviving preview/banner rule (ADR
WEBSITE-CMS-0039, "Integrated replacement"):CatalogStaffChromechooses exactly one staff surface:CatalogPreviewControllerand/admin/catalog.Detail pages are server-rendered (
12f031633c). Catalog workflow and model detail pages now load their record on the server, using the same one-record readpage.jsonuses (no full-catalog loading). The first HTML has:The island hydrates from that record without refetching; client navigation still fetches. Unknown records return 404, and staff views stay
noindex. A CI audit (auditCatalogDetailBodyplus an SSR test over every seed workflow and model, 184 cases) enforces this.Production stays CMS-inactive.
cmsEnabled()requiresSITE_CATALOG_API_URLand returns false wheneverVERCEL_ENV === 'production'. Middleware, routes and rendering share that gate, so a production build serves the existing static Hub even if the catalog URL is set. Mar's sample-data login is also off unlessSITE_CATALOG_DEMO=1, and never on production.Design references:
Legacy site-session exchange and verification now work only in the explicit non-production demo or existing development tester configuration (
58f4a9f22f). Normal catalog use does not probe the retired/admin/api/site/reviewendpoint; canonical catalog authoring sessions keep their separate verification. The generated catalog API types and the website request snapshot are included (09edacbdeb).Verification
Latest scoped checkpoint
58f4a9f22f: 73 session, middleware and demo tests pass. Three new refusal cases reproduced before the guard. Normal format/lint/type hooks, import-cycle audit, knip and changed-file push audit pass; no new audit suppression. These checks do not claim full-site visual acceptance or deployment.On head
b7202648b6, Node 26.8.2:pnpm exec vitest runinapps/websitepassed 708 files / 12,809 of 12,810 tests. The one failure,ModelsPage.test.ts"shows a server-selected workflow…", passes 3/3 when run alone, so it's load-sensitive.pnpm typecheckinapps/websitereported 0 errors.pnpm deps:audit(the new import-cycle check) found no violations.pnpm knipandfallow audit: "No issues in 408 changed files". The two complexity findings it prints are inherited frommain./admin/catalog, which is registered;Historical verification above belongs to its named checkpoints. Subsequent author/profile fixes remain in this branch; demo and production acceptance stay on the CCC blockers page.
Catalog locales/hreflang landed in
a5b18afe9c(BRUCE3).This PR stays draft until those land and the backend stack merges.
Current-main synchronization
Rebased the existing branch onto frontend main
6410b7c184asac84980ef8. Preserved Mar's integrated UI, newer SSR detail pages, author/profile rendering and the catalog production-off gate while retaining main's staff-only app controls, challenge banner and API types. Website typecheck: zero errors; focused Hub/index/presentation checks: 39 tests pass. Node 26.8.2 pre-push dependency-cycle, knip and changed-line fallow audits pass without bypass. CI is running; this is not a deployment or merge-readiness claim. The running Linux demo's unpublished source was preserved separately for semantic reconciliation rather than overwriting newer reviewed code.