Skip to content

fix: publish the useWorkspaceDialogs test double with its public entry - #22743

Closed
DrJKL wants to merge 1 commit into
architecture/remove-rolesfrom
architecture/account-entries
Closed

DrJKL wants to merge 1 commit into
architecture/remove-rolesfrom
architecture/account-entries

Conversation

@DrJKL

@DrJKL DrJKL commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Resolves the last deep import into account. Stacked on #22733.

Changes

  • What: account.domain.json adds src/platform/account/composables/__mocks__/useWorkspaceDialogs.ts to publicEntryPoints.
  • src/components/topbar/CurrentUserButton.test.ts already mocks the public entry useWorkspaceDialogs through its public specifier, using vi.mock(import('@/platform/account/composables/useWorkspaceDialogs')). Vitest then loads the sibling __mocks__ file, and Fallow records that file as the import target. The double is the shared test double for a public entry: 7 account tests and this one external test use it, and vi.mockObject<WorkspaceDialogs> type-checks its shape against the real composable. Declaring it with its entry is accurate, and an inline copy in the consumer's test would only duplicate it.

Boundary violations into account go from 1 to 0. Across the repo, they go from 47 to 46, counted on top of #22733 alone.

Vitest substitutes __mocks__/useWorkspaceDialogs.ts for any consumer that
mocks the public useWorkspaceDialogs entry, so the double is part of that
entry's contract.
@DrJKL
DrJKL requested review from a team and christian-byrne as code owners November 2, 2026 21:13
@coderabbitai

coderabbitai Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

📦 Bundle: ⏳ Size data collection in progress…

🧩 Custom Nodes Ecosystem Matrix: 🟡 Withheld — could not measure

No verdict is available. Open the workflow run to confirm the check was intentionally skipped, or fix the collection failure and re-run it.

Findings and check details

Executes the frontend JS of every registry pack that ships any, against this change, in both renderers. The eight ecosystem-matrix shard checks are a harness self-test; the pack verdict is matrix-verdict.

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: ✅ Passed

Findings and check details

Fallow 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: ✅ Passed

Findings and check details

Warnings (350)

  • billing path matches no source files: src/platform/billing/composables/activateBillingScope.testUtils.ts. Remove or update it in docs/architecture/domains/records/billing.domain.json.
  • error-handling path matches no source files: src/utils/errorUtil.ts. Remove or update it in docs/architecture/domains/records/error-handling.domain.json.
  • graph-model path matches no source files: src/types/linkTopology.ts. Remove or update it in docs/architecture/domains/records/graph-model.domain.json.
  • graph-model path matches no source files: src/types/nodeState.ts. Remove or update it in docs/architecture/domains/records/graph-model.domain.json.
  • job-queue path matches no source files: src/platform/remote/comfyui/jobs/**. Remove or update it in docs/architecture/domains/records/job-queue.domain.json.
  • linear-mode path matches no source files: src/utils/appMode.ts. Remove or update it in docs/architecture/domains/records/linear-mode.domain.json.
  • link-connection path matches no source files: src/lib/litegraph/src/infrastructure/LinkConnectorEventMap.ts. Remove or update it in docs/architecture/domains/records/link-connection.domain.json.
  • node-widgets path matches no source files: src/types/widgetState.ts. Remove or update it in docs/architecture/domains/records/node-widgets.domain.json.
  • subgraphs path matches no source files: src/lib/litegraph/src/infrastructure/SubgraphEventMap.ts. Remove or update it in docs/architecture/domains/records/subgraphs.domain.json.
  • vue-node-widgets path matches no source files: src/types/positionConfig.ts. Remove or update it in docs/architecture/domains/records/vue-node-widgets.domain.json.
  • workspace path matches no source files: src/platform/workspace/fixtures/**. Remove or update it in docs/architecture/domains/records/workspace.domain.json.
  • packages/api-client/src/abortSignal.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/api-client/src/abortSignal.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/api-client/src/fetchRouteTemplate.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/api-client/src/fetchWithRetry.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/api-client/src/fetchWithRetry.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/api-client/src/retryPolicy.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/api-client/src/retryPolicy.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/api-client/src/statusRetryTelemetry.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/api-client/src/statusRetryTelemetry.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/shared-frontend-utils/src/formatUtil.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/shared-frontend-utils/src/formatUtil.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/shared-frontend-utils/src/geometry.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/shared-frontend-utils/src/loadExternalScript.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/shared-frontend-utils/src/networkUtil.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/shared-frontend-utils/src/telemetry.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/shared-frontend-utils/src/telemetry.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/shared-frontend-utils/src/urlSafety.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/shared-frontend-utils/src/urlSafety.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • packages/tailwind-utils/src/index.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/TopbarActions.vue is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/searchbox/v2/filterChip.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/videoConcat/VideoConcatClipStrip.vue is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/videoConcat/VideoConcatClipTile.vue is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/videoConcat/VideoConcatPanel.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/videoConcat/VideoConcatPanel.vue is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/videoConcat/VideoConcatPlaybackBar.vue is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/videoConcat/WidgetVideoConcat.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/videoConcat/WidgetVideoConcat.vue is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/videoConcat/__fixtures__/clipTiles.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/widgetHistory/WidgetHistoryButtons.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/widgetHistory/WidgetHistoryButtons.vue is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/composables/graph/menuOption.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/composables/useAgentExtensionActions.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/composables/useAgentExtensionActions.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/composables/useAgentExtensionNotices.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/composables/useAgentExtensionNotices.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/composables/useAgentSidebarTabs.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/composables/useLiveGraphNode.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/composables/useLiveGraphNode.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • …and 300 more

Full docs: Frontend domain catalog

Reproduce locally
pnpm architecture:check

@mrseek-reviews

mrseek-reviews Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Superseded by #22744, which combines the six deep-import fixes (#22738–#22743) into one PR stacked on #22733 with boundaries.json regenerated once. This fix is carried over unchanged.

@DrJKL DrJKL closed this Nov 2, 2026
Penguinjanator pushed a commit to Penguinjanator/ComfyUI_frontend that referenced this pull request Nov 3, 2026
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:medium PR risk grade (advisory shadow check; grader-owned)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant