-
Notifications
You must be signed in to change notification settings - Fork 518
Feat/errors tab panel #8807
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
christian-byrne
merged 23 commits into
Comfy-Org:main
from
jaeone94:feat/errors-tab-panel
Feb 18, 2026
Merged
Feat/errors tab panel #8807
Changes from all 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 de6f566
feat: add error tab components to right side panel
jaeone94 469cf80
feat: integrate error tab with existing UI components
jaeone94 4d9e49c
test: add unit tests and stories for error tab components
jaeone94 65c0c22
fix: remove unused exports to pass knip check
jaeone94 3a1b105
refactor: address code review feedback
jaeone94 fdb93ba
fix(SectionWidgets): restrict See Error button to workflow overview
jaeone94 ffe4148
refactor: address second round of code review feedback
jaeone94 321578d
refactor: address third round of code review feedback
jaeone94 428e75f
style: reorder template before script in error tab components
jaeone94 e0b89a9
feat: auto-expand relevant error group on See Error navigation
jaeone94 1be63d2
Merge branch 'main' into feat/errors-tab-panel
jaeone94 f9cecff
style: simplify padding utility in error tab footer
jaeone94 3a844a3
Merge branch 'feat/errors-tab-panel' of https://github.com/jaeone94/C…
jaeone94 3bbb3f8
Merge branch 'main' into feat/errors-tab-panel
jaeone94 3fa2e92
feat: add experimental setting to toggle errors tab in side panel
jaeone94 baa52a7
Merge branch 'main' into feat/errors-tab-panel
jaeone94 e58c3e4
Merge branch 'main' into feat/errors-tab-panel
jaeone94 d414f11
Merge branch 'main' into feat/errors-tab-panel
jaeone94 b1ec77d
Merge branch 'main' into feat/errors-tab-panel
jaeone94 b2208ef
refactor(errors): extract error grouping logic into composables and a…
jaeone94 c37898f
refactor(errors): address additional feedback
jaeone94 d3bec55
Merge branch 'main' into feat/errors-tab-panel
jaeone94 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
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
162 changes: 162 additions & 0 deletions
162
src/components/rightSidePanel/errors/ErrorNodeCard.stories.ts
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,162 @@ | ||
| 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> | ||
|
|
||
| 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.' | ||
| } | ||
| ] | ||
| } | ||
|
|
||
| /** 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 | ||
| } | ||
| } | ||
|
|
||
| /** 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 | ||
| } | ||
| } | ||
|
|
||
| /** 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 | ||
| } | ||
| } |
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,110 @@ | ||
| <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 ?? '')" | ||
| > | ||
| {{ 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 ?? '')" | ||
| > | ||
| <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]' | ||
| ) | ||
| " | ||
| > | ||
| <p | ||
| class="m-0 text-xs 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="handleCopyError(error)" | ||
| > | ||
| <i class="icon-[lucide--copy] size-3.5" /> | ||
| {{ t('g.copy') }} | ||
| </Button> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </template> | ||
|
|
||
| <script setup lang="ts"> | ||
| import { useI18n } from 'vue-i18n' | ||
|
|
||
| import Button from '@/components/ui/button/Button.vue' | ||
| import { cn } from '@/utils/tailwindUtil' | ||
|
|
||
| import type { ErrorCardData, ErrorItem } from './types' | ||
|
|
||
| const { card, showNodeIdBadge = false } = defineProps<{ | ||
| card: ErrorCardData | ||
| showNodeIdBadge?: boolean | ||
| }>() | ||
|
|
||
| const emit = defineEmits<{ | ||
| locateNode: [nodeId: string] | ||
| enterSubgraph: [nodeId: string] | ||
| copyToClipboard: [text: string] | ||
| }>() | ||
|
|
||
| const { t } = useI18n() | ||
|
|
||
| function handleCopyError(error: ErrorItem) { | ||
| emit( | ||
| 'copyToClipboard', | ||
| [error.message, error.details].filter(Boolean).join('\n\n') | ||
| ) | ||
| } | ||
| </script> | ||
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.
Uh oh!
There was an error while loading. Please reload this page.