mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-05-12 00:42:03 +00:00
## Summary Refactor essentials tab node organization to eliminate duplicated logic and restrict essentials to core nodes only. ## Changes - **What**: - Extract `resolveEssentialsCategory` to centralize category resolution (was duplicated between filter and pathExtractor). - Add `isCoreNode` guard so third-party nodes never appear in essentials. - Replace `indexOf`-based sorting with precomputed rank maps (`ESSENTIALS_CATEGORY_RANK`, `ESSENTIALS_NODE_RANK`). <img width="589" height="769" alt="image" src="https://github.com/user-attachments/assets/66f41f35-aef5-4e12-97d5-0f33baf0ac45" /> ## Review Focus - The `isCoreNode` guard in `resolveEssentialsCategory` — ensures only core nodes can appear in essentials even if a custom node sets `essentials_category`. - Rank map precomputation vs previous `indexOf` — functionally equivalent but O(1) lookup. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-10433-refactor-clean-up-essentials-node-organization-logic-32d6d73d36508193a4d1f7f9c18fcef7) by [Unito](https://www.unito.io) Co-authored-by: Amp <amp@ampcode.com>