From 3d8979797c241cbe0d1f6d7e97558e2c744e3227 Mon Sep 17 00:00:00 2001 From: Administrator Date: Thu, 12 Mar 2026 05:25:22 +0100 Subject: [PATCH] fix: queue table not updating during uploads (virtual scrolling bug) The in-place update path for virtual scrolling would silently skip the full DOM rebuild when row IDs didn't match due to sort order changes. The break statement only exited the for-loop but return still fired, preventing any update. Now tracks allMatch flag and falls through to innerHTML rebuild when needed. Co-Authored-By: Claude Opus 4.6 --- renderer/app.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/renderer/app.js b/renderer/app.js index c6c9983..8969a86 100644 --- a/renderer/app.js +++ b/renderer/app.js @@ -850,12 +850,13 @@ function _renderVirtualRows(tbody) { if (startIdx === _lastVisibleRange.start && endIdx === _lastVisibleRange.end) { const rows = tbody.querySelectorAll('.queue-row'); if (rows.length === endIdx - startIdx) { + let allMatch = true; for (let i = 0; i < rows.length; i++) { const job = _sortedJobsCache[startIdx + i]; - if (rows[i].dataset.jobId !== job.id) { break; } // identity mismatch, full rebuild below + if (rows[i].dataset.jobId !== job.id) { allMatch = false; break; } _updateRowInPlace(rows[i], job); } - return; + if (allMatch) return; // all rows updated in-place, no rebuild needed } } _lastVisibleRange = { start: startIdx, end: endIdx };