mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-01 13:59:54 +00:00
## Summary PRD: https://www.notion.so/comfy-org/Implement-Move-search-config-to-templates-repo-for-template-owner-adjustability-2c76d73d365081ad81c4ed33332eda09 Move search config to templates repo for template owner adjustability ## Changes - **What**: - Made `fuseOptions` reactive in `useTemplateFiltering` composable to support dynamic updates - Added `getFuseOptions()` API method to fetch Fuse.js configuration from `/templates/fuse_options.json` - Added `loadFuseOptions()` function to `useTemplateFiltering` that fetches and applies server-provided options - Removed unused `templateFuse` computed property from `workflowTemplatesStore` - Added comprehensive unit tests covering success, null response, error handling, and Fuse instance recreation scenarios - **Breaking**: None - **Dependencies**: None (uses existing `fuse.js` and `axios` dependencies) ## Review Focus - Verify that the API endpoint path `/templates/fuse_options.json` is correct and accessible - Confirm that the reactive `fuseOptions` properly triggers Fuse instance recreation when updated - Check that error handling gracefully falls back to default options when server fetch fails - Ensure the watch on `fuseOptions` is necessary or can be removed (currently just recreates Fuse via computed) - Review test coverage to ensure all edge cases are handled ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-7822-feat-add-dynamic-Fuse-js-options-loading-for-template-filtering-2db6d73d365081828103d8ee70844b2e) by [Unito](https://www.unito.io) --------- Co-authored-by: GitHub Action <action@github.com>