Repository navigation
feat(website): Move anything app, an image editor with a floating side panel - #20854
mariana953 wants to merge 17 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-20854.vercel.app Models is built and gated by PostHog (workshop-enabled), using staging Cloud. This commit: https://website-frontend-2wtv33d40-comfyui.vercel.app Last updated: 2026-10-14T01:00:33Z for |
# Conflicts: # apps/website/src/components/workshop/cinematic-studio/CinematicStudioPage.vue
…/app-move-anything
…/app-move-anything
…undo, and shows examples as a card
…/app-move-anything
…/app-move-anything
…/app-move-anything
dante01yoon
left a comment
There was a problem hiding this comment.
Thanks. The app is well put together on the kit, and the arrange maths and composable have solid unit coverage. Requesting changes for the copy approach (applies to all the stacked app PRs), internal comments, and one undo bug.
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.
| /** Move anything's page state. The run itself is `runMove`, mocked for now. */ | ||
| export function useMoveAnything(locale: Locale = 'en') { | ||
| const image = shallowRef<MoveImage>() | ||
| /** The photo taken out last, with its objects, kept so it can be put back. */ |
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.
| if (tool !== 'move') return | ||
| event.preventDefault() | ||
| emit('select', object.id) | ||
| emit('begin') |
There was a problem hiding this comment.
issue: grab emits begin (→ move.checkpoint()) on every pointerdown with the Move tool, before anything moves. Clicking a box just to select it pushes a snapshot identical to the current objects. The visitor then presses Undo, nothing visibly changes, and they have to press it again. Repro: open the example, click the kitten box without dragging, press Undo; the step is a no-op. Could the checkpoint be taken on the first place of a gesture, or skipped when the drag ends with to unchanged? A composable/page test for "select then undo" would lock it in. (CONFIRMED)
| /** The photo taken out last, with its objects, kept so it can be put back. */ | ||
| const removed = shallowRef<{ image: MoveImage; objects: MoveObject[] }>() | ||
| const objects = ref<MoveObject[]>([]) | ||
| const past = shallowRef<MoveObject[][]>([]) |
There was a problem hiding this comment.
suggestion: this is a hand-rolled copy of useSnapshotHistory (added identically in the sibling app PRs), and Hand product swap and Sprite sheet each carry another one. Using the shared composable here would remove ~25 lines and keep undo semantics the same across apps.
|
|
||
| export type MoveQuality = 'fast' | 'best' | ||
|
|
||
| export interface MoveRequest { |
There was a problem hiding this comment.
question: MoveRequest 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?
| const move = useMoveAnything(locale) | ||
| const { image, removed, phase } = move | ||
| const view = ref<MoveView>('compare') | ||
| const panel = computed(() => layout !== 'e') |
There was a problem hiding this comment.
suggestion: ?ux=e keeps a second, review-only layout (bottom composer + trays) in production code and in the e2e suite. Once the team picks a layout, could the other one be removed? Each app carries roughly a third more components and tests for a variant visitors aren't meant to use.
Summary
Adds Move anything as a Workshop app at
/hub/apps/move-anything/, built on the shared editor kit (#20630). The visitor drags the things in a photo somewhere new and the model rebuilds the scene around them. The UI is complete; the run is mocked until the backend exists. Replaces #19758, and no longer sits under or over any other app.Changes
?ux=ekeeps a bottom-composer variant for review.runMoveinlib/workshop/move-anything/mock-run.tswaits about 2 seconds and answers with the prepared result or the visitor's photo.MOVE_CREDITSis a placeholder.workshop-move-anything-app-enabledthroughworkshop-model-availability.json.Review Focus
MoveRequestholds the image URL, each object'sfromandtoboxes as fractions of the image, and the quality; it returns{ url, seed }. Detection on the example is prepared, so uploads have no detection yet.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)
Preview (once deployed): https://comfy-website-preview-pr-20854.vercel.app/hub/apps/move-anything/
Generated by Claude Code