Repository navigation
feat(website): Virtual try-on app (mocked) - #20870
mariana953 wants to merge 10 commits into
Conversation
|
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 This candidate changes nothing the matrix measures, 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. No new findings in the changed files. Reproduce locally# the base the gate compared against
npx fallow audit --root . --quiet --format json \
--changed-since fa6d451f5d507b9e31956425e939e0ee8d12cd1d
Full docs: ADR-DEVEX-LINT-0015 🌐 Website E2ETip All tests passed.
🔗 Website PreviewWebsite Preview: https://comfy-website-preview-pr-20870.vercel.app Models is built and gated by PostHog (workshop-enabled), using staging Cloud. This commit: https://website-frontend-p4mblf943-comfyui.vercel.app Last updated: 2026-10-14T01:19:50Z for |
# Conflicts: # apps/website/src/components/workshop/cinematic-studio/CinematicStudioPage.vue
…h the shared helpers
…/app-virtual-try-on
…ple card, and removes the person with undo
…/app-virtual-try-on
…/app-virtual-try-on
dante01yoon
left a comment
There was a problem hiding this comment.
Thanks. Dropping the made-up fit guide was the right call, and undo covering garment/fit/seed through useSnapshotHistory is clean. Requesting changes for the copy approach (shared with the sibling app PRs) and internal comments.
Size. This PR is about 2,700 lines (excluding binaries). That is far past the ~300-line guideline and hard to review well in one pass. Could you split it, e.g. (1) wiring: catalogue, routes, flag, Hub card; (2) pure lib/ logic with its tests; (3) components and e2e?
Stacking. Base is mariana/editor-kit (#20630), which is still open with changes requested. Every app PR edits the same shared lists (routes.ts, apps.ts, catalogue-apps.ts, CinematicStudioPage.vue, schema enums, locales, vercel.json), so they will conflict with each other as they land. The identical helpers (app-copy.ts, load-image.ts, useSnapshotHistory.ts, nudge.ts) would be better landed once in #20630 than duplicated in every app branch. This PR also adds animate-editor-shimmer to global.css. If it's a kit animation, it belongs in #20630.
Checks: CI is green; I didn't run tests locally.
| named: CopyValues = {} | ||
| ): string { | ||
| const [one, many = one] = (entry[locale] ?? entry.en).split(' | ') | ||
| return (named.n === 1 ? one : many).replace( |
There was a problem hiding this comment.
issue: appCopy fills placeholders with .replace and parses | plurals by hand, and the app's strings live in a TS copy.ts instead of src/locales/<locale>/main.json. apps/website/AGENTS.md says copy goes in main.json and is read with translationsFor(locale).t, and to "never fill a placeholder with .replace". Doing it this way also skips the catalog test that compiles each message and checks zh-CN coverage. It also treats a literal {word} the visitor types (a star name, a light name) as a placeholder whenever named has that key.
Could the app's strings move under a namespaced key in main.json (moveAnything.*, relight.*, …) and be read through t(key, named, { locale })? If keeping them out of the site-wide bundle is the real goal (as for catalogue-apps.ts), please get that exception agreed on #20630 first, where all seven apps can share it, without hand-rolled interpolation.
| } | ||
|
|
||
| /** | ||
| * Call before a change the visitor can undo. Changes that share a `key` |
There was a problem hiding this comment.
issue: this PR adds comments to internal, non-exported code, like this one and the others on inner functions of this composable. The repo rule only allows a short JSDoc on exported API. Please drop the internal ones and let the names carry the meaning. (This JSDoc also says "Call before a change", but change is the change.)
|
|
||
| export const DEFAULT_FIT: TryOnFit = 'regular' | ||
|
|
||
| export interface TryOnRequest { |
There was a problem hiding this comment.
question: TryOnRequest is a hand-written request/response contract for a backend that doesn't exist yet. Is there a tracking issue for the endpoint? Once it ships in the OpenAPI spec, these types should be imported from @comfyorg/ingest-types rather than kept by hand. Could you link the issue here (or in the PR body) so the swap isn't forgotten?
Summary
Adds the Virtual try-on Workshop app at
/hub/apps/virtual-try-on/. It works like the reference Virtual try-on app (Person and Garment images, Fit Slim/Regular/Relaxed, seed, Result and Compare views, run label "Try it on"), in the same full-screen editor as Relight and Move anything. The backend is mocked. Built on the shared editor kit (#20630), with no dependency on Relight or Move anything. Replaces #19824. Its Hub card copy now sits in the locale files like the other apps, and its copy helper no longer needs the removedi18n/interpolate.Changes
?ux=e) has Garment, Fit and Seed chips that open trays. On phones the panel becomes a bottom sheet with a summary row and the run button.EditorCompareTogglein the pill, and it showsEditorCompare(a draggable before/after line, labelled Original and Result). The pill also has Edit and Try again. Download is in the header.EditorDropZone, paste usesuseImagePaste, every file button usesEditorUploadSlot, the garment grid usesEditorTileswithaspect="square", and the run usesEditorRun'sprogressandmissing. Removed this branch'sEditorFileButtonandsquareprop onEditorTiles(both now in the kit),VirtualTryOnDropZoneandimage-transfer.ts.try-on-<person file name>.workshop-virtual-try-on-app-enabled(PostHog), listed inworkshop-model-availability.json.Backend contract
apps/website/src/lib/workshop/virtual-try-on/contract.ts. It maps 1:1 toPOST /api/run/virtual-try-on, a multipart form:There are no extension fields. Every field the page sends is a reference-app field.
The mock is
runTryOninmock-run.ts. It waits 2.4 s.mockProgressreports{ kind: 'queued' }for the first 0.4 s, then{ kind: 'running', percent }(the kit'sRunProgress, viaclockProgress). The real job reports the same two stages. When the mock answers:public/images/apps/virtual-try-on/result-{breton,flannel,knit}.jpg).To connect the backend, replace
runTryOnwith the real job call. The page already uses the request and result shapes above.Review Focus
cinematic-studio/options/shot-medium.jpg. The garments are real product photos, and each one has an example result photo.mockProgress, as a tablee2e/workshop-apps.spec.ts:imageFileOf, the drop and paste reader, is now tested in the kit.EDITOR_APPSlist on the studio page (one entry), and its copy goes throughlib/workshop/app-copy.ts. Shared helpers (app-copy.ts, and where usedload-image.ts,nudge.ts,useSnapshotHistory.ts) are identical in every app PR, so they merge cleanly whichever lands first.Screenshots (if applicable)
These were checked locally: desktop 1440 with the example, run progress, Result, Compare, the missing-garment state, layout E, and phone 390 (sheet and result).
Generated by Claude Code