fix(node-search): add API Nodes category to v2 search#9257
fix(node-search): add API Nodes category to v2 search#9257Ni-zav wants to merge 2 commits intoComfy-Org:mainfrom
Conversation
📝 WalkthroughWalkthroughA new "API Nodes" category is introduced to the node search functionality. Changes include conditional rendering of the API Nodes category in the sidebar, filtering logic to display only nodes with the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🎭 Playwright: ⏳ Running... |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/components/searchbox/v2/__test__/testUtils.ts (1)
42-42: Consider using camelCase for i18n key consistency.The key
'API Nodes'uses a space, while other keys in this object use camelCase (e.g.,mostRelevant,filterBy,noResults). For consistency, consider renaming toapiNodes.This would require updating the reference in
NodeSearchCategorySidebar.vuefromt('g.API Nodes')tot('g.apiNodes').♻️ Suggested change
- 'API Nodes': 'API Nodes', + apiNodes: 'API Nodes',🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/components/searchbox/v2/__test__/testUtils.ts` at line 42, Rename the i18n key 'API Nodes' in the translations object in testUtils.ts to use camelCase (apiNodes) and update all usages to match; specifically change the key in the object and update the lookup in NodeSearchCategorySidebar.vue from t('g.API Nodes') to t('g.apiNodes') so keys are consistent with others like mostRelevant/filterBy/noResults.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@src/components/searchbox/v2/__test__/testUtils.ts`:
- Line 42: Rename the i18n key 'API Nodes' in the translations object in
testUtils.ts to use camelCase (apiNodes) and update all usages to match;
specifically change the key in the object and update the lookup in
NodeSearchCategorySidebar.vue from t('g.API Nodes') to t('g.apiNodes') so keys
are consistent with others like mostRelevant/filterBy/noResults.
ℹ️ Review info
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
src/components/searchbox/v2/NodeSearchCategorySidebar.test.tssrc/components/searchbox/v2/NodeSearchCategorySidebar.vuesrc/components/searchbox/v2/NodeSearchContent.test.tssrc/components/searchbox/v2/NodeSearchContent.vuesrc/components/searchbox/v2/__test__/testUtils.ts

Summary
API Nodessource category to V2 Node Search sidebar when API nodes are present.API Nodesshows only nodes withapi_node = true.Why
The bounty list includes a task where API Nodes do not appear in the Node Search Bar. This change provides an explicit and discoverable path in V2 node search.
Changes
src/components/searchbox/v2/NodeSearchCategorySidebar.vuehasApiNodescomputed.apicategory entry (g.API Nodes) when API nodes exist.src/components/searchbox/v2/NodeSearchContent.vuecase 'api'filter branch (n.api_node).src/components/searchbox/v2/NodeSearchCategorySidebar.test.tssrc/components/searchbox/v2/NodeSearchContent.test.tssrc/components/searchbox/v2/__test__/testUtils.tsValidation Notes
┆Issue is synchronized with this Notion page by Unito