Comfy-Org / Comfy-Org/ComfyUI_frontend
[RFC] Migrate composables root sprawl — 40+ domain-specific files at root level
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 699
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 490
Description
## Problem
`src/composables/` has 45 non-test `.ts` files at root level. Many have clear domain affiliations but have not been moved into subdirectories:
**Load3D** (no subdirectory exists):
- `useLoad3d.ts`, `useLoad3dDrag.ts`, `useLoad3dViewer.ts`
**Workflow** (should be in `platform/workflow/`):
- `useWorkflowActionsMenu.ts`, `useWorkflowTemplateSelectorDialog.ts`
**Canvas/Image** (could join existing `canvas/` or `painter/`):
- `useImageCrop.ts`, `useCurveEditor.ts`
**Infrastructure** (could stay or move to `base/`):
- `useCachedRequest.ts`, `useIntersectionObserver.ts`, `useLazyPagination.ts`
Subdirectories already exist for `auth/`, `billing/`, `canvas/`, `graph/`, `maskeditor/`, `node/`, `painter/`, `queue/`, `tree/`, `element/`, `functional/`, `sidebarTabs/`, `bottomPanelTabs/` — but orphan files at root level have not been organized.
## Proposed Fix
1. Move Load3D composables into `composables/load3d/` (or `platform/load3d/`)
2. Move workflow composables into `platform/workflow/`
3. Move domain composables into existing subdirectories
4. Leave ~15 genuinely generic composables at root
## Migration Plan
- One domain cluster per PR
- Update imports via `pnpm typecheck`
## Testing Strategy
- Import path changes only — all tests pass unchanged
┆Issue is synchronized with this [Notion page](https://www.notion.so/Issue-11090-RFC-Migrate-composables-root-sprawl-40-domain-specific-files-at-root-level-33e6d73d365081d7a860fcd66e95c616) by [Unito](https://www.unito.io)
Contributor guide
Assessment
This issue has not been assessed yet.