Fix progress overlay, play-from-position, layout cutoff, speaker info

- Replace progress bar with task checklist showing pipeline steps
  (load model, transcribe, load diarization, identify speakers, merge)
- Fix WaveformPlayer: track ready state, disable controls until loaded,
  play from current position instead of resetting to start
- Fix workspace height calc to prevent bottom content cutoff
- Show HF_TOKEN setup hint in SpeakerManager when no speakers detected
- Add console logging for progress events to aid debugging

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-26 18:02:48 -08:00
parent 4d7b9d524f
commit ed626b8ba0
5 changed files with 141 additions and 36 deletions

View File

@@ -7,6 +7,38 @@
}
let { visible = false, percent = 0, stage = '', message = '' }: Props = $props();
// Map internal stage names to user-friendly labels
const stageLabels: Record<string, string> = {
'pipeline': 'Pipeline',
'loading_model': 'Loading Model',
'transcribing': 'Transcribing',
'loading_diarization': 'Loading Diarization',
'diarizing': 'Speaker Detection',
'done': 'Complete',
};
// Pipeline steps for the task list
const pipelineSteps = [
{ key: 'loading_model', label: 'Load transcription model' },
{ key: 'transcribing', label: 'Transcribe audio' },
{ key: 'loading_diarization', label: 'Load speaker detection model' },
{ key: 'diarizing', label: 'Identify speakers' },
{ key: 'merging', label: 'Merge results' },
];
function getStepStatus(stepKey: string, currentStage: string): 'pending' | 'active' | 'done' {
const stepOrder = pipelineSteps.map(s => s.key);
const currentIdx = stepOrder.indexOf(currentStage);
const stepIdx = stepOrder.indexOf(stepKey);
if (currentStage === 'done') return 'done';
if (stepIdx < currentIdx) return 'done';
if (stepIdx === currentIdx) return 'active';
return 'pending';
}
let displayStage = $derived(stageLabels[stage] || stage || 'Processing...');
</script>
{#if visible}
@@ -14,12 +46,28 @@
<div class="progress-card">
<div class="spinner-row">
<div class="spinner"></div>
<h3>{stage || 'Processing...'}</h3>
<h3>{displayStage}</h3>
</div>
<div class="bar-track">
<div class="bar-fill" style="width: {Math.max(percent, 2)}%"></div>
<div class="steps">
{#each pipelineSteps as step}
{@const status = getStepStatus(step.key, stage)}
<div class="step" class:step-done={status === 'done'} class:step-active={status === 'active'}>
<span class="step-icon">
{#if status === 'done'}
{:else if status === 'active'}
{:else}
·
{/if}
</span>
<span class="step-label">{step.label}</span>
</div>
{/each}
</div>
<p class="status-text">{percent}% — {message || 'Please wait...'}</p>
<p class="status-text">{message || 'Please wait...'}</p>
<p class="hint-text">This may take several minutes for large files</p>
</div>
</div>
@@ -39,7 +87,8 @@
background: #16213e;
padding: 2rem 2.5rem;
border-radius: 12px;
min-width: 420px;
min-width: 380px;
max-width: 440px;
color: #e0e0e0;
border: 1px solid #2a3a5e;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
@@ -57,35 +106,52 @@
border-top-color: #e94560;
border-radius: 50%;
animation: spin 0.8s linear infinite;
flex-shrink: 0;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
h3 {
margin: 0;
text-transform: capitalize;
font-size: 1.1rem;
}
.bar-track {
height: 10px;
background: #0f3460;
border-radius: 5px;
overflow: hidden;
.steps {
display: flex;
flex-direction: column;
gap: 0.4rem;
margin-bottom: 1rem;
}
.bar-fill {
height: 100%;
background: linear-gradient(90deg, #e94560, #ff6b81);
transition: width 0.3s;
border-radius: 5px;
.step {
display: flex;
align-items: center;
gap: 0.5rem;
font-size: 0.85rem;
color: #555;
}
.step-done {
color: #4ecdc4;
}
.step-active {
color: #e0e0e0;
font-weight: 500;
}
.step-icon {
width: 1.2rem;
text-align: center;
flex-shrink: 0;
}
.step-active .step-icon {
animation: spin 1.5s linear infinite;
display: inline-block;
}
.status-text {
margin: 0.75rem 0 0;
font-size: 0.9rem;
font-size: 0.85rem;
color: #b0b0b0;
}
.hint-text {
margin: 0.5rem 0 0;
font-size: 0.75rem;
color: #666;
color: #555;
}
</style>