From ae5532c50076fa1ad2a03610ac68af48d0598775 Mon Sep 17 00:00:00 2001 From: KevinSun <30999421+Zhen-Bo@users.noreply.github.com> Date: Mon, 9 Mar 2026 10:30:31 +0800 Subject: [PATCH 1/7] fix: update badge before gridEl guard so it works when panel is closed In comfyui_frontend_package >=1.38.x the sidebar panel switched from eager to lazy rendering: render(el) is only called the first time the user opens the panel, so gridEl is null until then. The previous code called updateBadge() only inside render(), after the `if (!gridEl) return` guard, meaning the badge was never updated while the panel remained closed. Move updateBadge() to the top of render(), before the guard, so it always runs regardless of whether the panel has been opened. Remove the two now-redundant calls at the end of each early-return path. --- web/queue-sidebar.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/web/queue-sidebar.js b/web/queue-sidebar.js index d020c8f..549046e 100644 --- a/web/queue-sidebar.js +++ b/web/queue-sidebar.js @@ -203,6 +203,7 @@ function updateBadge() { } function render() { + updateBadge() if (!gridEl) return const allTasks = [...state.running, ...state.pending, ...state.history] @@ -214,7 +215,6 @@ function render() { `color:var(--p-text-muted-color,#888)">` + `` + `${t('noTasks')}` - updateBadge() return } @@ -248,7 +248,6 @@ function render() { } for (const card of existing.values()) card.remove() - updateBadge() } // ─── Sidebar setup ──────────────────────────────────────────────────────────── From ab105bc2a9455683130d5dbec2edc3d55e61936f Mon Sep 17 00:00:00 2001 From: KevinSun <30999421+Zhen-Bo@users.noreply.github.com> Date: Mon, 9 Mar 2026 10:48:12 +0800 Subject: [PATCH 2/7] feat: add q keybinding to toggle queue panel Register ComfyUI.QueueSidebar.Toggle command and bind it to q via the declarative commands/keybindings API so the shortcut appears in the user's Settings > Keybindings list and behaves identically to the built-in w/n/m/a sidebar shortcuts. --- web/queue-sidebar.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/web/queue-sidebar.js b/web/queue-sidebar.js index 549046e..ad01a58 100644 --- a/web/queue-sidebar.js +++ b/web/queue-sidebar.js @@ -299,6 +299,24 @@ function onProgressPreview({ detail }) { app.registerExtension({ name: 'ComfyUI.QueueSidebar', + commands: [ + { + id: 'ComfyUI.QueueSidebar.Toggle', + label: () => t('queue'), + icon: 'pi pi-history', + function() { + app.extensionManager.sidebarTab?.toggleSidebarTab('queue') + }, + }, + ], + + keybindings: [ + { + commandId: 'ComfyUI.QueueSidebar.Toggle', + combo: { key: 'q' }, + }, + ], + async setup() { // Load translations from web/locales/.json await loadI18n() From a8df31127121f1c9695754d4bd31f4f720330d4e Mon Sep 17 00:00:00 2001 From: KevinSun <30999421+Zhen-Bo@users.noreply.github.com> Date: Mon, 9 Mar 2026 10:48:28 +0800 Subject: [PATCH 3/7] fix: reduce sidebar icon badge size Inject CSS to shrink .sidebar-icon-badge from the default 10px/16px to 9px/14px so the badge is less visually dominant on the narrow sidebar. --- web/queue-sidebar.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/web/queue-sidebar.js b/web/queue-sidebar.js index ad01a58..384509a 100644 --- a/web/queue-sidebar.js +++ b/web/queue-sidebar.js @@ -294,6 +294,18 @@ function onProgressPreview({ detail }) { render() } +// ─── Badge style injection ───────────────────────────────────────────────────── + +function injectBadgeStyle() { + const id = 'queue-sidebar-badge-style' + if (document.getElementById(id)) return + const style = document.createElement('style') + style.id = id + style.textContent = + '.sidebar-icon-badge{font-size:9px!important;min-width:14px!important;line-height:13px!important}' + document.head.appendChild(style) +} + // ─── Register ───────────────────────────────────────────────────────────────── app.registerExtension({ @@ -321,6 +333,7 @@ app.registerExtension({ // Load translations from web/locales/.json await loadI18n() + injectBadgeStyle() hookQueuePrompt(app, refresh) api.addEventListener('status', onStatus) From 865b67f656b92f5b85df7fe5ccf392da3f6f1a62 Mon Sep 17 00:00:00 2001 From: KevinSun <30999421+Zhen-Bo@users.noreply.github.com> Date: Mon, 9 Mar 2026 10:48:37 +0800 Subject: [PATCH 4/7] fix: nudge queue tab badge further to top-right Override the default -top-1 -right-1 (-4px) position to -7px for the queue tab badge only, using :has(.pi-history) to avoid affecting other sidebar tab badges. --- web/queue-sidebar.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/queue-sidebar.js b/web/queue-sidebar.js index 384509a..f36bd44 100644 --- a/web/queue-sidebar.js +++ b/web/queue-sidebar.js @@ -302,7 +302,8 @@ function injectBadgeStyle() { const style = document.createElement('style') style.id = id style.textContent = - '.sidebar-icon-badge{font-size:9px!important;min-width:14px!important;line-height:13px!important}' + '.sidebar-icon-badge{font-size:9px!important;min-width:14px!important;line-height:13px!important}' + + '.sidebar-icon-wrapper:has(.pi-history) .sidebar-icon-badge{top:-7px!important;right:-7px!important}' document.head.appendChild(style) } From 8521506862f7e21cf2578baf55a854b7f9739ca8 Mon Sep 17 00:00:00 2001 From: KevinSun <30999421+Zhen-Bo@users.noreply.github.com> Date: Mon, 9 Mar 2026 10:48:48 +0800 Subject: [PATCH 5/7] chore: bump version to 1.1.0 --- package.json | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index ddd6d6f..c4549bb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "comfyui_queue_sidebar", - "version": "1.0.0", + "version": "1.1.0", "private": true, "description": "ComfyUI sidebar extension — brings back the queue panel with image previews", "type": "module", diff --git a/pyproject.toml b/pyproject.toml index 5e0bb99..e3de271 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "comfyui-queue-sidebar" -version = "1.0.0" +version = "1.1.0" description = "ComfyUI sidebar extension — brings back the queue panel with image previews" license = { file = "LICENSE" } From 5712358dcdc520f9a5dc933a2f69ce8cbfc70151 Mon Sep 17 00:00:00 2001 From: KevinSun <30999421+Zhen-Bo@users.noreply.github.com> Date: Mon, 9 Mar 2026 10:50:55 +0800 Subject: [PATCH 6/7] =?UTF-8?q?docs:=20update=20compatibility=20=E2=80=94?= =?UTF-8?q?=20tested=20up=20to=20frontend=201.39.19=20/=20core=200.16.4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- README_zhTW.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 227d02d..98d9576 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ Delete the `comfyui_queue_sidebar` folder from `custom_nodes/`. ## Compatibility -- **ComfyUI frontend** v1.33.1+ (tested on 1.35.9) +- **ComfyUI frontend** v1.33.1+ (tested up to 1.39.19) · **ComfyUI core** tested up to 0.16.4 - Works alongside the built-in bottom-panel queue without conflicts - The plugin uses the public extension API for registration and events. It additionally hooks a small number of internal APIs (e.g. `app.queuePrompt`, sidebar tab ordering) to provide a seamless experience — all such integration points are centralized in [`comfyAdapter.js`](web/lib/comfyAdapter.js) with feature detection and graceful degradation if the upstream shape changes diff --git a/README_zhTW.md b/README_zhTW.md index 192e3f3..d4cb392 100644 --- a/README_zhTW.md +++ b/README_zhTW.md @@ -69,7 +69,7 @@ git clone https://github.com/Zhen-Bo/comfyui_queue_sidebar.git ## 相容性 -- **ComfyUI 前端** v1.33.1+(已在 1.35.9 測試正常) +- **ComfyUI 前端** v1.33.1+(已測試至 1.39.19)· **ComfyUI 核心** 已測試至 0.16.4 - 與內建的底部面板佇列並行運作,不會衝突 - 插件使用公開的擴充 API 進行註冊和事件監聽。此外會掛鉤少量內部 API(如 `app.queuePrompt`、側邊欄分頁排序)以提供無縫體驗——所有此類整合點均集中於 [`comfyAdapter.js`](web/lib/comfyAdapter.js),搭配功能偵測與優雅降級機制 From ba34107c38c330cb041c79b1c185de7a6cf3aaef Mon Sep 17 00:00:00 2001 From: KevinSun <30999421+Zhen-Bo@users.noreply.github.com> Date: Mon, 9 Mar 2026 10:58:15 +0800 Subject: [PATCH 7/7] ci: add test and release workflows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit test.yml — run vitest on every push/PR to master to guard the branch release.yml — on semver tag: gate on tests, then create a GitHub Release with auto-generated changelog from git log No zip artifact: this plugin is git-based (Manager / git clone), so downloadable archives add no value. publish.yml (Comfy Registry) is kept separate and unchanged. --- .github/workflows/release.yml | 56 +++++++++++++++++++++++++++++++++++ .github/workflows/test.yml | 22 ++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 .github/workflows/release.yml create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..3b6ff8c --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,56 @@ +name: GitHub Release + +on: + push: + tags: + - "[0-9]+.[0-9]+.[0-9]+" + +permissions: + contents: write + +jobs: + test: + name: Run Tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: '20' + + - run: npm install + + - run: npm test + + release: + name: Create GitHub Release + needs: test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Generate changelog + run: | + PREV_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "") + if [ -n "$PREV_TAG" ]; then + CHANGES=$(git log "${PREV_TAG}..HEAD" --pretty=format:"- %s" --no-merges) + else + CHANGES=$(git log --pretty=format:"- %s" --no-merges) + fi + cat << EOF > release_notes.md + ## What's Changed + + $CHANGES + EOF + + - name: Create GitHub Release + uses: softprops/action-gh-release@v2 + with: + body_path: release_notes.md + draft: false + prerelease: ${{ contains(github.ref_name, '-') }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..76c0715 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,22 @@ +name: CI + +on: + push: + branches: [master] + pull_request: + branches: [master] + +jobs: + test: + name: Run Tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: '20' + + - run: npm install + + - run: npm test