Repository navigation
Conversation
Declare the core extension, LiteGraph widget, widget component and the useImageCrop composable, whose aspect ratios the video crop lock reuses, as public entries, with a characterization scenario citing their existing tests.
|
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
|
📦 Bundle: ⏳ Size data collection in progress…🧩 Custom Nodes Ecosystem Matrix: 🟡 Withheld — could not measure
Findings and check detailsExecutes the frontend JS of every registry pack that ships any, against this change, in both renderers. The eight The matrix runs on same-repository version-bump PRs with relevant changes, main-branch pushes, and manual dispatches. This candidate does not qualify, so every expensive stage was skipped. Full docs: scripts/registry-census/README.md 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
🌾 Fallow: ✅ PassedFindings and check detailsFallow 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. Full docs: ADR-DEVEX-LINT-0015 Reproduce locally# the base the gate compared against
npx fallow audit --root . --quiet --format json \
--changed-since f0bb56c1a1010046e05ce74264a9bb4849593f23
🏛️ Architecture: ✅ PassedFindings and check detailsWarnings (350)
Full docs: Frontend domain catalog Reproduce locallypnpm architecture:check |
…entries (Comfy-Org#22744) ## Summary Routes the deep imports into the six enforced domains through public entry points. Follows Comfy-Org#22733, now on `main`. This replaces Comfy-Org#22738, Comfy-Org#22739, Comfy-Org#22740, Comfy-Org#22741, Comfy-Org#22742 and Comfy-Org#22743, with `boundaries.json` regenerated once for the whole set. Boundary violations go from 40 on `main` to 2. Both remaining violations are Fallow false positives (see below). ## mask-editor (11 → 1) - New public entry points, each cited by a characterization scenario: - `src/extensions/core/maskeditor.ts` and `src/extensions/core/clipspace.ts`: the core extension seam that `extensions/core/index.ts` registers (`index.test.ts`, `maskeditor.test.ts`). - `src/renderer/extensions/maskEditor/composables/useMaskEditor.ts`: opening the editor from app mode and Vue node previews (`useMaskEditor.test.ts`). - `src/scripts/clipspace.ts`: the clipspace state that `ComfyApp`, `changeTracker` and `litegraphService` share (`clipspace.test.ts`). - `@comfyorg/mask-editor/maskEditorStore`: undo and redo from core commands (`maskEditorStore.test.ts`). - `@comfyorg/mask-editor/StrokeProcessor` and `brushUtils`: the stroke engine the painter reuses (`StrokeProcessor.test.ts`, `brushUtils.test.ts`). - `extractWidgetStringValue` moves from `useMaskEditorLoader` to `src/utils/imageUtil.ts`, next to `parseImageWidgetValue`. It reads a generic image widget value, and the app-mode loader drop indicator imported mask-editor internals only to get it. ## image-compositor (11 → 1) - The record declares as `publicEntryPoints` the seams its consumers already use. These are the core extensions, the LiteGraph `CompositorWidget`, the Vue-node `useCompositorWidget` adapter and `WidgetCompositor.vue`, and the layer editor's `useLayerEditor` and `layerEditorDialogKey`. They also include `@comfyorg/layer-editor/mode` and `/node`, which graph-model imports for the `BlendFn` and `Transform` types. - The record's compatibility promises already name the core extension, the Vue-node adapter and the LiteGraph widget as host integration seams. - A new characterization scenario cites `index.test.ts` and `richWidgetPanelVisibility.test.ts`. The engine scenario now also cites `packages/layer-editor/src/node.test.ts`. ## image-compare (6 → 0), painter (6 → 0) - Each record declares as `publicEntryPoints` the host integration seams its compatibility promises already name: the core extension, the LiteGraph widget, the Vue-node adapter, and the `Widget*.vue` component the widget registry loads. - Each record gets a new characterization scenario that cites `index.test.ts` and `richWidgetPanelVisibility.test.ts`. ## image-crop (5 → 0) - The record declares the core extension `imageCrop.ts`, the LiteGraph `ImageCropWidget.ts`, `WidgetImageCrop.vue` and `useImageCrop.ts` as public entry points. - `useImageCrop.ts` is public because video-edit's `useCropRatioLock` reuses its `ASPECT_RATIOS`, so video crop offers the same ratios as image crop. `useImageCrop.test.ts` already characterizes the composable. - A new scenario cites `index.test.ts` and `useCropRatioLock.test.ts`. ## account (1 → 0) - `src/platform/account/composables/__mocks__/useWorkspaceDialogs.ts` joins `publicEntryPoints`. - `CurrentUserButton.test.ts` mocks the public `useWorkspaceDialogs` entry through its public specifier. Vitest then loads the sibling `__mocks__` file, and Fallow records that file as the import target. Seven account tests and this external test share the double, and `vi.mockObject<WorkspaceDialogs>` type-checks it against the real composable. ## Remaining false positives - `src/extensions/core/index.test.ts` → `maskeditor.test.ts` - `src/extensions/core/index.test.ts` → `imageCompositor.test.ts` `index.test.ts` loads the core extensions with `import.meta.glob` and excludes `*.test.ts` with negative patterns. Vite applies those patterns, but Fallow ignores them, so it reports imports of every test file in the directory. Neither edge is suppressed. They stay until Fallow supports negative globs. ## Verification - `architecture --update` leaves no diff, and `--check` passes. The warnings are the same as on `main`. - `fallow dead-code` reports 2 boundary violations, down from 40 on `main`. - Tests pass for tools/architecture, the builder, mask-editor composables and `imageUtil`. - Typecheck, eslint, oxfmt and the pre-push hook pass.
Summary
Routes the 5 deep imports into image-crop through public entries. Stacked on #22733.
Changes
image-crop.domain.jsondeclares aspublicEntryPointsthe host integration seams its compatibility promises already name. These are the core extensionimageCrop.tsand the LiteGraphImageCropWidget.ts, plusWidgetImageCrop.vue, which the Vue-node widget registry loads, and theuseImageCrop.tscomposable.useImageCrop.tsis public because video-edit'suseCropRatioLockreuses itsASPECT_RATIOSso video crop offers the same ratios as image crop. Video-edit's deep imports are not enforced, so the dependency only runs from video-edit to image-crop.useImageCrop.test.tsalready characterizes the composable.src/extensions/core/index.test.tsandsrc/composables/video/useCropRatioLock.test.ts.extensions/core/index.ts,index.test.ts→imageCrop.tswidgetMap.ts→ImageCropWidget.tswidgetRegistry.ts→components/imagecrop/WidgetImageCrop.vuecomposables/video/useCropRatioLock.ts→composables/useImageCrop.tsBoundary violations into image-crop go from 5 to 0. Across the repo, they go from 47 to 42, counted on top of #22733 alone.
Review Focus
useCropRatioLockduplicates the ratio-matching logic inuseImageCrop. MovingASPECT_RATIOSand that logic into a shared crop-ratio module would let both crop features share it. That is a behavior-preserving refactor and out of scope here.