{/* Left: Video Preview — 9:16 column matching the fixed card height */}
{/* A full-width 9:16 preview on a phone is ~640px tall on its own,
which pushed the title, captions and every action off-screen.
Capping the height and centring keeps the whole card scannable
without letterboxing the clip. */}
{/* Right: Content & Details */}
{clip.video_title_for_youtube_short || "Viral Clip Generated"}
{/* The score alone says how much, not why. One line from
the selection pass on what this moment has going for it. */}
{clip.why && (
setWhyOpen(true)}
onMouseLeave={() => setWhyOpen(false)}
>
whyClamped && setWhyOpen(v => !v)}
aria-label="why openshorts picked this moment"
>
{clip.why}
{whyClamped && whyOpen && (
{clip.why}
)}
)}
{durationReadout && {durationReadout}}
{resolution && {resolution}}
#shorts
#viral
{/* Descriptions (compact) — full text lives in the modal */}
YOUTUBE
{clip.video_title_for_youtube_short || "Viral Short Video"}
TIKTOK · IG
{clip.video_description_for_tiktok || clip.video_description_for_instagram}
{/* Error Message */}
{editError && (
)}
{/* Actions Footer */}
{onEditClip && (
)}
{onReframeClip && (
)}
{/* Descriptions Modal */}
setShowDescModal(false)}
eyebrow="GENERATED COPY"
title="descriptions"
size="md"
>
{clip.video_title_for_youtube_short || "Viral Short Video"}
{clip.video_description_for_tiktok || clip.video_description_for_instagram}
{/* Post Modal */}
setShowModal(false)}
eyebrow="PUBLISH"
title="post clip"
size="md"
footer={
noAccountsConnected ? (
) : (
)
}
>
{!canPost && (
configure api key in settings first.
)}
{noAccountsConnected && (
no social accounts connected yet — link tiktok, instagram or youtube to publish this clip.
)}
{/* Both the title/description fields below and the schedule
button are downstream of this: on a tiktok draft neither
travels. See TikTokDraftNotice. */}
{platforms.tiktok && }
{/* Title & Description */}
setPostTitle(e.target.value)}
className="input-field"
placeholder="enter a catchy title…"
/>
{/* Scheduling */}
{/* Platforms */}
platforms[k])}
onChange={(arr) => setPlatforms({
tiktok: arr.includes('tiktok'),
instagram: arr.includes('instagram'),
youtube: arr.includes('youtube'),
})}
/>
{postResult && (
{postResult.success ?
:
}
{postResult.msg}
)}
setShowSubtitleModal(false)}
onGenerate={handleSubtitle}
onApplyAll={onBulkSubtitle ? async (options) => {
await onBulkSubtitle(options);
setShowSubtitleModal(false);
} : undefined}
onRemove={handleRemoveSubtitles}
bulkCount={clipCount}
bulkProgress={bulkProgress}
isProcessing={isSubtitling || (bulkProgress?.running ?? false)}
videoUrl={originalVideoUrl}
jobId={jobId}
clipIndex={index}
existingHook={activeLayers.hook}
/>
setShowHookModal(false)}
onGenerate={handleHook}
isProcessing={isHooking}
videoUrl={originalVideoUrl}
initialText={clip.viral_hook_text}
durationInSeconds={clip.end && clip.start ? clip.end - clip.start : 30}
existingSubtitles={activeLayers.subtitles}
hasCaptions={!!activeLayers.subtitles || /(^|_)subtitled_/.test(serverVideoFile || '')}
serverRender={hasServerBurns}
burnedHook={burnedHook}
onRemove={burnedHook ? handleRemoveHook : null}
/>
setShowTranslateModal(false)}
onTranslate={handleTranslate}
isProcessing={isTranslating}
videoUrl={currentVideoUrl}
hasApiKey={!!elevenLabsKey}
/>
{showWatermarkModal && (
setShowWatermarkModal(false)}
onContinue={downloadClip}
/>
)}
);
}