Comfy-Org / Comfy-Org/ComfyUI_frontend

[RFC] Consolidate mask editor domain into `platform/maskEditor/`

Open
#11,061 0 comments 1 reaction 1 assignee Claimed by @kaili-yang View on GitHub
area:mask-editor area:workspace-management refactor
Dominant language
TypeScript
Stars
2k
Forks
699
Avg merge
1d 7h
Merged PRs (30d)
490

Description

## Problem

The mask editor is a self-contained feature domain, but its modules are scattered across 4 top-level directories:

- **Stores**: `src/stores/maskEditorStore.ts`, `src/stores/maskEditorDataStore.ts`
- **Composables**: `src/composables/maskeditor/` (8+ files including GPU renderer)
- **Components**: `src/components/maskeditor/` (4+ Vue components)
- **Extensions**: `src/extensions/core/maskeditor.ts`, `src/extensions/core/maskeditor/`

Working on the mask editor requires navigating 4 separate directory trees.

## Proposed Deepening

Consolidate into a single domain directory:

```
platform/maskEditor/
stores/maskEditorStore.ts
stores/maskEditorDataStore.ts
composables/useCanvasManager.ts
composables/useBrushDrawing.ts
composables/useMaskEditor.ts
composables/gpu/GPUBrushRenderer.ts
components/MaskEditorContent.vue
components/ToolPanel.vue
components/SidePanel.vue
extension.ts (the ComfyExtension registration)
```

## Migration Plan

1. Single PR to relocate all mask editor files
2. Update imports across the codebase
3. The extension registration (`maskeditor.ts`) moves too — it's just a thin hook

## Testing Strategy

- All existing mask editor tests pass (only import paths change)
- `pnpm typecheck` passes

┆Issue is synchronized with this [Notion page](https://www.notion.so/Issue-11061-RFC-Consolidate-mask-editor-domain-into-platform-maskEditor-33e6d73d36508176abb6eef5b922ae64) by [Unito](https://www.unito.io)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.