-
Notifications
You must be signed in to change notification settings - Fork 462
fix: restore mask editor compatibility with Impact-Pack plugin #7762
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
📝 WalkthroughWalkthroughAdds a guard in the mask editor loader to skip widgetFilename parsing when it starts with Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant ClipspaceDialog
participant MaskEditorExt as MaskEditorExtension
participant Loader as useMaskEditorLoader
User->>ClipspaceDialog: request "Open Mask Editor" (clipspace)
ClipspaceDialog->>MaskEditorExt: invoke openMaskEditorFromClipspace()
MaskEditorExt->>MaskEditorExt: validate clipspace_return_node
MaskEditorExt->>Loader: request load with nodeImageRef / widgetFilename
Loader->>Loader: if widgetFilename startsWith("$") skip widget parse
Loader-->>MaskEditorExt: return editor payload
MaskEditorExt-->>User: open mask editor UI
Note over MaskEditorExt: init() assigns ComfyApp.open_maskeditor -> openMaskEditorFromClipspace (deprecated bridge)
Possibly related PRs
Pre-merge checks and finishing touches✅ Passed checks (2 passed)
✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🎨 Storybook Build Status✅ Build completed successfully! ⏰ Completed at: 12/30/2025, 01:32:02 AM UTC 🔗 Links🎉 Your Storybook is ready for review! |
🎭 Playwright Test Results⏰ Completed at: 12/30/2025, 01:40:45 AM UTC 📈 Summary
📊 Test Reports by Browser
🎉 Click on the links above to view detailed test results for each browser configuration. |
Bundle Size ReportSummary
Category Glance Per-category breakdownApp Entry Points — 3.2 MB (baseline 3.2 MB) • 🔴 +568 BMain entry bundles and manifests
Status: 3 added / 3 removed Graph Workspace — 1000 kB (baseline 1000 kB) • ⚪ 0 BGraph editor runtime, canvas, workflow orchestration
Status: 1 added / 1 removed Views & Navigation — 6.63 kB (baseline 6.63 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 1 added / 1 removed Panels & Settings — 300 kB (baseline 300 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
Status: 6 added / 6 removed UI Components — 199 kB (baseline 199 kB) • ⚪ 0 BReusable component library chunks
Status: 9 added / 9 removed Data & Services — 12.5 kB (baseline 12.5 kB) • ⚪ 0 BStores, services, APIs, and repositories
Status: 2 added / 2 removed Utilities & Hooks — 1.41 kB (baseline 1.41 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 1 added / 1 removed Vendor & Third-Party — 9.1 MB (baseline 9.1 MB) • ⚪ 0 BExternal libraries and shared vendor chunks
Other — 3.47 MB (baseline 3.47 MB) • ⚪ 0 BBundles that do not match a named category
Status: 20 added / 20 removed |
christian-byrne
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good and definitely we should solve this. Question: would it also be solveable by updating Impact-Pack to use the modern APIs like the commands system?
src/extensions/core/maskeditor.ts
Outdated
| init() { | ||
| // Set up ComfyApp static methods for plugin compatibility (deprecated) | ||
| ComfyApp.open_maskeditor = openMaskEditorFromClipspace | ||
| ComfyApp.maskeditor_is_opended = isOpened |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer to fix on our side fro now, because we don't know is any other custom nodes using these (deprecated) apis |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
src/extensions/core/maskeditor.ts
🧰 Additional context used
📓 Path-based instructions (7)
src/**/*.{vue,ts}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
src/**/*.{vue,ts}: Leverage VueUse functions for performance-enhancing styles
Implement proper error handling
Use vue-i18n in composition API for any string literals. Place new translation entries in src/locales/en/main.json
Files:
src/extensions/core/maskeditor.ts
src/**/*.ts
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
src/**/*.ts: Use es-toolkit for utility functions
Use TypeScript for type safety
Files:
src/extensions/core/maskeditor.ts
src/**/*.{ts,tsx,vue}
📄 CodeRabbit inference engine (src/CLAUDE.md)
src/**/*.{ts,tsx,vue}: Sanitize HTML with DOMPurify to prevent XSS attacks
Avoid using @ts-expect-error; use proper TypeScript types instead
Use es-toolkit for utility functions instead of other utility libraries
Implement proper TypeScript types throughout the codebase
Files:
src/extensions/core/maskeditor.ts
src/**/*.{vue,ts,tsx}
📄 CodeRabbit inference engine (src/CLAUDE.md)
Follow Vue 3 composition API style guide
Files:
src/extensions/core/maskeditor.ts
**/*.{ts,tsx,vue}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{ts,tsx,vue}: Use TypeScript exclusively; do not write new JavaScript code
Use sorted and grouped imports organized by plugin/source
Enforce ESLint rules including Vue + TypeScript rules, disallow floating promises, disallow unused imports, and restrict i18n raw text in templates
Do not useanytype oras anytype assertions; fix the underlying type issue instead
Write code that is expressive and self-documenting; avoid redundant comments and clean as you go
Keep functions short and functional; minimize nesting and follow the arrow anti-pattern
Avoid mutable state; prefer immutability and assignment at point of declaration
Use function declarations instead of function expressions when possible
Use es-toolkit for utility functions
Implement proper error handling in code
Files:
src/extensions/core/maskeditor.ts
**/*.{ts,tsx,vue,js,jsx,json,css}
📄 CodeRabbit inference engine (AGENTS.md)
Apply Prettier formatting with 2-space indentation, single quotes, no trailing semicolons, and 80-character line width
Files:
src/extensions/core/maskeditor.ts
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Minimize the surface area (exported values) of each module and composable
Files:
src/extensions/core/maskeditor.ts
🧠 Learnings (4)
📚 Learning: 2025-12-09T03:39:54.501Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7169
File: src/platform/remote/comfyui/jobs/jobTypes.ts:1-107
Timestamp: 2025-12-09T03:39:54.501Z
Learning: In the ComfyUI_frontend project, Zod is on v3.x. Do not suggest Zod v4 standalone validators (z.uuid, z.ulid, z.cuid2, z.nanoid) until an upgrade to Zod 4 is performed. When reviewing TypeScript files (e.g., src/platform/remote/comfyui/jobs/jobTypes.ts) validate against Zod 3 capabilities and avoid introducing v4-specific features; flag any proposal to upgrade or incorporate v4-only validators and propose staying with compatible 3.x patterns.
Applied to files:
src/extensions/core/maskeditor.ts
📚 Learning: 2025-12-13T11:03:11.264Z
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 7416
File: src/stores/imagePreviewStore.ts:5-7
Timestamp: 2025-12-13T11:03:11.264Z
Learning: In the ComfyUI_frontend repository, lint rules require keeping 'import type' statements separate from non-type imports, even if importing from the same module. Do not suggest consolidating them into a single import statement. Ensure type imports remain on their own line (import type { ... } from 'module') and regular imports stay on separate lines.
Applied to files:
src/extensions/core/maskeditor.ts
📚 Learning: 2025-12-17T00:40:09.635Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7537
File: src/components/ui/button/Button.stories.ts:45-55
Timestamp: 2025-12-17T00:40:09.635Z
Learning: Prefer pure function declarations over function expressions (e.g., use function foo() { ... } instead of const foo = () => { ... }) for pure functions in the repository. Function declarations are more functional-leaning, offer better hoisting clarity, and can improve readability and tooling consistency. Apply this guideline across TypeScript files in Comfy-Org/ComfyUI_frontend, including story and UI component code, except where a function expression is semantically required (e.g., callbacks, higher-order functions with closures).
Applied to files:
src/extensions/core/maskeditor.ts
📚 Learning: 2025-12-11T12:25:15.470Z
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 7358
File: src/components/dialog/content/signin/SignUpForm.vue:45-54
Timestamp: 2025-12-11T12:25:15.470Z
Learning: This repository uses CI automation to format code (pnpm format). Do not include manual formatting suggestions in code reviews for Comfy-Org/ComfyUI_frontend. If formatting issues are detected, rely on the CI formatter or re-run pnpm format. Focus reviews on correctness, readability, performance, accessibility, and maintainability rather than style formatting.
Applied to files:
src/extensions/core/maskeditor.ts
🧬 Code graph analysis (1)
src/extensions/core/maskeditor.ts (1)
src/scripts/app.ts (1)
ComfyApp(124-1763)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: setup
- GitHub Check: lint-and-format
- GitHub Check: collect
- GitHub Check: test
🔇 Additional comments (2)
src/extensions/core/maskeditor.ts (2)
4-4: LGTM: Import change is correct.The addition of
ComfyAppto the import is appropriate since it's used both as a type annotation (line 26) and as a value (line 96) for the compatibility bridge.
94-102: Verify compatibility with Impact-Pack plugin.Since this change specifically aims to restore compatibility with the Impact-Pack plugin (addressing issues #1165, #1158, #1157), please ensure this has been tested with the actual plugin workflow described in the linked issues.
Test the following workflow:
- Install ComfyUI-Impact-Pack plugin
- Load a Preview Bridge (Image) node from Impact-Pack
- Run an image into it
- Attempt to open the mask editor
- Verify that the mask editor opens successfully without errors
If possible, also verify that the ClipspaceDialog properly registers the MaskEditor button as mentioned in the PR description.
## Summary - Skip widget filenames starting with '$' (internal reference format) - Add deprecated ComfyApp.open_maskeditor for plugin compatibility - Register MaskEditor button in ClipspaceDialog fix #7665 and ltdrdata/ComfyUI-Impact-Pack#1165 ltdrdata/ComfyUI-Impact-Pack#1158 ltdrdata/ComfyUI-Impact-Pack#1157 ## Screenshots (if applicable) before https://github.com/user-attachments/assets/356dd920-8b64-40f4-8839-90b955ffafc3 after https://github.com/user-attachments/assets/dff9abcd-530a-4995-bb4b-51f408d4eca9 ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-7762-fix-restore-mask-editor-compatibility-with-Impact-Pack-plugin-2d46d73d36508199bdaecbd5ba838483) by [Unito](https://www.unito.io)
## Summary - Skip widget filenames starting with '$' (internal reference format) - Add deprecated ComfyApp.open_maskeditor for plugin compatibility - Register MaskEditor button in ClipspaceDialog fix #7665 and ltdrdata/ComfyUI-Impact-Pack#1165 ltdrdata/ComfyUI-Impact-Pack#1158 ltdrdata/ComfyUI-Impact-Pack#1157 ## Screenshots (if applicable) before https://github.com/user-attachments/assets/356dd920-8b64-40f4-8839-90b955ffafc3 after https://github.com/user-attachments/assets/dff9abcd-530a-4995-bb4b-51f408d4eca9 ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-7762-fix-restore-mask-editor-compatibility-with-Impact-Pack-plugin-2d46d73d36508199bdaecbd5ba838483) by [Unito](https://www.unito.io)
…ct-Pack plugin (#7800) Backport of #7762 to `core/1.36` Automatically created by backport workflow. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-7800-backport-core-1-36-fix-restore-mask-editor-compatibility-with-Impact-Pack-plugin-2d96d73d365081429479ffcf2e2b5181) by [Unito](https://www.unito.io) Co-authored-by: Terry Jia <[email protected]>
…act-Pack plugin (#7801) Backport of #7762 to `cloud/1.36` Automatically created by backport workflow. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-7801-backport-cloud-1-36-fix-restore-mask-editor-compatibility-with-Impact-Pack-plugin-2d96d73d36508190b073e683e4f08f2b) by [Unito](https://www.unito.io) Co-authored-by: Terry Jia <[email protected]>
|
I use ComfyUI_windows_portable_nvidia_cu128.7z v0.6.0 packge, update comfyui-frontend-package to 1.37.0 , Impact-Pack Preview Bridge still unable to open mask edit . |
|
@zslefour confirmed. Today I tried with v1.37.1 and mask editor works. |

Summary
fix #7665 and
ltdrdata/ComfyUI-Impact-Pack#1165
ltdrdata/ComfyUI-Impact-Pack#1158
ltdrdata/ComfyUI-Impact-Pack#1157
Screenshots (if applicable)
before
2025-12-25.15-34-18.mp4
after
2025-12-25.15-29-51.mp4
┆Issue is synchronized with this Notion page by Unito