import type { components } from '@/api/schema'
import { I } from '@/components/icons'
import { ProgressRow } from '@/components/ui/primitives'
type Transcript = components['schemas']['GetTranscriptWithParticipants']
const FLAG_NOTE =
'New design pending for this flow. This placeholder keeps the route accessible while the pipeline finishes.'
export function StatusPlaceholder({ transcript }: { transcript: Transcript }) {
const kind = kindFor(transcript)
return (
{kind.icon}
{kind.title}
{kind.body}
{kind.showProgress &&
}
{FLAG_NOTE}
)
}
function kindFor(t: Transcript) {
const status = t.status
if (status === 'recording' || (status === 'idle' && t.source_kind === 'live')) {
return {
icon: pulseDot(),
title: 'Live recording in progress',
body: 'This transcript is being captured live. The full detail view will appear once the session ends.',
showProgress: false as const,
}
}
if (status === 'idle' && t.source_kind === 'file') {
return {
icon: (
{I.FileAudio(22)}
),
title: 'Waiting for upload',
body: 'This transcript is pending an audio file. Upload from the transcript detail view on the legacy app, or trigger the upload flow from a new recording.',
showProgress: false as const,
}
}
if (status === 'uploaded' || status === 'processing') {
return {
icon: (
{I.Loader(22)}
),
title: 'Processing the recording…',
body: 'The pipeline is transcribing, diarizing and summarizing. This page will update automatically when the transcript is ready.',
showProgress: true as const,
stage: status === 'uploaded' ? 'Uploaded' : 'Transcribing',
}
}
return {
icon: (
{I.Clock(22)}
),
title: 'Not ready',
body: 'This transcript is not in a viewable state yet.',
showProgress: false as const,
}
}
function pulseDot() {
return (
)
}