Comfy-Org / Comfy-Org/ComfyUI_frontend
[RFC] Consolidate node definition modules into `platform/nodeCatalog/`
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 699
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 490
Description
## Problem
The "node definition" concept is split across 6+ files in 3 directories:
- `stores/nodeDefStore.ts` (569 lines)
- `services/nodeSearchService.ts` (110 lines)
- `services/nodeOrganizationService.ts` (413 lines)
- `services/nodeHelpService.ts` (84 lines)
- `platform/nodeReplacement/nodeReplacementStore.ts` (50 lines)
- `platform/nodeReplacement/missingNodesErrorStore.ts` (125 lines)
- `composables/useNodeHelpContent.ts` (79 lines)
All operate on the same `ComfyNodeDef` type. Understanding the node catalog concept requires bouncing between `stores/`, `services/`, `platform/nodeReplacement/`, and `composables/`.
## Proposed Deepening
Consolidate into `platform/nodeCatalog/` with a unified public interface:
```
platform/nodeCatalog/
stores/nodeDefStore.ts
services/nodeSearchService.ts
services/nodeOrganizationService.ts
services/nodeHelpService.ts
replacement/nodeReplacementStore.ts
replacement/missingNodesErrorStore.ts
composables/useNodeHelpContent.ts
```
Expose a single entry point (`platform/nodeCatalog/index.ts`) with the key exports. Internal files remain as implementation details.
## Migration Plan
1. Move files into the new directory structure in a single PR
2. Update all import paths
3. No behavioral changes
## Testing Strategy
- `pnpm typecheck` and `pnpm lint` pass
- All existing tests pass (only import paths change)
┆Issue is synchronized with this [Notion page](https://www.notion.so/Issue-11020-RFC-Consolidate-node-definition-modules-into-platform-nodeCatalog-33e6d73d365081c48f34f3081e3d440b) by [Unito](https://www.unito.io)
Contributor guide
Assessment
This issue has not been assessed yet.