@@ -266,17 +266,30 @@ async function updateQueueUI() {
266266 // Update stats
267267 queueStats . textContent = `${ stats . queued } queued, ${ stats . processing } processing, ${ stats . complete } complete` ;
268268
269- // Show/hide container
270- if ( jobs . length > 0 ) {
271- queueContainer . style . display = 'block' ;
272- } else {
273- queueContainer . style . display = 'none' ;
274- return ;
275- }
269+ // Queue container is always visible (removed hide/show logic for always-visible queue)
276270
277271 // Build job list
278272 queueList . innerHTML = '' ;
279273
274+ if ( jobs . length === 0 ) {
275+ const emptyEl = document . createElement ( 'div' ) ;
276+ emptyEl . className = 'queue-empty-state' ;
277+ emptyEl . innerHTML = `
278+ <div class="empty-icon">
279+ <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" style="opacity: 0.5;">
280+ <path d="M3 7v10a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2z"></path>
281+ <path d="M8 21v-4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v4"></path>
282+ <line x1="9" y1="7" x2="9" y2="7"></line>
283+ <line x1="15" y1="7" x2="15" y2="7"></line>
284+ </svg>
285+ </div>
286+ <h4>No jobs in queue</h4>
287+ <p>Enable "Background Queue Mode" and submit a job to get started</p>
288+ ` ;
289+ queueList . appendChild ( emptyEl ) ;
290+ return ;
291+ }
292+
280293 for ( const job of jobs . sort ( ( a , b ) => b . id - a . id ) ) {
281294 const jobEl = document . createElement ( 'div' ) ;
282295 jobEl . className = `queue-job queue-job-${ job . status } ` ;
@@ -465,6 +478,24 @@ window.clearCompletedJobs = async function() {
465478 updateQueueUI ( ) ;
466479} ;
467480
481+ window . refreshQueueDisplay = async function ( ) {
482+ // Add a small visual feedback for the refresh
483+ const refreshBtn = document . querySelector ( '.queue-btn-refresh' ) ;
484+ if ( refreshBtn ) {
485+ refreshBtn . style . opacity = '0.7' ;
486+ setTimeout ( ( ) => {
487+ refreshBtn . style . opacity = '1' ;
488+ } , 200 ) ;
489+ }
490+
491+ // Force refresh the queue display
492+ updateQueueUI ( ) ;
493+
494+ // Also refresh the queue stats
495+ const stats = await queueManager . getQueueStats ( ) ;
496+ console . log ( 'Queue refreshed:' , stats ) ;
497+ } ;
498+
468499// ===== INITIALIZATION =====
469500
470501document . addEventListener ( 'DOMContentLoaded' , async ( ) => {
0 commit comments