Release 1.1.1#2
Merged
Merged
Conversation
allTasks was assembled as [...running, ...pending, ...history], causing the sidebar to display the running item before queued items. Correct order is pending → running → history. Added a regression test to prevent future recurrence.
queue_running tuples are [number, prompt_id, ...]. Using tuple[0] (a number) as promptId caused a type mismatch with dataset.id (always a string), so existing.get() never matched the running card and makeCard() was called on every render — resetting the status tag spinner on each b_preview step during K-Sampler execution. Updated tests to reflect the correct [number, uuid, ...] tuple shape.
buildSidebar only called refresh() (async), leaving the panel blank until the fetch completed. Events fired while the panel was closed (status, b_preview) kept state up-to-date but couldn't render because gridEl was null. On re-open, calling render() before refresh() shows the current state instantly, then refresh() updates with fresh data.
normalizeQueue was returning tuple[0] as a number for queue_running entries. Since dataset.id is always a string, the Map lookup in render() never matched, causing every render to rebuild the card and reset the spinner animation. Fix: wrap tuple[0] with String() to ensure type consistency. Also reverts the length<2 guard introduced in fix/spinner-reset back to length<1 — the stricter guard was filtering out single-element tuples that ComfyUI may send before full execution context is available, causing running tasks to not appear at all before the K-sampler step.
Two root causes identified via Playwright instrumentation: 1. normalizeQueue used String(tuple[0]) (integer) for running tasks but tuple[1] (UUID) for pending tasks. The same task had different promptIds in each state, so render()'s keyed reconciliation never matched the existing pending card — rebuilding it on every render and resetting the spinner animation. Fix: prefer tuple[1] (UUID) for running tasks; fall back to String(tuple[0]) only for single-element tuples ComfyUI may send before full execution context is available. 2. onExecutionStart called render() without updating state. Because the /queue API fetch had not yet returned, state.running was empty and updateBadge() cleared the badge to 0. For fast or fully-cached workflows the task could complete before any fetch returned, so badge and card never appeared. Fix: read detail.prompt_id from the WS event and immediately move the task from state.pending to state.running (or create a running entry if not yet tracked). Badge and card now appear within ~10 ms of pressing Queue — no API round-trip required. Adds regression tests for pending→running ID consistency and single-element tuple fallback.
- 5 E2E tests: cached state, pending order, no duplicate cards, instant badge via WS execution_start, no console warnings - Shared helpers with client_id-aware queuePrompt - Playwright config (single worker, headless, failure traces) - Add test:e2e script to package.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎯 Overview
Bug-fix release focusing on queue rendering reliability — resolving card flickering, sort-order regressions, delayed UI updates, and a media-type collision that appeared after 1.1.0.
📋 Summary
execution_start, no longer waiting for API poll🐛 Bug Fixes
Card Reconciliation
bcb64f1card.replaceWith— store themakeCard()return value directly instead of re-querying by DOM index, preventing stale-reference mismatchesbb2e35d0d3ff9ftuple[1](UUID) instead oftuple[0](numeric index) fromqueue_running, so the running card correctly reconciles across the pending → running transitionSort Order & Timing
419a55dc13c933execution_start— move the task from pending → running using the WebSocket event rather than waiting for the next/queueAPI poll; fixes fast/cached workflows completing before the UI updates7d0576frender()insidebuildSidebar()so cached state displays instantly without waiting for an API round-tripMedia Type
54d89ad.oggwith.ogainAUDIO_EXTS— resolve the.oggcollision betweenVIDEO_EXTSandAUDIO_EXTSby using the audio-specific.ogaextension🧪 Testing
Unit Tests — Vitest
3 new test cases + 3 existing tests updated to match new
normalizeQueuetuple format:normalizeQueue— running/pending promptId consistency across transition, single-element tuple fallbackE2E Tests — Playwright (
7f94d11)5 end-to-end tests running against a live ComfyUI instance, each with a strict assertion strategy that isolates the exact behavior being verified:
buildSidebar()callsrender()beforerefresh()/api/queue+/api/historywith 3 s delay → assert cards appear within 500 ms (must come from in-memory cache)[...pending, ...running, ...history]card.replaceWithfix doesn't create ghost nodesdata-idvalues at any pointonExecutionStartworks independently of API poll/api/queuewith 30 s delay → assert running card + badge still appear (only possible via WSexecution_start→render())[QueueSidebar]console.warnduring a full queue→complete cycle → assert empty✅ Verification