Fix discovery phase appearing frozen
Scanner now updates message every 250 files during os.walk so the UI shows a live count. Progress bar switches to an indeterminate animated pulse during discovery and takeout phases (no known total yet), then reverts to a normal percentage bar once indexing begins. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -212,6 +212,14 @@
|
||||
background: var(--accent);
|
||||
transition: width .3s;
|
||||
}
|
||||
.progress-bar-fill.indeterminate {
|
||||
width: 40% !important;
|
||||
animation: indeterminate 1.4s ease-in-out infinite;
|
||||
}
|
||||
@keyframes indeterminate {
|
||||
0% { transform: translateX(-100%); }
|
||||
100% { transform: translateX(300%); }
|
||||
}
|
||||
.progress-msg { font-size: 12px; color: var(--text-dim); }
|
||||
.phase-pills {
|
||||
display: flex;
|
||||
@@ -1057,8 +1065,13 @@ function updateScanUI(s) {
|
||||
|
||||
if (isRunning) {
|
||||
el('progress-msg').textContent = s.message || '';
|
||||
const pct = s.total > 0 ? Math.round((s.progress / s.total) * 100) : 0;
|
||||
el('progress-fill').style.width = pct + '%';
|
||||
const indeterminate = s.phase === 'discovery' || s.phase === 'takeout' || s.total === 0;
|
||||
const fill = el('progress-fill');
|
||||
fill.classList.toggle('indeterminate', indeterminate);
|
||||
if (!indeterminate) {
|
||||
const pct = Math.round((s.progress / s.total) * 100);
|
||||
fill.style.width = pct + '%';
|
||||
}
|
||||
el('progress-count').textContent = s.total > 0 ? `${fmt(s.progress)} / ${fmt(s.total)}` : '';
|
||||
|
||||
const phaseIdx = PHASES.indexOf(s.phase);
|
||||
|
||||
Reference in New Issue
Block a user