(thumbnailContainer, filePath)
| 16094 | console.log('Thumbnail generation cancelled, stopping process'); |
| 16095 | window._scanThumbnailProgress = null; |
| 16096 | break; |
| 16097 | } |
| 16098 | } |
| 16099 | |
| 16100 | // Wait for any remaining active promises to complete |
| 16101 | if (activePromises.size > 0) { |
| 16102 | await Promise.all(Array.from(activePromises)); |
| 16103 | } |
| 16104 | window._scanThumbnailProgress = null; |
| 16105 | } else { |
| 16106 | if (!background) { |
| 16107 | renderProgressBar.style.width = '100%'; |
| 16108 | renderProgressText.textContent = 'All thumbnails up to date'; |
| 16109 | } |
| 16110 | } |
| 16111 | |
| 16112 | // Foreground scans: reset filter UI and counts. Background scans (Docker STL Home polling, etc.) skip this. |
| 16113 | if (!background) { |
| 16114 | document.getElementById('designer-select').value = ''; |
| 16115 | document.getElementById('parent-select').value = ''; |
| 16116 | document.getElementById('printed-select').value = 'all'; |
| 16117 | const newSelFg = document.getElementById('new-select'); |
| 16118 | if (newSelFg) newSelFg.value = 'all'; |
| 16119 | document.getElementById('tag-filter').value = ''; |
| 16120 | |
| 16121 | const totalInDb = await window.electron.getTotalModelCount(); |
| 16122 | await updateModelCounts(totalInDb); |
| 16123 | } |
| 16124 | |
| 16125 | // "New Models Found" prompt: run for any scan that reported new inserts (including background/server STL Home). |
| 16126 | if (newFilesCount > 0) { |
| 16127 | if (background) { |
| 16128 | window.disableGridRefresh = false; |
| 16129 | } |
| 16130 | const result = await window.electron.showMessageBox({ |
no test coverage detected