Repository navigation
feat(website): Paparazzi me app (mocked) - #20863
mariana953 wants to merge 11 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-20863.vercel.app Models is built and gated by PostHog (workshop-enabled), using staging Cloud. This commit: https://website-frontend-6hplqjhqy-comfyui.vercel.app Last updated: 2026-10-14T00:40:30Z for |
# Conflicts: # apps/website/src/components/workshop/cinematic-studio/CinematicStudioPage.vue
…/app-paparazzi-me
…card, and removes the face with undo
…/app-paparazzi-me
…/app-paparazzi-me
dante01yoon
left a comment
There was a problem hiding this comment.
Thanks. The flow is clear and the contract module mirrors the API fields nicely. Requesting changes for the copy approach (shared with the sibling app PRs) and internal comments. I also have a product question about real people.
Size. This PR is about 3,000 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.
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.
| leaveResult({ kind: 'editing' }) | ||
| } | ||
|
|
||
| /** Shows the look-up already made for the setup's star, if any. */ |
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.
| * The multipart fields of `POST /api/run/paparazzi-me`, one for one. The | ||
| * images are URLs here; the real call sends their files under the same keys. | ||
| */ | ||
| export interface PaparazziRequest { |
There was a problem hiding this comment.
question: the look-up accepts any name and the real /api/paparazzi/search returns paparazzi photos of that person, which the run then composites the visitor into. Has this had legal / trust & safety sign-off (likeness rights, real-person deepfakes) before it goes behind a public route, even staff-flagged? Separately, PaparazziSearch / PaparazziRequest 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?
| if (usingOwnScene.value && ownScene.value) | ||
| return { upload: ownScene.value.url } | ||
| await findScenes() | ||
| return candidate.value && { token: candidate.value.token } |
There was a problem hiding this comment.
suggestion: if the look-up fails (search.kind === 'failed'), candidate is undefined, so sceneForRun returns undefined. The run then goes out with neither sceneToken nor scene. The mock hides this by falling back to the first sample scene, but the real backend won't. Could snap go to failed (or show the look-up error) when there's no scene, instead of sending the request? (PLAUSIBLE: the mock search never fails today.)
| } | ||
|
|
||
| async function readImage(file: File): Promise<PaparazziImage | undefined> { | ||
| picks += 1 |
There was a problem hiding this comment.
suggestion: readImage uses one picks counter for both face and scene uploads. Dropping a face and then quickly a scene (or the reverse) makes the first decode see pick !== picks and silently discard that upload. Separate counters (or per-slot pending URLs) would keep the two slots independent. (PLAUSIBLE: needs two uploads inside one decode.)
Summary
Adds Paparazzi me to the Workshop at
/hub/apps/paparazzi-me/: type a star, pick one of their looked-up paparazzi photos (or upload your own scene), add your face, and get that photo with you inserted next to the star. Works like the reference API flow (face + celebrity look-up + optional scene override + resolution + seed); same full-screen editor kit as Relight and Move anything. Backend is mocked. Built on the shared editor kit (#20630), with no dependency on Relight or Move anything. Replaces #19826.Changes
shot-close.jpgface, the made-up star "Nova Reyes" already looked up, her red-carpet photo picked. No real person is suggested; the look-up only suggests made-up names and accepts any name.EditorCompareToggle, original photo vs result), Edit shot, Try again, then undo/redo at the right end. Download in the header, zoom bottom right (kit).?ux=e): chips for Your face, Star, Scene, Seed open trays (Scene tray holds the same grid), Resolution as a pill.EditorPickerRow, the picker isEditorPicker, the grid isEditorTiles(2 columns of 3:2 tiles with a check on the picked one, placeholders while searching, the trailing upload tile), the face row usesEditorDropZoneandEditorUploadSlot, paste usesuseImagePaste, and the run usesEditorRun'sprogressandmissing. Removed the localPaparazziScenePicker,PaparazziSceneTileandPaparazziUpload. The run progress (look-up, queued, percent) is one function,runProgressinsections.ts, used by the photo's status and the run button.PaparazziSceneArt,draw-scene.ts,draw-figures.ts,random.ts, canvas previews and thumbnails), floating face card,result-*.jpg.paparazzi-me-<seed>.jpg.public/images/apps/paparazzi-me/scenes/(JPEG 1264 wide q82, plus 400-wide thumbs). In the mock, any star name returns these same nine candidates.workshop-paparazzi-me-app-enabled. Copy in en + zh-CN inlib/workshop/paparazzi-me/copy.ts.Backend contract (
lib/workshop/paparazzi-me/contract.ts), 1:1 with the API's fields:Run rule (same as the API's client): needs a face, and either a celebrity of 2+ letters or an uploaded scene. The first candidate is used unless another is picked. If the star wasn't looked up yet, Run looks it up first.
Mocks:
searchScenes(mock-search.ts) answers after 0.7 s with the nine sample candidates (provider "Comfy sample library"); the mock candidate carries a local place (photo, thumb, label) where the real one hastitleand the scene URL.runPaparazzi(mock-run.ts) waits 2.4 s; the example (example face + Nova Reyes + red-carpet token, no upload) answers the preparedexample-result.jpg; any other combination is a canvas stand-in (the scene photo with a soft head-and-shoulders cut of the face beside the star), falling back to the scene photo where the canvas can't draw.Review Focus
missing).PaparazziStudio.test.ts: picker grid, run, compare, typed look-up + missing message, face/scene upload, paste, resolution/seed rows, layout E tray, phone sheet), e2ee2e/workshop-paparazzi-me.spec.ts(desktop picker beside the panel and run, phone sheet run with no overflow) pluse2e/workshop-apps.spec.ts.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)
Desktop 1440 (example, picker, drop highlight on the face row, running, result, compare, layout E) and phone 390 (example, sheet, picker, result) reviewed locally.
Generated by Claude Code