diff --git a/browser_tests/tests/propertiesPanel/PropertiesPanelHelper.ts b/browser_tests/tests/propertiesPanel/PropertiesPanelHelper.ts index 25fa4ac4e7b..2a72ddd0ec1 100644 --- a/browser_tests/tests/propertiesPanel/PropertiesPanelHelper.ts +++ b/browser_tests/tests/propertiesPanel/PropertiesPanelHelper.ts @@ -84,7 +84,7 @@ export class PropertiesPanelHelper { } get errorsTabIcon(): Locator { - return this.root.locator('nav i[class*="lucide--octagon-alert"]') + return this.errorsTab.getByTestId('panel-tab-icon') } get viewAllSettingsButton(): Locator { diff --git a/browser_tests/tests/propertiesPanel/errorsTab.spec.ts b/browser_tests/tests/propertiesPanel/errorsTab.spec.ts index a215569ca45..aa0772ac267 100644 --- a/browser_tests/tests/propertiesPanel/errorsTab.spec.ts +++ b/browser_tests/tests/propertiesPanel/errorsTab.spec.ts @@ -19,6 +19,8 @@ test.describe('Errors tab - common', { tag: '@ui' }, () => { const panel = new PropertiesPanelHelper(comfyPage.page) await expect(panel.errorsTabIcon).toBeVisible() + // Missing resources alone are setup warnings, not blocking errors. + await expect(panel.errorsTabIcon).toHaveAccessibleName('Setup required') }) test('Should not show Errors tab when setting is disabled', async ({ diff --git a/browser_tests/tests/propertiesPanel/errorsTabModeAware.spec.ts b/browser_tests/tests/propertiesPanel/errorsTabModeAware.spec.ts index 9fb8d7f2a77..a9b336ed684 100644 --- a/browser_tests/tests/propertiesPanel/errorsTabModeAware.spec.ts +++ b/browser_tests/tests/propertiesPanel/errorsTabModeAware.spec.ts @@ -313,13 +313,13 @@ test.describe('Errors tab - Mode-aware errors', { tag: '@ui' }, () => { await expect( strip, 'The strip count is scoped to the selection, diverging from the global reference badge' - ).toContainText('1 error') + ).toContainText('1 issue') await comfyPage.canvas.click() await expect( strip, 'Deselecting swaps the always-visible strip back to the summary' - ).toContainText('2 nodes — 1 error') + ).toContainText('2 nodes — 1 item') await expectReferenceBadge(missingModelGroup, 2) }) }) @@ -421,12 +421,12 @@ test.describe('Errors tab - Mode-aware errors', { tag: '@ui' }, () => { TestIds.propertiesPanel.selectionContextStrip ) await expect(strip).toBeVisible() - await expect(strip).toContainText('1 error') + await expect(strip).toContainText('1 issue') await expect(mediaRows).toHaveCount(2) await comfyPage.canvas.click({ position: { x: 400, y: 600 } }) // Deselecting swaps the always-visible strip back to the summary - await expect(strip).toContainText('2 nodes — 2 errors') + await expect(strip).toContainText('2 nodes — 2 items') await expect(mediaRows).toHaveCount(2) }) }) @@ -451,7 +451,7 @@ test.describe('Errors tab - Mode-aware errors', { tag: '@ui' }, () => { ) await expect(missingNodeCard).toBeVisible() await expect(mediaRow).toBeVisible() - await expect(strip).toContainText('2 nodes — 2 errors') + await expect(strip).toContainText('2 nodes — 2 items') const mediaNode = await comfyPage.nodeOps.getNodeRefById('10') // The node sits near the canvas top where overlays intercept clicks @@ -463,14 +463,14 @@ test.describe('Errors tab - Mode-aware errors', { tag: '@ui' }, () => { await expect(missingNodeCard).toBeHidden() await expect(mediaRow).toBeVisible() await expect(mediaRow).toHaveAttribute('aria-current', 'true') - await expect(strip).toContainText('1 error') + await expect(strip).toContainText('1 issue') await comfyPage.canvas.click({ position: { x: 400, y: 600 } }) // Emphasis ends: the collapsed group re-expands and the strip // returns to the workflow summary await expect(missingNodeCard).toBeVisible() await expect(mediaRow).not.toHaveAttribute('aria-current', 'true') - await expect(strip).toContainText('2 nodes — 2 errors') + await expect(strip).toContainText('2 nodes — 2 items') }) }) diff --git a/packages/design-system/src/css/style.css b/packages/design-system/src/css/style.css index 3d62d10b075..1ab1e6e4e33 100644 --- a/packages/design-system/src/css/style.css +++ b/packages/design-system/src/css/style.css @@ -52,6 +52,7 @@ --color-gold-500: #fdab34; --color-gold-600: #fd9903; --color-gold-700: #c77700; + --color-gold-800: #8c6a38; --color-credit: #ddbd31; @@ -235,6 +236,8 @@ --inverted-background-hover: var(--color-charcoal-600); --warning-background: var(--color-gold-400); --warning-background-hover: var(--color-gold-500); + --warning-foreground: var(--color-gold-800); + --warning-on-background: var(--color-charcoal-800); --success-background: var(--color-jade-600); --border-default: var(--color-smoke-600); --border-subtle: var(--color-smoke-400); @@ -388,6 +391,8 @@ --inverted-background-hover: var(--color-smoke-200); --warning-background: var(--color-gold-600); --warning-background-hover: var(--color-gold-500); + --warning-foreground: var(--color-gold-600); + --warning-on-background: var(--color-charcoal-800); --success-background: var(--color-jade-600); --border-default: var(--color-charcoal-200); --border-subtle: var(--color-charcoal-300); @@ -563,6 +568,8 @@ --color-inverted-background-hover: var(--inverted-background-hover); --color-warning-background: var(--warning-background); --color-warning-background-hover: var(--warning-background-hover); + --color-warning-foreground: var(--warning-foreground); + --color-warning-on-background: var(--warning-on-background); --color-success-background: var(--success-background); --color-border-default: var(--border-default); --color-border-subtle: var(--border-subtle); diff --git a/src/components/actionbar/ComfyRunButton/ComfyQueueButton.test.ts b/src/components/actionbar/ComfyRunButton/ComfyQueueButton.test.ts index 0aa8155658e..83640e9fdb2 100644 --- a/src/components/actionbar/ComfyRunButton/ComfyQueueButton.test.ts +++ b/src/components/actionbar/ComfyRunButton/ComfyQueueButton.test.ts @@ -1,4 +1,6 @@ import { createTestingPinia } from '@pinia/testing' +import PrimeVue from 'primevue/config' +import Tooltip from 'primevue/tooltip' import { describe, expect, it, vi } from 'vitest' import { nextTick } from 'vue' import { createI18n } from 'vue-i18n' @@ -46,6 +48,7 @@ const i18n = createI18n({ en: { menu: { run: 'Run', + runOptions: 'Run options', disabledTooltip: 'Disabled tooltip', onChange: 'On Change', onChangeTooltip: 'On change tooltip', @@ -157,9 +160,9 @@ function renderQueueButton( const result = render(ComfyQueueButton, { props, global: { - plugins: [pinia, i18n], + plugins: [PrimeVue, pinia, i18n], directives: { - tooltip: () => {} + tooltip: Tooltip }, stubs } @@ -222,6 +225,21 @@ describe('ComfyQueueButton', () => { } ) + it('keeps Run enabled with the missing-resource warning and tooltip', async () => { + const { user } = renderQueueButton() + useMissingModelStore().missingModelCandidates = [missingModelCandidate] + await nextTick() + + const queueButton = screen.getByTestId('queue-button') + expect(queueButton).toBeEnabled() + + await user.hover(queueButton) + + expect(await screen.findByRole('tooltip')).toHaveTextContent( + 'Workflow contains missing resources' + ) + }) + it('keeps the play icon for non-missing errors', async () => { renderQueueButton() useExecutionErrorStore().recordPromptError({ diff --git a/src/components/actionbar/ComfyRunButton/ComfyQueueButton.vue b/src/components/actionbar/ComfyRunButton/ComfyQueueButton.vue index 467673423ed..95af4cc3b08 100644 --- a/src/components/actionbar/ComfyRunButton/ComfyQueueButton.vue +++ b/src/components/actionbar/ComfyRunButton/ComfyQueueButton.vue @@ -31,7 +31,7 @@ size="unset" :disabled="Boolean(paymentRecoveryLock)" :class="queueMenuTriggerClass" - :aria-label="t('menu.run')" + :aria-label="t('menu.runOptions')" data-testid="queue-mode-menu-trigger" > diff --git a/src/components/error/ErrorOverlay.test.ts b/src/components/error/ErrorOverlay.test.ts index be7237a9d32..67a35e7ea6d 100644 --- a/src/components/error/ErrorOverlay.test.ts +++ b/src/components/error/ErrorOverlay.test.ts @@ -134,6 +134,7 @@ describe('ErrorOverlay', () => { mockAllErrorGroups.value = [ { type: 'execution', + severity: 'error', groupKey: 'execution:KSampler', displayTitle: 'Execution failed', count: 1, @@ -171,6 +172,7 @@ describe('ErrorOverlay', () => { mockAllErrorGroups.value = [ { type: 'execution', + severity: 'error', groupKey: 'execution:KSampler', displayTitle: 'Execution failed', count: 1, diff --git a/src/components/error/useErrorOverlayState.test.ts b/src/components/error/useErrorOverlayState.test.ts index deae2a183aa..8dfaa2b63d0 100644 --- a/src/components/error/useErrorOverlayState.test.ts +++ b/src/components/error/useErrorOverlayState.test.ts @@ -115,6 +115,7 @@ describe('useErrorOverlayState', () => { mockAllErrorGroups.value = [ { type: 'execution', + severity: 'error', groupKey: 'execution:KSampler', displayTitle: 'Execution failed', count: 1, @@ -146,6 +147,7 @@ describe('useErrorOverlayState', () => { mockAllErrorGroups.value = [ { type: 'execution', + severity: 'error', groupKey: 'execution:KSampler', displayTitle: 'Required input is missing', count: 1, @@ -186,6 +188,7 @@ describe('useErrorOverlayState', () => { mockAllErrorGroups.value = [ { type: 'execution', + severity: 'error', groupKey: 'execution:KSampler', displayTitle: 'Friendly validation title', count: 1, @@ -225,6 +228,7 @@ describe('useErrorOverlayState', () => { mockAllErrorGroups.value = [ { type: 'execution', + severity: 'error', groupKey: 'execution:KSampler', displayTitle: 'Generation failed', count: 1, @@ -297,6 +301,7 @@ describe('useErrorOverlayState', () => { mockAllErrorGroups.value = [ { type: 'missing_media', + severity: 'missing', groupKey: 'missing_media', displayTitle: 'Media input missing', displayMessage: 'A required media input has no file selected.', @@ -357,6 +362,7 @@ describe('useErrorOverlayState', () => { mockAllErrorGroups.value = [ { type: 'missing_model', + severity: 'missing', groupKey: 'missing_model', displayTitle: 'Missing Models', displayMessage: 'Import a model, or open the node to replace it.', @@ -382,6 +388,7 @@ describe('useErrorOverlayState', () => { mockAllErrorGroups.value = [ { type: 'execution', + severity: 'error', groupKey: 'execution:required_input_missing', displayTitle: 'Missing connection', displayMessage: 'Required input slots have no connection feeding them.', @@ -449,6 +456,7 @@ describe('useErrorOverlayState', () => { mockAllErrorGroups.value = [ { type: 'missing_model', + severity: 'missing', groupKey: 'missing_model', displayTitle: 'Missing Models', displayMessage: 'Import a model, or open the node to replace it.', @@ -488,6 +496,7 @@ describe('useErrorOverlayState', () => { mockAllErrorGroups.value = [ { type: 'execution', + severity: 'error', groupKey: 'execution:KSampler', displayTitle: 'Execution failed', displayMessage: 'First group message', @@ -503,6 +512,7 @@ describe('useErrorOverlayState', () => { }, { type: 'execution', + severity: 'error', groupKey: 'execution:CLIPTextEncode', displayTitle: 'Invalid CLIP input', displayMessage: 'Second group message', diff --git a/src/components/rightSidePanel/RightSidePanel.vue b/src/components/rightSidePanel/RightSidePanel.vue index 342aee2c73d..fa64615d2e4 100644 --- a/src/components/rightSidePanel/RightSidePanel.vue +++ b/src/components/rightSidePanel/RightSidePanel.vue @@ -41,6 +41,7 @@ import { } from './shared' import SubgraphEditor from './subgraph/SubgraphEditor.vue' import TabErrors from './errors/TabErrors.vue' +import { useHasBlockingError } from './errors/useHasBlockingError' const canvasStore = useCanvasStore() const executionErrorStore = useExecutionErrorStore() @@ -124,7 +125,10 @@ function handleTabChange(newTab: RightSidePanelTab) { type RightSidePanelTabList = Array<{ label: () => string value: RightSidePanelTab - icon?: string + icon?: { + className: string + label: () => string + } }> const hasDirectNodeError = computed(() => @@ -189,6 +193,8 @@ const hasPendingErrorScanSelected = computed(() => { }) }) +const hasBlockingError = useHasBlockingError() + const tabs = computed(() => { const list: RightSidePanelTabList = [] @@ -200,7 +206,24 @@ const tabs = computed(() => { list.push({ label: () => t('rightSidePanel.errors'), value: 'errors', - icon: 'icon-[lucide--octagon-alert] bg-node-stroke-error ml-1' + // No icon while the tab is only retained by a pending scan: with both + // severities absent there is no state for it to describe. + icon: hasRelevantErrors.value + ? { + className: cn( + 'ml-1', + hasBlockingError.value + ? 'icon-[lucide--octagon-alert] bg-node-stroke-error' + : 'icon-[lucide--triangle-alert] bg-warning-foreground' + ), + label: () => + t( + hasBlockingError.value + ? 'rightSidePanel.severityErrorLabel' + : 'rightSidePanel.severitySetupLabel' + ) + } + : undefined }) } @@ -382,8 +405,10 @@ function handleTitleCancel() { {{ tab.label() }}