Skip to content
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
56 changes: 56 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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 }}
22 changes: 22 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion README_zhTW.md
Original file line number Diff line number Diff line change
Expand Up @@ -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),搭配功能偵測與優雅降級機制

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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" }

Expand Down
35 changes: 33 additions & 2 deletions web/queue-sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ function updateBadge() {
}

function render() {
updateBadge()
if (!gridEl) return

const allTasks = [...state.running, ...state.pending, ...state.history]
Expand All @@ -214,7 +215,6 @@ function render() {
`color:var(--p-text-muted-color,#888)">` +
`<i class="pi pi-info-circle" style="font-size:2rem;margin-bottom:12px"></i>` +
`<span style="font-size:13px">${t('noTasks')}</span></div>`
updateBadge()
return
}

Expand Down Expand Up @@ -248,7 +248,6 @@ function render() {
}

for (const card of existing.values()) card.remove()
updateBadge()
}

// ─── Sidebar setup ────────────────────────────────────────────────────────────
Expand Down Expand Up @@ -295,15 +294,47 @@ 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}' +
'.sidebar-icon-wrapper:has(.pi-history) .sidebar-icon-badge{top:-7px!important;right:-7px!important}'
document.head.appendChild(style)
}

// ─── Register ─────────────────────────────────────────────────────────────────

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/<locale>.json
await loadI18n()

injectBadgeStyle()
hookQueuePrompt(app, refresh)

api.addEventListener('status', onStatus)
Expand Down