-
Notifications
You must be signed in to change notification settings - Fork 530
V2 Node Search (+ hidden Node Library changes) #8987
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
9058d3e
feat: implement NodeLibrarySidebarTabV2 with Reka UI components
Yourz f5b0b70
feat: add main_category field and group nodes by category
Yourz 2ed895c
feat: previewCard and BadgPill and api node logo
Yourz 3f07dd2
fix: preview card, icon
Yourz 37477b2
fix: ci
Yourz bde6678
fix: reviews
Yourz f80b87b
fix: reviews for coderabbit
Yourz 70b514a
feat: drop nodes when click the canvas
Yourz 98532a8
feat: api nodes icon
Yourz e637471
fix: ci and badge
Yourz 91ad183
feat: new drag preview
Yourz 1aa10e7
fix: coderabbit reviews
Yourz 1a94e34
fix: coderabbit reviews
Yourz 594c249
fix: coderabbit reviews
Yourz 193d482
fix: coderabbit reviews
Yourz 99d31a7
fix: update for reviews
Yourz 41d4ada
fix: update icons
Yourz d78e4b9
feat: support drag and drop creation
Yourz 34dd961
feat: essentials tab
Yourz 9a4aff5
fix: ci
Yourz a4975a0
[automated] Update test expectations
invalid-email-address 824f8bb
fix: improve NodePreviewCard styling and drag-drop reliability
Yourz 7a4f7dc
fix: update for design reviews
Yourz 726ae23
fix: add missing DEFAULT_SORTING_ID to test mock
Yourz fedce61
fix: update for design reviews, and add setting toggle to switch node…
Yourz 1b16b0f
fix: unit tests
Yourz b52785a
fix: update for design reviews
Yourz 4754be7
fix: unit tests
Yourz def0def
fix: design reviews
Yourz cc85df9
fix: design reviews
Yourz 7d00323
fix: unit tests
Yourz c8f1e03
[automated] Apply ESLint and Oxfmt fixes
actions-user d85db63
new v2 node search box with categories - input/output/source filters …
pythongosssss 2e3a775
review feedback
pythongosssss ca86212
design feedback
pythongosssss f88a426
add essentials
pythongosssss 663efef
Add text ticker overflow description
pythongosssss 7d73f01
Add text ticker
pythongosssss c545c9d
tweaks
pythongosssss 99d6f87
set v2 search as default
pythongosssss c44155b
hide node library setting
pythongosssss a597050
update tests to use v1 search
pythongosssss 3d2699c
fix tests & rabbit
pythongosssss 67af441
fix tests
pythongosssss 615f572
fix test
pythongosssss ab1b72a
[automated] Apply ESLint and Oxfmt fixes
actions-user bad9642
Review fixes for V2 Node Search (#8987) (#9001)
christian-byrne 1d6b743
fix: resolve merge conflict with main (draftTypes.ts deleted on both …
christian-byrne File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -52,7 +52,8 @@ | |
| "reference", | ||
| "plugin", | ||
| "custom-variant", | ||
| "utility" | ||
| "utility", | ||
| "source" | ||
| ] | ||
| } | ||
| ], | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| import type { Locator, Page } from '@playwright/test' | ||
|
|
||
| import type { ComfyPage } from '../ComfyPage' | ||
|
|
||
| export class ComfyNodeSearchBoxV2 { | ||
| readonly dialog: Locator | ||
| readonly input: Locator | ||
| readonly results: Locator | ||
| readonly filterOptions: Locator | ||
|
|
||
| constructor(readonly page: Page) { | ||
| this.dialog = page.getByRole('search') | ||
| this.input = this.dialog.locator('input[type="text"]') | ||
| this.results = this.dialog.getByTestId('result-item') | ||
| this.filterOptions = this.dialog.getByTestId('filter-option') | ||
| } | ||
|
|
||
| categoryButton(categoryId: string): Locator { | ||
| return this.dialog.getByTestId(`category-${categoryId}`) | ||
| } | ||
|
|
||
| filterBarButton(name: string): Locator { | ||
| return this.dialog.getByRole('button', { name }) | ||
| } | ||
|
|
||
| async reload(comfyPage: ComfyPage) { | ||
| await comfyPage.settings.setSetting('Comfy.NodeSearchBoxImpl', 'default') | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,149 @@ | ||
| import { | ||
| comfyExpect as expect, | ||
| comfyPageFixture as test | ||
| } from '../fixtures/ComfyPage' | ||
|
|
||
| test.describe('Node search box V2', { tag: '@node' }, () => { | ||
| test.beforeEach(async ({ comfyPage }) => { | ||
| await comfyPage.settings.setSetting('Comfy.UseNewMenu', 'Disabled') | ||
| await comfyPage.settings.setSetting('Comfy.NodeSearchBoxImpl', 'default') | ||
| await comfyPage.settings.setSetting( | ||
| 'Comfy.LinkRelease.Action', | ||
| 'search box' | ||
| ) | ||
| await comfyPage.settings.setSetting( | ||
| 'Comfy.LinkRelease.ActionShift', | ||
| 'search box' | ||
| ) | ||
| await comfyPage.searchBoxV2.reload(comfyPage) | ||
| }) | ||
|
|
||
| test('Can open search and add node', async ({ comfyPage }) => { | ||
| const { searchBoxV2 } = comfyPage | ||
| const initialCount = await comfyPage.nodeOps.getGraphNodesCount() | ||
|
|
||
| await comfyPage.canvasOps.doubleClick() | ||
| await expect(searchBoxV2.input).toBeVisible() | ||
|
|
||
| await searchBoxV2.input.fill('KSampler') | ||
| await expect(searchBoxV2.results.first()).toBeVisible() | ||
|
|
||
| await comfyPage.page.keyboard.press('Enter') | ||
| await expect(searchBoxV2.input).not.toBeVisible() | ||
|
|
||
| const newCount = await comfyPage.nodeOps.getGraphNodesCount() | ||
| expect(newCount).toBe(initialCount + 1) | ||
| }) | ||
|
|
||
| test('Can add first default result with Enter', async ({ comfyPage }) => { | ||
| const { searchBoxV2 } = comfyPage | ||
| const initialCount = await comfyPage.nodeOps.getGraphNodesCount() | ||
|
|
||
| await comfyPage.canvasOps.doubleClick() | ||
| await expect(searchBoxV2.input).toBeVisible() | ||
|
|
||
| // Default results should be visible without typing | ||
| await expect(searchBoxV2.results.first()).toBeVisible() | ||
|
|
||
| // Enter should add the first (selected) result | ||
| await comfyPage.page.keyboard.press('Enter') | ||
| await expect(searchBoxV2.input).not.toBeVisible() | ||
|
|
||
| const newCount = await comfyPage.nodeOps.getGraphNodesCount() | ||
| expect(newCount).toBe(initialCount + 1) | ||
| }) | ||
|
|
||
| test.describe('Category navigation', () => { | ||
| test('Favorites shows only bookmarked nodes', async ({ comfyPage }) => { | ||
| const { searchBoxV2 } = comfyPage | ||
| await comfyPage.settings.setSetting('Comfy.NodeLibrary.Bookmarks.V2', [ | ||
| 'KSampler' | ||
| ]) | ||
| await searchBoxV2.reload(comfyPage) | ||
|
|
||
| await comfyPage.canvasOps.doubleClick() | ||
| await expect(searchBoxV2.input).toBeVisible() | ||
|
|
||
| await searchBoxV2.categoryButton('favorites').click() | ||
|
|
||
| await expect(searchBoxV2.results).toHaveCount(1) | ||
| await expect(searchBoxV2.results.first()).toContainText('KSampler') | ||
| }) | ||
|
|
||
| test('Category filters results to matching nodes', async ({ | ||
| comfyPage | ||
| }) => { | ||
| const { searchBoxV2 } = comfyPage | ||
|
|
||
| await comfyPage.canvasOps.doubleClick() | ||
| await expect(searchBoxV2.input).toBeVisible() | ||
|
|
||
| await searchBoxV2.categoryButton('sampling').click() | ||
|
|
||
| await expect(searchBoxV2.results.first()).toBeVisible() | ||
| const count = await searchBoxV2.results.count() | ||
| expect(count).toBeGreaterThan(0) | ||
| }) | ||
| }) | ||
|
|
||
| test.describe('Filter workflow', () => { | ||
| test('Can filter by input type via filter bar', async ({ comfyPage }) => { | ||
| const { searchBoxV2 } = comfyPage | ||
|
|
||
| await comfyPage.canvasOps.doubleClick() | ||
| await expect(searchBoxV2.input).toBeVisible() | ||
|
|
||
| // Click "Input" filter chip in the filter bar | ||
| await searchBoxV2.filterBarButton('Input').click() | ||
|
|
||
| // Filter options should appear | ||
| await expect(searchBoxV2.filterOptions.first()).toBeVisible() | ||
|
|
||
| // Type to narrow and select MODEL | ||
| await searchBoxV2.input.fill('MODEL') | ||
| await searchBoxV2.filterOptions | ||
| .filter({ hasText: 'MODEL' }) | ||
| .first() | ||
| .click() | ||
|
|
||
| // Filter chip should appear and results should be filtered | ||
| await expect( | ||
| searchBoxV2.dialog.getByText('Input:', { exact: false }).locator('..') | ||
| ).toContainText('MODEL') | ||
| await expect(searchBoxV2.results.first()).toBeVisible() | ||
| }) | ||
| }) | ||
|
|
||
| test.describe('Keyboard navigation', () => { | ||
| test('Can navigate and select with keyboard', async ({ comfyPage }) => { | ||
| const { searchBoxV2 } = comfyPage | ||
| const initialCount = await comfyPage.nodeOps.getGraphNodesCount() | ||
|
|
||
| await comfyPage.canvasOps.doubleClick() | ||
| await expect(searchBoxV2.input).toBeVisible() | ||
|
|
||
| await searchBoxV2.input.fill('KSampler') | ||
| const results = searchBoxV2.results | ||
| await expect(results.first()).toBeVisible() | ||
|
|
||
| // First result selected by default | ||
| await expect(results.first()).toHaveAttribute('aria-selected', 'true') | ||
|
|
||
| // ArrowDown moves selection | ||
| await comfyPage.page.keyboard.press('ArrowDown') | ||
| await expect(results.nth(1)).toHaveAttribute('aria-selected', 'true') | ||
| await expect(results.first()).toHaveAttribute('aria-selected', 'false') | ||
|
|
||
| // ArrowUp moves back | ||
| await comfyPage.page.keyboard.press('ArrowUp') | ||
| await expect(results.first()).toHaveAttribute('aria-selected', 'true') | ||
|
|
||
| // Enter selects and adds node | ||
| await comfyPage.page.keyboard.press('Enter') | ||
| await expect(searchBoxV2.input).not.toBeVisible() | ||
|
|
||
| const newCount = await comfyPage.nodeOps.getGraphNodesCount() | ||
| expect(newCount).toBe(initialCount + 1) | ||
| }) | ||
| }) | ||
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
-5.42 KB
(94%)
...ClickMenu.spec.ts-snapshots/right-click-node-collapsed-badge-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: Comfy-Org/ComfyUI_frontend
Length of output: 2835
🏁 Script executed:
Repository: Comfy-Org/ComfyUI_frontend
Length of output: 2099
🏁 Script executed:
Repository: Comfy-Org/ComfyUI_frontend
Length of output: 4247
🏁 Script executed:
Repository: Comfy-Org/ComfyUI_frontend
Length of output: 4504
🏁 Script executed:
Repository: Comfy-Org/ComfyUI_frontend
Length of output: 1268
🏁 Script executed:
Repository: Comfy-Org/ComfyUI_frontend
Length of output: 964
🏁 Script executed:
Repository: Comfy-Org/ComfyUI_frontend
Length of output: 1083
🏁 Script executed:
Repository: Comfy-Org/ComfyUI_frontend
Length of output: 1008
🏁 Script executed:
Repository: Comfy-Org/ComfyUI_frontend
Length of output: 1852
🏁 Script executed:
Repository: Comfy-Org/ComfyUI_frontend
Length of output: 795
🏁 Script executed:
Repository: Comfy-Org/ComfyUI_frontend
Length of output: 1815
Settings leak: test sets
NodeSearchBoxImplto'v1 (legacy)'without resetting inbeforeEach.This test is currently the last one in the describe block, so there's no immediate impact. However, since
loadWorkflow()doesn't reload the page (it only uploads JSON and callsnextFrame()), the setting persists in app state. If tests are added after this one, they will silently inherit'v1 (legacy)'instead of the default'v2'.Add an explicit reset to the outer
beforeEachto prevent accidental test-order dependency:Proposed safeguard
test.beforeEach(async ({ comfyPage }) => { await comfyPage.settings.setSetting('Comfy.UseNewMenu', 'Top') await comfyPage.settings.setSetting('Comfy.VueNodes.Enabled', true) + await comfyPage.settings.setSetting('Comfy.NodeSearchBoxImpl', 'v2') await comfyPage.workflow.loadWorkflow('vueNodes/simple-triple') await comfyPage.vueNodes.waitForNodes() await fitToViewInstant(comfyPage) })🤖 Prompt for AI Agents