From f215872e2eb9f626d65680d7029492211048f613 Mon Sep 17 00:00:00 2001 From: snomiao Date: Tue, 2 Sep 2025 13:34:21 +0900 Subject: [PATCH 01/36] [feat] merge playwright deploy and comment workflows (#5298) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Combines pr-playwright-deploy.yaml and pr-playwright-comment.yaml into a single workflow to ensure proper dependency ordering. The comment job now waits for deployments to complete before generating comments with deployment URLs. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude --- .github/workflows/pr-playwright-comment.yaml | 163 ---------------- .github/workflows/pr-playwright-deploy.yaml | 187 ++++++++++++++++++- 2 files changed, 183 insertions(+), 167 deletions(-) delete mode 100644 .github/workflows/pr-playwright-comment.yaml diff --git a/.github/workflows/pr-playwright-comment.yaml b/.github/workflows/pr-playwright-comment.yaml deleted file mode 100644 index 554b5c3b8d..0000000000 --- a/.github/workflows/pr-playwright-comment.yaml +++ /dev/null @@ -1,163 +0,0 @@ -name: PR Playwright Comment - -on: - workflow_run: - workflows: ['Tests CI'] - types: [requested, completed] - -env: - DATE_FORMAT: '+%m/%d/%Y, %I:%M:%S %p' - -jobs: - comment-summary: - runs-on: ubuntu-latest - if: github.repository == 'Comfy-Org/ComfyUI_frontend' && github.event.workflow_run.event == 'pull_request' - permissions: - pull-requests: write - actions: read - steps: - - name: Get PR number - id: pr - uses: actions/github-script@v7 - with: - script: | - const { data: pullRequests } = await github.rest.pulls.list({ - owner: context.repo.owner, - repo: context.repo.repo, - state: 'open', - head: `${context.repo.owner}:${context.payload.workflow_run.head_branch}`, - }); - - if (pullRequests.length === 0) { - console.log('No open PR found for this branch'); - return null; - } - - return pullRequests[0].number; - - - name: Log when no PR found - if: steps.pr.outputs.result == 'null' - run: | - echo "⚠️ No open PR found for branch: ${{ github.event.workflow_run.head_branch }}" - echo "Workflow run ID: ${{ github.event.workflow_run.id }}" - echo "Repository: ${{ github.event.workflow_run.repository.full_name }}" - echo "Event: ${{ github.event.workflow_run.event }}" - - - name: Generate comment body for start - if: steps.pr.outputs.result != 'null' && github.event.action == 'requested' - id: comment-body-start - run: | - echo "" > comment.md - echo "## 🎭 Playwright Test Results" >> comment.md - echo "" >> comment.md - echo "comfy-loading-gif **Tests are starting...** " >> comment.md - echo "" >> comment.md - echo "⏰ Started at: ${{ steps.completion-time.outputs.time }} UTC" >> comment.md - echo "" >> comment.md - echo "### 🚀 Running Tests" >> comment.md - echo "- 🧪 **chromium**: Running tests..." >> comment.md - echo "- 🧪 **chromium-0.5x**: Running tests..." >> comment.md - echo "- 🧪 **chromium-2x**: Running tests..." >> comment.md - echo "- 🧪 **mobile-chrome**: Running tests..." >> comment.md - echo "" >> comment.md - echo "---" >> comment.md - echo "⏱️ Please wait while tests are running across all browsers..." >> comment.md - - - name: Download all deployment info - if: steps.pr.outputs.result != 'null' && github.event.action == 'completed' - uses: actions/download-artifact@v4 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - run-id: ${{ github.event.workflow_run.id }} - pattern: deployment-info-* - merge-multiple: true - path: deployment-info - - - name: Get completion time - id: completion-time - run: echo "time=$(date -u '${{ env.DATE_FORMAT }}')" >> $GITHUB_OUTPUT - - - name: Generate comment body for completion - if: steps.pr.outputs.result != 'null' && github.event.action == 'completed' - id: comment-body-completed - run: | - echo "" > comment.md - echo "## 🎭 Playwright Test Results" >> comment.md - echo "" >> comment.md - - # Check if all tests passed - ALL_PASSED=true - for file in deployment-info/*.txt; do - if [ -f "$file" ]; then - browser=$(basename "$file" .txt) - info=$(cat "$file") - exit_code=$(echo "$info" | cut -d'|' -f2) - if [ "$exit_code" != "0" ]; then - ALL_PASSED=false - break - fi - fi - done - - if [ "$ALL_PASSED" = "true" ]; then - echo "✅ **All tests passed across all browsers!**" >> comment.md - else - echo "❌ **Some tests failed!**" >> comment.md - fi - - echo "" >> comment.md - echo "⏰ Completed at: ${{ steps.completion-time.outputs.time }} UTC" >> comment.md - echo "" >> comment.md - echo "### 📊 Test Reports by Browser" >> comment.md - - for file in deployment-info/*.txt; do - if [ -f "$file" ]; then - browser=$(basename "$file" .txt) - info=$(cat "$file") - exit_code=$(echo "$info" | cut -d'|' -f2) - url=$(echo "$info" | cut -d'|' -f3) - - # Validate URLs before using them in comments - sanitized_url=$(echo "$url" | grep -E '^https://[a-z0-9.-]+\.pages\.dev(/.*)?$' || echo "INVALID_URL") - if [ "$sanitized_url" = "INVALID_URL" ]; then - echo "Invalid deployment URL detected: $url" - url="#" # Use safe fallback - fi - - if [ "$exit_code" = "0" ]; then - status="✅" - else - status="❌" - fi - - echo "- $status **$browser**: [View Report]($url)" >> comment.md - fi - done - - echo "" >> comment.md - echo "---" >> comment.md - if [ "$ALL_PASSED" = "true" ]; then - echo "🎉 Your tests are passing across all browsers!" >> comment.md - else - echo "⚠️ Please check the test reports for details on failures." >> comment.md - fi - - - name: Comment PR - Tests Started - if: steps.pr.outputs.result != 'null' && github.event.action == 'requested' - uses: edumserrano/find-create-or-update-comment@82880b65c8a3a6e4c70aa05a204995b6c9696f53 # v3.0.0 - with: - issue-number: ${{ steps.pr.outputs.result }} - body-includes: '' - comment-author: 'github-actions[bot]' - edit-mode: replace - body-path: comment.md - - - name: Comment PR - Tests Complete - if: steps.pr.outputs.result != 'null' && github.event.action == 'completed' - uses: edumserrano/find-create-or-update-comment@82880b65c8a3a6e4c70aa05a204995b6c9696f53 # v3.0.0 - with: - issue-number: ${{ steps.pr.outputs.result }} - body-includes: '' - comment-author: 'github-actions[bot]' - edit-mode: replace - body-path: comment.md diff --git a/.github/workflows/pr-playwright-deploy.yaml b/.github/workflows/pr-playwright-deploy.yaml index 53db00ff35..12051fa990 100644 --- a/.github/workflows/pr-playwright-deploy.yaml +++ b/.github/workflows/pr-playwright-deploy.yaml @@ -1,14 +1,17 @@ -name: PR Playwright Deploy +name: PR Playwright Deploy and Comment on: workflow_run: workflows: ["Tests CI"] - types: [completed] + types: [requested, completed] + +env: + DATE_FORMAT: '+%m/%d/%Y, %I:%M:%S %p' jobs: deploy-reports: runs-on: ubuntu-latest - if: github.repository == 'Comfy-Org/ComfyUI_frontend' && github.event.workflow_run.event == 'pull_request' + if: github.repository == 'Comfy-Org/ComfyUI_frontend' && github.event.workflow_run.event == 'pull_request' && github.event.action == 'completed' permissions: actions: read strategy: @@ -98,4 +101,180 @@ jobs: fi env: CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} - CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} \ No newline at end of file + CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} + + comment-tests-starting: + runs-on: ubuntu-latest + if: github.repository == 'Comfy-Org/ComfyUI_frontend' && github.event.workflow_run.event == 'pull_request' && github.event.action == 'requested' + permissions: + pull-requests: write + actions: read + steps: + - name: Get PR number + id: pr + uses: actions/github-script@v7 + with: + script: | + const { data: pullRequests } = await github.rest.pulls.list({ + owner: context.repo.owner, + repo: context.repo.repo, + state: 'open', + head: `${context.repo.owner}:${context.payload.workflow_run.head_branch}`, + }); + + if (pullRequests.length === 0) { + console.log('No open PR found for this branch'); + return null; + } + + return pullRequests[0].number; + + - name: Get completion time + id: completion-time + run: echo "time=$(date -u '${{ env.DATE_FORMAT }}')" >> $GITHUB_OUTPUT + + - name: Generate comment body for start + if: steps.pr.outputs.result != 'null' + id: comment-body-start + run: | + echo "" > comment.md + echo "## 🎭 Playwright Test Results" >> comment.md + echo "" >> comment.md + echo "comfy-loading-gif **Tests are starting...** " >> comment.md + echo "" >> comment.md + echo "⏰ Started at: ${{ steps.completion-time.outputs.time }} UTC" >> comment.md + echo "" >> comment.md + echo "### 🚀 Running Tests" >> comment.md + echo "- 🧪 **chromium**: Running tests..." >> comment.md + echo "- 🧪 **chromium-0.5x**: Running tests..." >> comment.md + echo "- 🧪 **chromium-2x**: Running tests..." >> comment.md + echo "- 🧪 **mobile-chrome**: Running tests..." >> comment.md + echo "" >> comment.md + echo "---" >> comment.md + echo "⏱️ Please wait while tests are running across all browsers..." >> comment.md + + - name: Comment PR - Tests Started + if: steps.pr.outputs.result != 'null' + uses: edumserrano/find-create-or-update-comment@82880b65c8a3a6e4c70aa05a204995b6c9696f53 # v3.0.0 + with: + issue-number: ${{ steps.pr.outputs.result }} + body-includes: '' + comment-author: 'github-actions[bot]' + edit-mode: replace + body-path: comment.md + + comment-tests-completed: + runs-on: ubuntu-latest + needs: deploy-reports + if: github.repository == 'Comfy-Org/ComfyUI_frontend' && github.event.workflow_run.event == 'pull_request' && github.event.action == 'completed' && always() + permissions: + pull-requests: write + actions: read + steps: + - name: Get PR number + id: pr + uses: actions/github-script@v7 + with: + script: | + const { data: pullRequests } = await github.rest.pulls.list({ + owner: context.repo.owner, + repo: context.repo.repo, + state: 'open', + head: `${context.repo.owner}:${context.payload.workflow_run.head_branch}`, + }); + + if (pullRequests.length === 0) { + console.log('No open PR found for this branch'); + return null; + } + + return pullRequests[0].number; + + - name: Download all deployment info + if: steps.pr.outputs.result != 'null' + uses: actions/download-artifact@v4 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + run-id: ${{ github.event.workflow_run.id }} + pattern: deployment-info-* + merge-multiple: true + path: deployment-info + + - name: Get completion time + id: completion-time + run: echo "time=$(date -u '${{ env.DATE_FORMAT }}')" >> $GITHUB_OUTPUT + + - name: Generate comment body for completion + if: steps.pr.outputs.result != 'null' + id: comment-body-completed + run: | + echo "" > comment.md + echo "## 🎭 Playwright Test Results" >> comment.md + echo "" >> comment.md + + # Check if all tests passed + ALL_PASSED=true + for file in deployment-info/*.txt; do + if [ -f "$file" ]; then + browser=$(basename "$file" .txt) + info=$(cat "$file") + exit_code=$(echo "$info" | cut -d'|' -f2) + if [ "$exit_code" != "0" ]; then + ALL_PASSED=false + break + fi + fi + done + + if [ "$ALL_PASSED" = "true" ]; then + echo "✅ **All tests passed across all browsers!**" >> comment.md + else + echo "❌ **Some tests failed!**" >> comment.md + fi + + echo "" >> comment.md + echo "⏰ Completed at: ${{ steps.completion-time.outputs.time }} UTC" >> comment.md + echo "" >> comment.md + echo "### 📊 Test Reports by Browser" >> comment.md + + for file in deployment-info/*.txt; do + if [ -f "$file" ]; then + browser=$(basename "$file" .txt) + info=$(cat "$file") + exit_code=$(echo "$info" | cut -d'|' -f2) + url=$(echo "$info" | cut -d'|' -f3) + + # Validate URLs before using them in comments + sanitized_url=$(echo "$url" | grep -E '^https://[a-z0-9.-]+\.pages\.dev(/.*)?$' || echo "INVALID_URL") + if [ "$sanitized_url" = "INVALID_URL" ]; then + echo "Invalid deployment URL detected: $url" + url="#" # Use safe fallback + fi + + if [ "$exit_code" = "0" ]; then + status="✅" + else + status="❌" + fi + + echo "- $status **$browser**: [View Report]($url)" >> comment.md + fi + done + + echo "" >> comment.md + echo "---" >> comment.md + if [ "$ALL_PASSED" = "true" ]; then + echo "🎉 Your tests are passing across all browsers!" >> comment.md + else + echo "⚠️ Please check the test reports for details on failures." >> comment.md + fi + + - name: Comment PR - Tests Complete + if: steps.pr.outputs.result != 'null' + uses: edumserrano/find-create-or-update-comment@82880b65c8a3a6e4c70aa05a204995b6c9696f53 # v3.0.0 + with: + issue-number: ${{ steps.pr.outputs.result }} + body-includes: '' + comment-author: 'github-actions[bot]' + edit-mode: replace + body-path: comment.md \ No newline at end of file From b091f3aa085973a424e30f22ed2cc22eeadccd8d Mon Sep 17 00:00:00 2001 From: pythongosssss <125205205+pythongosssss@users.noreply.github.com> Date: Tue, 2 Sep 2025 07:41:07 +0100 Subject: [PATCH 02/36] Add save/save as to breadcrumb root item (#5213) --- .../breadcrumb/SubgraphBreadcrumbItem.vue | 27 ++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/src/components/breadcrumb/SubgraphBreadcrumbItem.vue b/src/components/breadcrumb/SubgraphBreadcrumbItem.vue index 4a325314fc..2e00e0666b 100644 --- a/src/components/breadcrumb/SubgraphBreadcrumbItem.vue +++ b/src/components/breadcrumb/SubgraphBreadcrumbItem.vue @@ -107,6 +107,7 @@ const rename = async ( } } +const isRoot = props.item.key === 'root' const menuItems = computed(() => { return [ { @@ -120,7 +121,27 @@ const menuItems = computed(() => { command: async () => { await workflowService.duplicateWorkflow(workflowStore.activeWorkflow!) }, - visible: props.item.key === 'root' + visible: isRoot + }, + { + separator: true, + visible: isRoot + }, + { + label: t('menuLabels.Save'), + icon: 'pi pi-save', + command: async () => { + await useCommandStore().execute('Comfy.SaveWorkflow') + }, + visible: isRoot + }, + { + label: t('menuLabels.Save As'), + icon: 'pi pi-save', + command: async () => { + await useCommandStore().execute('Comfy.SaveWorkflowAs') + }, + visible: isRoot }, { separator: true @@ -134,7 +155,7 @@ const menuItems = computed(() => { }, { separator: true, - visible: props.item.key === 'root' + visible: isRoot }, { label: t('breadcrumbsMenu.deleteWorkflow'), @@ -142,7 +163,7 @@ const menuItems = computed(() => { command: async () => { await workflowService.deleteWorkflow(workflowStore.activeWorkflow!) }, - visible: props.item.key === 'root' + visible: isRoot } ] }) From 8f7ee4e9a33d8c8ce51a214d1e1d8fed302a8500 Mon Sep 17 00:00:00 2001 From: Johnpaul Chiwetelu <49923152+Myestery@users.noreply.github.com> Date: Tue, 2 Sep 2025 19:02:15 +0100 Subject: [PATCH 03/36] Re-Route Support to Zendesk (#5259) * refactor: replace feedback command with contact support in Help Center menu * refactor: replace feedback dialog with external support link in Help menu * refactor: simplify error reporting UI by removing send report functionality * refactor: remove issue report dialog and update support contact method * refactor: remove IssueReportDialog and associated components * refactor: remove unused issue report schema * refactor: remove unused issue report types * refactor: remove unused issue report fields from localization files --- browser_tests/tests/dialog.spec.ts | 49 +-- .../dialog/content/ErrorDialogContent.vue | 38 +- .../content/IssueReportDialogContent.vue | 33 -- .../content/error/ReportIssuePanel.spec.ts | 338 ----------------- .../dialog/content/error/ReportIssuePanel.vue | 348 ------------------ .../dialog/content/setting/CreditsPanel.vue | 15 +- .../helpcenter/HelpCenterMenuContent.vue | 2 +- src/composables/useCoreCommands.ts | 25 +- src/constants/coreMenuCommands.ts | 5 +- src/locales/ar/main.json | 32 +- src/locales/en/main.json | 32 +- src/locales/es/main.json | 32 +- src/locales/fr/main.json | 32 +- src/locales/ja/main.json | 32 +- src/locales/ko/main.json | 32 +- src/locales/ru/main.json | 32 +- src/locales/zh-TW/main.json | 32 +- src/locales/zh/main.json | 32 +- src/schemas/issueReportSchema.ts | 28 -- src/services/dialogService.ts | 12 - src/types/issueReportTypes.ts | 51 --- 21 files changed, 25 insertions(+), 1207 deletions(-) delete mode 100644 src/components/dialog/content/IssueReportDialogContent.vue delete mode 100644 src/components/dialog/content/error/ReportIssuePanel.spec.ts delete mode 100644 src/components/dialog/content/error/ReportIssuePanel.vue delete mode 100644 src/schemas/issueReportSchema.ts delete mode 100644 src/types/issueReportTypes.ts diff --git a/browser_tests/tests/dialog.spec.ts b/browser_tests/tests/dialog.spec.ts index bdfcd392fd..8ac7449f45 100644 --- a/browser_tests/tests/dialog.spec.ts +++ b/browser_tests/tests/dialog.spec.ts @@ -59,18 +59,6 @@ test.describe('Execution error', () => { const executionError = comfyPage.page.locator('.comfy-error-report') await expect(executionError).toBeVisible() }) - - test('Can display Issue Report form', async ({ comfyPage }) => { - await comfyPage.loadWorkflow('nodes/execution_error') - await comfyPage.queueButton.click() - await comfyPage.nextFrame() - - await comfyPage.page.getByLabel('Help Fix This').click() - const issueReportForm = comfyPage.page.getByText( - 'Submit Error Report (Optional)' - ) - await expect(issueReportForm).toBeVisible() - }) }) test.describe('Missing models warning', () => { @@ -303,37 +291,16 @@ test.describe('Settings', () => { }) }) -test.describe('Feedback dialog', () => { - test('Should open from topmenu help command', async ({ comfyPage }) => { - // Open feedback dialog from top menu +test.describe('Support', () => { + test('Should open external zendesk link', async ({ comfyPage }) => { await comfyPage.setSetting('Comfy.UseNewMenu', 'Top') - await comfyPage.menu.topbar.triggerTopbarCommand(['Help', 'Feedback']) + const pagePromise = comfyPage.page.context().waitForEvent('page') + await comfyPage.menu.topbar.triggerTopbarCommand(['Help', 'Support']) + const newPage = await pagePromise - // Verify feedback dialog content is visible - const feedbackHeader = comfyPage.page.getByRole('heading', { - name: 'Feedback' - }) - await expect(feedbackHeader).toBeVisible() - }) - - test('Should close when close button clicked', async ({ comfyPage }) => { - // Open feedback dialog - await comfyPage.setSetting('Comfy.UseNewMenu', 'Top') - await comfyPage.menu.topbar.triggerTopbarCommand(['Help', 'Feedback']) - - const feedbackHeader = comfyPage.page.getByRole('heading', { - name: 'Feedback' - }) - - // Close feedback dialog - await comfyPage.page - .getByLabel('', { exact: true }) - .getByLabel('Close') - .click() - await feedbackHeader.waitFor({ state: 'hidden' }) - - // Verify dialog is closed - await expect(feedbackHeader).not.toBeVisible() + await newPage.waitForLoadState('networkidle') + await expect(newPage).toHaveURL(/.*support\.comfy\.org.*/) + await newPage.close() }) }) diff --git a/src/components/dialog/content/ErrorDialogContent.vue b/src/components/dialog/content/ErrorDialogContent.vue index bdf10482ac..4f35511cf9 100644 --- a/src/components/dialog/content/ErrorDialogContent.vue +++ b/src/components/dialog/content/ErrorDialogContent.vue @@ -21,16 +21,9 @@ @click="showReport" />