From 74c3685397bfd2e54304bda18f5c4fc5564dc30e Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 3 Oct 2026 14:08:37 +0000 Subject: [PATCH] fix(web): offer media card follow-ups on any settled job Failed or cancelled jobs can still carry finished outputs, so the card asks for the space's capabilities whenever a settled job shows video or audio. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01MRtGG9ARfqqhma3t85Ro2u --- apps/web/src/components/media/MediaCard.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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) => {