From 219d86db2c06d93624e65b1eb628d81f6923e802 Mon Sep 17 00:00:00 2001 From: Christian Byrne Date: Thu, 22 Jan 2026 18:06:05 -0800 Subject: [PATCH] feat: Add search_aliases to node search (#8223) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds `search_aliases` to Fuse.js search keys, enabling users to find nodes by alternative names. https://github.com/user-attachments/assets/6bde3e5d-29c7-4cb0-b102-e600a92c7019 ## Changes - Add `search_aliases` to Fuse.js keys in `nodeSearchService.ts` - Add type definition for `search_aliases` field in `nodeDefSchema.ts` **Depends on:** Comfy-Org/ComfyUI#12010 ## Related PRs - **Backend:** Comfy-Org/ComfyUI#12010, https://github.com/Comfy-Org/ComfyUI/pull/12035/ - **Adding aliases**: - https://github.com/Comfy-Org/ComfyUI/pull/12016 - https://github.com/Comfy-Org/ComfyUI/pull/12017 - https://github.com/Comfy-Org/ComfyUI/pull/12018 - https://github.com/Comfy-Org/ComfyUI/pull/12019 - **Docs:** https://github.com/Comfy-Org/docs/pull/729 ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8223-feat-Add-search_aliases-to-node-search-2ef6d73d365081d89bcccffb33659a88) by [Unito](https://www.unito.io) Co-authored-by: Amp --- src/schemas/nodeDefSchema.ts | 5 +++++ src/services/nodeSearchService.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/schemas/nodeDefSchema.ts b/src/schemas/nodeDefSchema.ts index 25f23697a..0a03388cd 100644 --- a/src/schemas/nodeDefSchema.ts +++ b/src/schemas/nodeDefSchema.ts @@ -269,6 +269,11 @@ export const zComfyNodeDef = z.object({ * Keys are 'required', 'optional', etc., values are arrays of input names. */ input_order: z.record(z.array(z.string())).optional(), + /** + * Alternative names for search. Useful for synonyms, abbreviations, + * or old names after renaming a node. + */ + search_aliases: z.array(z.string()).optional(), /** * Price badge definition for API nodes. * Contains a JSONata expression to calculate pricing based on widget values diff --git a/src/services/nodeSearchService.ts b/src/services/nodeSearchService.ts index d54c97e1f..75dccf268 100644 --- a/src/services/nodeSearchService.ts +++ b/src/services/nodeSearchService.ts @@ -14,7 +14,7 @@ export class NodeSearchService { constructor(data: ComfyNodeDefImpl[]) { this.nodeFuseSearch = new FuseSearch(data, { fuseOptions: { - keys: ['name', 'display_name'], + keys: ['name', 'display_name', 'search_aliases'], includeScore: true, threshold: 0.3, shouldSort: false,