diff --git a/browser_tests/tests/dialog.spec.ts b/browser_tests/tests/dialog.spec.ts index f70a527e3d..5bbc11fca6 100644 --- a/browser_tests/tests/dialog.spec.ts +++ b/browser_tests/tests/dialog.spec.ts @@ -61,16 +61,21 @@ test('Does not report warning on undo/redo', async ({ comfyPage }) => { }) test.describe('Execution error', () => { + test.beforeEach(async ({ comfyPage }) => { + await comfyPage.settings.setSetting('Comfy.UseNewMenu', 'Top') + await comfyPage.setup() + }) + test('Should display an error message when an execution error occurs', async ({ comfyPage }) => { await comfyPage.workflow.loadWorkflow('nodes/execution_error') - await comfyPage.queueButton.click() + await comfyPage.command.executeCommand('Comfy.QueuePrompt') await comfyPage.nextFrame() - // Wait for the element with the .comfy-execution-error selector to be visible - const executionError = comfyPage.page.locator('.comfy-error-report') - await expect(executionError).toBeVisible() + // Wait for the error overlay to be visible + const errorOverlay = comfyPage.page.locator('[data-testid="error-overlay"]') + await expect(errorOverlay).toBeVisible() }) }) diff --git a/browser_tests/tests/execution.spec.ts b/browser_tests/tests/execution.spec.ts index 1c8b68269f..174802f472 100644 --- a/browser_tests/tests/execution.spec.ts +++ b/browser_tests/tests/execution.spec.ts @@ -7,22 +7,29 @@ test.beforeEach(async ({ comfyPage }) => { }) test.describe('Execution', { tag: ['@smoke', '@workflow'] }, () => { + test.beforeEach(async ({ comfyPage }) => { + await comfyPage.settings.setSetting('Comfy.UseNewMenu', 'Top') + await comfyPage.setup() + }) + test( 'Report error on unconnected slot', { tag: '@screenshot' }, async ({ comfyPage }) => { await comfyPage.canvasOps.disconnectEdge() - await comfyPage.canvasOps.clickEmptySpace() + await comfyPage.page.keyboard.press('Escape') await comfyPage.command.executeCommand('Comfy.QueuePrompt') - await expect(comfyPage.page.locator('.comfy-error-report')).toBeVisible() + await expect( + comfyPage.page.locator('[data-testid="error-overlay"]') + ).toBeVisible() await comfyPage.page - .locator('.p-dialog') - .getByRole('button', { name: 'Close' }) + .locator('[data-testid="error-overlay"]') + .getByRole('button', { name: 'Dismiss' }) .click() - await comfyPage.page.locator('.comfy-error-report').waitFor({ - state: 'hidden' - }) + await comfyPage.page + .locator('[data-testid="error-overlay"]') + .waitFor({ state: 'hidden' }) await expect(comfyPage.canvas).toHaveScreenshot( 'execution-error-unconnected-slot.png' ) diff --git a/browser_tests/tests/execution.spec.ts-snapshots/execution-error-unconnected-slot-chromium-linux.png b/browser_tests/tests/execution.spec.ts-snapshots/execution-error-unconnected-slot-chromium-linux.png index 32b9df704c..1a507af2ca 100644 Binary files a/browser_tests/tests/execution.spec.ts-snapshots/execution-error-unconnected-slot-chromium-linux.png and b/browser_tests/tests/execution.spec.ts-snapshots/execution-error-unconnected-slot-chromium-linux.png differ diff --git a/browser_tests/tests/mobileBaseline.spec.ts-snapshots/mobile-default-workflow-mobile-chrome-linux.png b/browser_tests/tests/mobileBaseline.spec.ts-snapshots/mobile-default-workflow-mobile-chrome-linux.png index c0276b2ac6..5e65c129d7 100644 Binary files a/browser_tests/tests/mobileBaseline.spec.ts-snapshots/mobile-default-workflow-mobile-chrome-linux.png and b/browser_tests/tests/mobileBaseline.spec.ts-snapshots/mobile-default-workflow-mobile-chrome-linux.png differ diff --git a/browser_tests/tests/selectionToolbox.spec.ts-snapshots/selection-toolbox-multiple-nodes-border-chromium-linux.png b/browser_tests/tests/selectionToolbox.spec.ts-snapshots/selection-toolbox-multiple-nodes-border-chromium-linux.png index 93bcf0b1bb..1528eba436 100644 Binary files a/browser_tests/tests/selectionToolbox.spec.ts-snapshots/selection-toolbox-multiple-nodes-border-chromium-linux.png and b/browser_tests/tests/selectionToolbox.spec.ts-snapshots/selection-toolbox-multiple-nodes-border-chromium-linux.png differ diff --git a/src/components/TopMenuSection.vue b/src/components/TopMenuSection.vue index a55be7182f..30b39c75c3 100644 --- a/src/components/TopMenuSection.vue +++ b/src/components/TopMenuSection.vue @@ -110,6 +110,7 @@ + + +
+ +
+
+ + + diff --git a/src/components/rightSidePanel/RightSidePanel.vue b/src/components/rightSidePanel/RightSidePanel.vue index 3b36a62996..1ef8441aa7 100644 --- a/src/components/rightSidePanel/RightSidePanel.vue +++ b/src/components/rightSidePanel/RightSidePanel.vue @@ -19,8 +19,8 @@ import { useRightSidePanelStore } from '@/stores/workspace/rightSidePanelStore' import type { RightSidePanelTab } from '@/stores/workspace/rightSidePanelStore' import { resolveNodeDisplayName } from '@/utils/nodeTitleUtil' import { cn } from '@/utils/tailwindUtil' +import { isGroupNode } from '@/utils/executableGroupNodeDto' -import TabError from './TabError.vue' import TabInfo from './info/TabInfo.vue' import TabGlobalParameters from './parameters/TabGlobalParameters.vue' import TabNodes from './parameters/TabNodes.vue' @@ -41,7 +41,7 @@ const rightSidePanelStore = useRightSidePanelStore() const settingStore = useSettingStore() const { t } = useI18n() -const { hasAnyError } = storeToRefs(executionStore) +const { hasAnyError, allErrorExecutionIds } = storeToRefs(executionStore) const { findParentGroup } = useGraphHierarchy() @@ -96,30 +96,31 @@ type RightSidePanelTabList = Array<{ icon?: string }> -//FIXME all errors if nothing selected? -const selectedNodeErrors = computed(() => - selectedNodes.value - .map((node) => executionStore.getNodeErrors(`${node.id}`)) - .filter((nodeError) => !!nodeError) +const hasDirectNodeError = computed(() => + selectedNodes.value.some((node) => + executionStore.activeGraphErrorNodeIds.has(String(node.id)) + ) ) +const hasContainerInternalError = computed(() => { + if (allErrorExecutionIds.value.length === 0) return false + return selectedNodes.value.some((node) => { + if (!(node instanceof SubgraphNode || isGroupNode(node))) return false + return executionStore.hasInternalErrorForNode(node.id) + }) +}) + +const hasRelevantErrors = computed(() => { + if (!hasSelection.value) return hasAnyError.value + return hasDirectNodeError.value || hasContainerInternalError.value +}) + const tabs = computed(() => { const list: RightSidePanelTabList = [] - if ( - selectedNodeErrors.value.length && - settingStore.get('Comfy.RightSidePanel.ShowErrorsTab') - ) { - list.push({ - label: () => t('g.error'), - value: 'error', - icon: 'icon-[lucide--octagon-alert] bg-node-stroke-error ml-1' - }) - } if ( - hasAnyError.value && - !hasSelection.value && - settingStore.get('Comfy.RightSidePanel.ShowErrorsTab') + settingStore.get('Comfy.RightSidePanel.ShowErrorsTab') && + hasRelevantErrors.value ) { list.push({ label: () => t('rightSidePanel.errors'), @@ -315,9 +316,9 @@ function handleProxyWidgetsUpdate(value: ProxyWidgetsProperty) {
-