diff --git a/apps/web/src/components/media/MediaCard.tsx b/apps/web/src/components/media/MediaCard.tsx index 4231a37..8c319ea 100644 --- a/apps/web/src/components/media/MediaCard.tsx +++ b/apps/web/src/components/media/MediaCard.tsx @@ -41,6 +41,8 @@ export interface MediaCardAvailability { transcribe: boolean; } +const NOTHING_AVAILABLE: MediaCardAvailability = { export: false, transcribe: false }; + const OPERATION_ICONS: Record = { generate_image: Sparkles, generate_video: Sparkles, @@ -171,7 +173,7 @@ function OutputActions({ export function MediaCardView({ block, target, - available = { export: false, transcribe: false }, + available = NOTHING_AVAILABLE, onAction, }: { block: MediaJobBlock; @@ -304,7 +306,6 @@ export function MediaCardView({ ); } -const NOTHING_AVAILABLE: MediaCardAvailability = { export: false, transcribe: false }; const CAPABILITIES_TTL_MS = 60_000; let capabilities: | { spaceId: string | null; at: number; value: Promise } @@ -359,9 +360,9 @@ export function MediaCard({ /** The message carrying the card; a follow-up job is posted by the same bot. */ messageId: string; }) { - // Follow-ups apply to finished video and audio only; other cards never ask. + // Follow-ups apply to video and audio of a settled job only; other cards never ask. const available = useAvailability( - block.status === "done" && + !isActiveMediaStatus(block.status) && block.outputs.some((output) => output.kind === "video" || output.kind === "audio"), ); const onAction = async (action: MediaCardAction) => {