Skip to content
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

Execution Error Dialog Revamp (One click issue searching and filing) #595

Merged
merged 10 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions .github/workflows/test-ui.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ jobs:
with:
repository: "Comfy-Org/ComfyUI_frontend"
path: "ComfyUI_frontend"
- name: Checkout ComfyUI_devtools
uses: actions/checkout@v4
with:
repository: "Comfy-Org/ComfyUI_devtools"
path: "ComfyUI/custom_nodes/ComfyUI_devtools"
- name: Get commit message
id: commit-message
run: echo "::set-output name=message::$(git log -1 --pretty=%B)"
Expand Down
2 changes: 2 additions & 0 deletions browser_tests/ComfyPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ export class ComfyPage {

// Buttons
public readonly resetViewButton: Locator
public readonly queueButton: Locator

// Inputs
public readonly workflowUploadInput: Locator
Expand All @@ -137,6 +138,7 @@ export class ComfyPage {
this.canvas = page.locator('#graph-canvas')
this.widgetTextBox = page.getByPlaceholder('text').nth(1)
this.resetViewButton = page.getByRole('button', { name: 'Reset View' })
this.queueButton = page.getByRole('button', { name: 'Queue Prompt' })
this.workflowUploadInput = page.locator('#comfy-file-input')
this.searchBox = new ComfyNodeSearchBox(page)
this.menu = new ComfyMenu(page)
Expand Down
82 changes: 82 additions & 0 deletions browser_tests/assets/execution_error.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
{
"last_node_id": 17,
"last_link_id": 15,
"nodes": [
{
"id": 14,
"type": "PreviewImage",
"pos": [
858,
-41
],
"size": {
"0": 213.8594970703125,
"1": 50.65289306640625
},
"flags": {},
"order": 1,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 15
}
],
"properties": {
"Node name for S&R": "PreviewImage"
}
},
{
"id": 17,
"type": "DevToolsErrorRaiseNode",
"pos": [
477,
-40
],
"size": {
"0": 210,
"1": 26
},
"flags": {},
"order": 0,
"mode": 0,
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
15
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "DevToolsErrorRaiseNode"
}
}
],
"links": [
[
15,
17,
0,
14,
0,
"IMAGE"
]
],
"groups": [],
"config": {},
"extra": {
"ds": {
"scale": 1.2100000000000006,
"offset": [
-266.1038310281165,
337.94335447664554
]
}
},
"version": 0.4
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,16 @@ test.describe('Load workflow warning', () => {
await expect(missingNodesWarning).toBeVisible()
})
})

test.describe('Execution error', () => {
test('Should display an error message when an execution error occurs', async ({
comfyPage
}) => {
await comfyPage.loadWorkflow('execution_error')
await comfyPage.queueButton.click()

// 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()
})
})
46 changes: 39 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
"@primevue/themes": "^4.0.0-rc.2",
"@vitejs/plugin-vue": "^5.0.5",
"@vueuse/core": "^11.0.0",
"axios": "^1.7.4",
"class-transformer": "^0.5.1",
"dotenv": "^16.4.5",
"fuse.js": "^7.0.0",
Expand Down
1 change: 1 addition & 0 deletions src/components/common/NoResultsPlaceholder.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ defineEmits(['action'])
.no-results-placeholder :deep(.p-card) {
background-color: var(--surface-ground);
text-align: center;
box-shadow: unset;
}

.no-results-placeholder h3 {
Expand Down
16 changes: 8 additions & 8 deletions src/components/dialog/GlobalDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
closable
closeOnEscape
dismissableMask
:maximizable="dialogStore.props.maximizable ?? false"
:maximizable="maximizable"
@hide="dialogStore.closeDialog"
@maximize="maximized = true"
@unmaximize="maximized = false"
Expand All @@ -19,20 +19,20 @@
<h3 v-else>{{ dialogStore.title || ' ' }}</h3>
</template>

<component
:is="dialogStore.component"
v-bind="dialogStore.props"
:maximized="maximized"
/>
<component :is="dialogStore.component" v-bind="contentProps" />
</Dialog>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import { computed, ref } from 'vue'
import { useDialogStore } from '@/stores/dialogStore'
import Dialog from 'primevue/dialog'

const dialogStore = useDialogStore()

const maximizable = dialogStore.props.maximizable ?? false
const maximized = ref(false)
const contentProps = computed(() => ({
...dialogStore.props,
...(dialogStore.props.maximizable ? { maximized } : {})
}))
</script>
5 changes: 0 additions & 5 deletions src/components/dialog/content/ErrorDialogContent.vue

This file was deleted.

Loading
Loading