Skip to content

Commit 3e457f8

Browse files
authored
Execution Error Dialog Revamp (One click issue searching and filing) (#595)
* Add basic error dialog * 2 level error report * Add find issue button * nit * Add file issue button * Single dialog * nit * Fix long text wrapping * Merge component * Test execution error dialog
1 parent 0466c79 commit 3e457f8

File tree

15 files changed

+410
-36
lines changed

15 files changed

+410
-36
lines changed

.github/workflows/test-ui.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ jobs:
2727
with:
2828
repository: "Comfy-Org/ComfyUI_frontend"
2929
path: "ComfyUI_frontend"
30+
- name: Checkout ComfyUI_devtools
31+
uses: actions/checkout@v4
32+
with:
33+
repository: "Comfy-Org/ComfyUI_devtools"
34+
path: "ComfyUI/custom_nodes/ComfyUI_devtools"
3035
- name: Get commit message
3136
id: commit-message
3237
run: echo "::set-output name=message::$(git log -1 --pretty=%B)"

browser_tests/ComfyPage.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ export class ComfyPage {
124124

125125
// Buttons
126126
public readonly resetViewButton: Locator
127+
public readonly queueButton: Locator
127128

128129
// Inputs
129130
public readonly workflowUploadInput: Locator
@@ -137,6 +138,7 @@ export class ComfyPage {
137138
this.canvas = page.locator('#graph-canvas')
138139
this.widgetTextBox = page.getByPlaceholder('text').nth(1)
139140
this.resetViewButton = page.getByRole('button', { name: 'Reset View' })
141+
this.queueButton = page.getByRole('button', { name: 'Queue Prompt' })
140142
this.workflowUploadInput = page.locator('#comfy-file-input')
141143
this.searchBox = new ComfyNodeSearchBox(page)
142144
this.menu = new ComfyMenu(page)
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
{
2+
"last_node_id": 17,
3+
"last_link_id": 15,
4+
"nodes": [
5+
{
6+
"id": 14,
7+
"type": "PreviewImage",
8+
"pos": [
9+
858,
10+
-41
11+
],
12+
"size": {
13+
"0": 213.8594970703125,
14+
"1": 50.65289306640625
15+
},
16+
"flags": {},
17+
"order": 1,
18+
"mode": 0,
19+
"inputs": [
20+
{
21+
"name": "images",
22+
"type": "IMAGE",
23+
"link": 15
24+
}
25+
],
26+
"properties": {
27+
"Node name for S&R": "PreviewImage"
28+
}
29+
},
30+
{
31+
"id": 17,
32+
"type": "DevToolsErrorRaiseNode",
33+
"pos": [
34+
477,
35+
-40
36+
],
37+
"size": {
38+
"0": 210,
39+
"1": 26
40+
},
41+
"flags": {},
42+
"order": 0,
43+
"mode": 0,
44+
"outputs": [
45+
{
46+
"name": "IMAGE",
47+
"type": "IMAGE",
48+
"links": [
49+
15
50+
],
51+
"slot_index": 0,
52+
"shape": 3
53+
}
54+
],
55+
"properties": {
56+
"Node name for S&R": "DevToolsErrorRaiseNode"
57+
}
58+
}
59+
],
60+
"links": [
61+
[
62+
15,
63+
17,
64+
0,
65+
14,
66+
0,
67+
"IMAGE"
68+
]
69+
],
70+
"groups": [],
71+
"config": {},
72+
"extra": {
73+
"ds": {
74+
"scale": 1.2100000000000006,
75+
"offset": [
76+
-266.1038310281165,
77+
337.94335447664554
78+
]
79+
}
80+
},
81+
"version": 0.4
82+
}

browser_tests/loadWorkflowWarning.spec.ts renamed to browser_tests/dialog.spec.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,16 @@ test.describe('Load workflow warning', () => {
1212
await expect(missingNodesWarning).toBeVisible()
1313
})
1414
})
15+
16+
test.describe('Execution error', () => {
17+
test('Should display an error message when an execution error occurs', async ({
18+
comfyPage
19+
}) => {
20+
await comfyPage.loadWorkflow('execution_error')
21+
await comfyPage.queueButton.click()
22+
23+
// Wait for the element with the .comfy-execution-error selector to be visible
24+
const executionError = comfyPage.page.locator('.comfy-error-report')
25+
await expect(executionError).toBeVisible()
26+
})
27+
})

package-lock.json

Lines changed: 39 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
"@primevue/themes": "^4.0.0-rc.2",
6161
"@vitejs/plugin-vue": "^5.0.5",
6262
"@vueuse/core": "^11.0.0",
63+
"axios": "^1.7.4",
6364
"class-transformer": "^0.5.1",
6465
"dotenv": "^16.4.5",
6566
"fuse.js": "^7.0.0",

src/components/common/NoResultsPlaceholder.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ defineEmits(['action'])
4444
.no-results-placeholder :deep(.p-card) {
4545
background-color: var(--surface-ground);
4646
text-align: center;
47+
box-shadow: unset;
4748
}
4849
4950
.no-results-placeholder h3 {

src/components/dialog/GlobalDialog.vue

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
closable
77
closeOnEscape
88
dismissableMask
9-
:maximizable="dialogStore.props.maximizable ?? false"
9+
:maximizable="maximizable"
1010
@hide="dialogStore.closeDialog"
1111
@maximize="maximized = true"
1212
@unmaximize="maximized = false"
@@ -19,20 +19,20 @@
1919
<h3 v-else>{{ dialogStore.title || ' ' }}</h3>
2020
</template>
2121

22-
<component
23-
:is="dialogStore.component"
24-
v-bind="dialogStore.props"
25-
:maximized="maximized"
26-
/>
22+
<component :is="dialogStore.component" v-bind="contentProps" />
2723
</Dialog>
2824
</template>
2925

3026
<script setup lang="ts">
31-
import { ref } from 'vue'
27+
import { computed, ref } from 'vue'
3228
import { useDialogStore } from '@/stores/dialogStore'
3329
import Dialog from 'primevue/dialog'
3430
3531
const dialogStore = useDialogStore()
36-
32+
const maximizable = dialogStore.props.maximizable ?? false
3733
const maximized = ref(false)
34+
const contentProps = computed(() => ({
35+
...dialogStore.props,
36+
...(dialogStore.props.maximizable ? { maximized } : {})
37+
}))
3838
</script>

src/components/dialog/content/ErrorDialogContent.vue

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)