Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
7664203
feat: add error state management for prompt-level errors
jaeone94 Feb 11, 2026
de6f566
feat: add error tab components to right side panel
jaeone94 Feb 11, 2026
469cf80
feat: integrate error tab with existing UI components
jaeone94 Feb 11, 2026
4d9e49c
test: add unit tests and stories for error tab components
jaeone94 Feb 11, 2026
65c0c22
fix: remove unused exports to pass knip check
jaeone94 Feb 11, 2026
3a1b105
refactor: address code review feedback
jaeone94 Feb 11, 2026
fdb93ba
fix(SectionWidgets): restrict See Error button to workflow overview
jaeone94 Feb 11, 2026
ffe4148
refactor: address second round of code review feedback
jaeone94 Feb 11, 2026
321578d
refactor: address third round of code review feedback
jaeone94 Feb 12, 2026
428e75f
style: reorder template before script in error tab components
jaeone94 Feb 12, 2026
e0b89a9
feat: auto-expand relevant error group on See Error navigation
jaeone94 Feb 12, 2026
1be63d2
Merge branch 'main' into feat/errors-tab-panel
jaeone94 Feb 12, 2026
f9cecff
style: simplify padding utility in error tab footer
jaeone94 Feb 13, 2026
3a844a3
Merge branch 'feat/errors-tab-panel' of https://github.com/jaeone94/C…
jaeone94 Feb 13, 2026
3bbb3f8
Merge branch 'main' into feat/errors-tab-panel
jaeone94 Feb 13, 2026
3fa2e92
feat: add experimental setting to toggle errors tab in side panel
jaeone94 Feb 14, 2026
baa52a7
Merge branch 'main' into feat/errors-tab-panel
jaeone94 Feb 15, 2026
e58c3e4
Merge branch 'main' into feat/errors-tab-panel
jaeone94 Feb 15, 2026
d414f11
Merge branch 'main' into feat/errors-tab-panel
jaeone94 Feb 16, 2026
b1ec77d
Merge branch 'main' into feat/errors-tab-panel
jaeone94 Feb 17, 2026
b2208ef
refactor(errors): extract error grouping logic into composables and a…
jaeone94 Feb 18, 2026
c37898f
refactor(errors): address additional feedback
jaeone94 Feb 18, 2026
d3bec55
Merge branch 'main' into feat/errors-tab-panel
jaeone94 Feb 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/components/TopMenuSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@

<div
ref="actionbarContainerRef"
class="actionbar-container relative pointer-events-auto flex gap-2 h-12 items-center rounded-lg border border-interface-stroke bg-comfy-menu-bg px-2 shadow-interface"
:class="cn(
'actionbar-container relative pointer-events-auto flex gap-2 h-12 items-center rounded-lg border bg-comfy-menu-bg px-2 shadow-interface',
hasPromptError ? 'border-destructive-background-hover' : 'border-interface-stroke'
)"
>
<ActionBarButtons />
<!-- Support for legacy topbar elements attached by custom scripts, hidden if no elements present -->
Expand Down Expand Up @@ -157,6 +160,7 @@ import { isDesktop } from '@/platform/distribution/types'
import { useConflictAcknowledgment } from '@/workbench/extensions/manager/composables/useConflictAcknowledgment'
import { useManagerState } from '@/workbench/extensions/manager/composables/useManagerState'
import { ManagerTab } from '@/workbench/extensions/manager/types/comfyManagerTypes'
import { cn } from '@/utils/tailwindUtil'

const settingStore = useSettingStore()
const workspaceStore = useWorkspaceStore()
Expand Down Expand Up @@ -242,6 +246,8 @@ const shouldShowRedDot = computed((): boolean => {
return releaseRedDot || shouldShowConflictRedDot.value
})

const { hasAnyError: hasPromptError } = storeToRefs(executionStore)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hasAnyError is renamed to hasPromptError via destructuring, but this computed covers node errors and runtime errors too — not just prompt errors. Why was it renamed?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


// Right side panel toggle
const { isOpen: isRightSidePanelOpen } = storeToRefs(rightSidePanelStore)
const rightSidePanelTooltipConfig = computed(() =>
Expand Down
18 changes: 16 additions & 2 deletions src/components/rightSidePanel/RightSidePanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,17 @@ import {
useFlatAndCategorizeSelectedItems
} from './shared'
import SubgraphEditor from './subgraph/SubgraphEditor.vue'
import TabErrors from './errors/TabErrors.vue'


const canvasStore = useCanvasStore()
const executionStore = useExecutionStore()
const rightSidePanelStore = useRightSidePanelStore()
const settingStore = useSettingStore()
const { t } = useI18n()

const { hasAnyError } = storeToRefs(executionStore)

const { findParentGroup } = useGraphHierarchy()

const { selectedItems: directlySelectedItems } = storeToRefs(canvasStore)
Expand Down Expand Up @@ -110,6 +114,14 @@ const tabs = computed<RightSidePanelTabList>(() => {
})
}

if (hasAnyError.value && !hasSelection.value) {
list.push({
label: () => t('rightSidePanel.errors'),
value: 'errors',
icon: 'icon-[lucide--octagon-alert] bg-node-stroke-error ml-1'
})
}

list.push({
label: () =>
flattedItems.value.length > 1
Expand Down Expand Up @@ -155,6 +167,7 @@ watchEffect(() => {
}
})


function resolveTitle() {
const items = flattedItems.value
const nodes = selectedNodes.value
Expand Down Expand Up @@ -213,7 +226,7 @@ function handleTitleCancel() {

function handleProxyWidgetsUpdate(value: ProxyWidgetsProperty) {
if (!selectedSingleNode.value) return
;(selectedSingleNode.value as SubgraphNode).properties.proxyWidgets = value
;(selectedSingleNode.value as SubgraphNode).properties.proxyWidgets = value
canvasStore.canvas?.setDirty(true, true)
}
</script>
Expand Down Expand Up @@ -298,7 +311,8 @@ function handleProxyWidgetsUpdate(value: ProxyWidgetsProperty) {
<!-- Panel Content -->
<div class="scrollbar-thin flex-1 overflow-y-auto">
<template v-if="!hasSelection">
<TabGlobalParameters v-if="activeTab === 'parameters'" />
<TabErrors v-if="activeTab === 'errors'" />
<TabGlobalParameters v-else-if="activeTab === 'parameters'" />
<TabNodes v-else-if="activeTab === 'nodes'" />
<TabGlobalSettings v-else-if="activeTab === 'settings'" />
</template>
Expand Down
170 changes: 170 additions & 0 deletions src/components/rightSidePanel/errors/ErrorNodeCard.stories.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
import type { Meta, StoryObj } from '@storybook/vue3-vite'
import ErrorNodeCard from './ErrorNodeCard.vue'
import type { ErrorCardData } from './types'

/**
* ErrorNodeCard displays a single error card inside the error tab.
* It shows the node header (ID badge, title, action buttons)
* and the list of error items (message, traceback, copy button).
*/
const meta: Meta<typeof ErrorNodeCard> = {
title: 'RightSidePanel/Errors/ErrorNodeCard',
component: ErrorNodeCard,
parameters: {
layout: 'centered'
},
argTypes: {
showNodeIdBadge: { control: 'boolean' }
},
decorators: [
(story) => ({
components: { story },
template:
'<div class="w-[330px] bg-base-surface border border-interface-stroke rounded-lg p-4"><story /></div>'
})
]
}

export default meta
type Story = StoryObj<typeof meta>

// ─── Sample Data ────────────────────────────────────────────────────────────

const singleErrorCard: ErrorCardData = {
id: 'node-10',
title: 'CLIPTextEncode',
nodeId: '10',
nodeTitle: 'CLIP Text Encode (Prompt)',
isSubgraphNode: false,
errors: [
{
message: 'Required input "text" is missing.',
details: 'Input: text\nExpected: STRING'
}
]
}

const multipleErrorsCard: ErrorCardData = {
id: 'node-24',
title: 'VAEDecode',
nodeId: '24',
nodeTitle: 'VAE Decode',
isSubgraphNode: false,
errors: [
{
message: 'Required input "samples" is missing.',
details: ''
},
{
message: 'Value "NaN" is not a valid number for "strength".',
details: 'Expected: FLOAT [0.0 .. 1.0]'
}
]
}

const runtimeErrorCard: ErrorCardData = {
id: 'exec-45',
title: 'KSampler',
nodeId: '45',
nodeTitle: 'KSampler',
isSubgraphNode: false,
errors: [
{
message: 'OutOfMemoryError: CUDA out of memory. Tried to allocate 1.2GB.',
details: [
'Traceback (most recent call last):',
' File "ksampler.py", line 142, in sample',
' samples = model.apply(latent)',
'RuntimeError: CUDA out of memory.'
].join('\n'),
isRuntimeError: true
}
]
}

const subgraphErrorCard: ErrorCardData = {
id: 'node-3:15',
title: 'KSampler',
nodeId: '3:15',
nodeTitle: 'Nested KSampler',
isSubgraphNode: true,
errors: [
{
message: 'Latent input is required.',
details: ''
}
]
}

const promptOnlyCard: ErrorCardData = {
id: '__prompt__',
title: 'Prompt has no outputs.',
errors: [
{
message:
'The workflow does not contain any output nodes (e.g. Save Image, Preview Image) to produce a result.'
}
]
}

// ─── Stories: Badge Visibility ──────────────────────────────────────────────
Comment thread
christian-byrne marked this conversation as resolved.
Outdated

/** Single validation error with node ID badge visible */
export const WithNodeIdBadge: Story = {
args: {
card: singleErrorCard,
showNodeIdBadge: true
}
}

/** Single validation error without node ID badge */
export const WithoutNodeIdBadge: Story = {
args: {
card: singleErrorCard,
showNodeIdBadge: false
}
}

// ─── Stories: Subgraph Button ───────────────────────────────────────────────

/** Subgraph node error — shows "Enter subgraph" button */
export const WithEnterSubgraphButton: Story = {
args: {
card: subgraphErrorCard,
showNodeIdBadge: true
}
}

/** Regular node error — no "Enter subgraph" button */
export const WithoutEnterSubgraphButton: Story = {
args: {
card: singleErrorCard,
showNodeIdBadge: true
}
}

// ─── Stories: Error Variants ────────────────────────────────────────────────

/** Multiple validation errors on one node */
export const MultipleErrors: Story = {
args: {
card: multipleErrorsCard,
showNodeIdBadge: true
}
}

/** Runtime execution error with full traceback */
export const RuntimeError: Story = {
args: {
card: runtimeErrorCard,
showNodeIdBadge: true
}
}

/** Prompt-level error (no node header) */
export const PromptError: Story = {
args: {
card: promptOnlyCard,
showNodeIdBadge: false
}
}
111 changes: 111 additions & 0 deletions src/components/rightSidePanel/errors/ErrorNodeCard.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
<script setup lang="ts">
/**
* ErrorNodeCard.vue
*
* Displays a single error card within the error tab.
* Contains the node header (ID badge, title, action buttons)
* and the list of errors (message, traceback, copy button).
*/
import { useI18n } from 'vue-i18n'

import Button from '@/components/ui/button/Button.vue'
import { cn } from '@/utils/tailwindUtil'

import type { ErrorCardData } from './types'

const { card, showNodeIdBadge = false } = defineProps<{
card: ErrorCardData
showNodeIdBadge?: boolean
}>()

/**
* @event locateNode - Pans the canvas to center on the node with the given ID.
* @event enterSubgraph - Opens the subgraph that contains the specified node.
* @event copyToClipboard - Copies the provided error text to the system clipboard.
*/
const emit = defineEmits<{
locateNode: [nodeId: string]
enterSubgraph: [nodeId: string]
copyToClipboard: [text: string]
}>()

const { t } = useI18n()
</script>

<template>
<div class="overflow-hidden">
<!-- Card Header (Node ID & Actions) -->
<div v-if="card.nodeId" class="flex flex-wrap items-center gap-2 py-2">
<span
v-if="showNodeIdBadge"
class="shrink-0 rounded-md bg-secondary-background-selected px-2 py-0.5 text-[10px] font-mono text-muted-foreground font-bold"
>
#{{ card.nodeId }}
</span>
<span
v-if="card.nodeTitle"
class="flex-1 text-sm text-muted-foreground truncate font-medium"
>
{{ card.nodeTitle }}
</span>
<Button
v-if="card.isSubgraphNode"
variant="secondary"
size="sm"
class="rounded-lg text-sm shrink-0"
@click.stop="emit('enterSubgraph', card.nodeId!)"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Can we use a fallback instead of non-null assertion(!)?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.
Replaced inline card.nodeId! assertions with dedicated handler functions (handleLocateNode, handleEnterSubgraph) that guard with if (card.nodeId) before emitting.

>
{{ t('rightSidePanel.enterSubgraph') }}
</Button>
<Button
variant="textonly"
size="icon-sm"
class="size-7 text-muted-foreground hover:text-base-foreground shrink-0"
@click.stop="emit('locateNode', card.nodeId!)"
Comment thread
christian-byrne marked this conversation as resolved.
Outdated
>
<i class="icon-[lucide--locate] size-3.5" />
</Button>
</div>

<!-- Multiple Errors within one Card -->
<div class="divide-y divide-interface-stroke/20 space-y-4">
<!-- Card Content -->
<div
v-for="(error, idx) in card.errors"
:key="idx"
class="flex flex-col gap-3"
>
<!-- Error Message -->
<p
v-if="error.message"
class="m-0 text-sm break-words whitespace-pre-wrap leading-relaxed px-0.5"
>
{{ error.message }}
</p>

<!-- Traceback / Details -->
<div
v-if="error.details"
:class="cn(
'rounded-lg bg-secondary-background-hover p-2.5 overflow-y-auto border border-interface-stroke/30',
error.isRuntimeError ? 'max-h-[10lh]' : 'max-h-[6lh]'
)"
>
Comment thread
coderabbitai[bot] marked this conversation as resolved.
<p class="m-0 text-[11px] text-muted-foreground break-words whitespace-pre-wrap font-mono leading-relaxed">
{{ error.details }}
</p>
</div>

<Button
variant="secondary"
size="sm"
class="w-full justify-center gap-2 h-8 text-[11px]"
@click="emit('copyToClipboard', [error.message, error.details].filter(Boolean).join('\n\n'))"
>
<i class="icon-[lucide--copy] size-3.5" />
{{ t('g.copy') }}
</Button>
</div>
</div>
</div>
</template>
Loading