From 9033261165d997d75d0df67ba6fe18adff610d80 Mon Sep 17 00:00:00 2001 From: Dylan De Faoite Date: Wed, 19 Aug 2026 18:34:11 +0100 Subject: [PATCH] feat(clipping): add title requirement check --- frontend/src/components/video/MetadataBox.tsx | 5 ++++- frontend/src/pages/ClipEdit.tsx | 8 +++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/video/MetadataBox.tsx b/frontend/src/components/video/MetadataBox.tsx index f2308b9..a959932 100644 --- a/frontend/src/components/video/MetadataBox.tsx +++ b/frontend/src/components/video/MetadataBox.tsx @@ -9,9 +9,12 @@ type Props = { const MetadataBox = ({ setMetadata, className }: Props) => (
-

Title

+

+ Title * +

setMetadata(prev => ({ ...prev, title: e.target.value }))} className="border border-hairline bg-fields rounded-md w-full p-2 text-sm focus:outline-none focus:ring-2 focus:ring-muted transition-colors" diff --git a/frontend/src/pages/ClipEdit.tsx b/frontend/src/pages/ClipEdit.tsx index 267f836..f40362e 100644 --- a/frontend/src/pages/ClipEdit.tsx +++ b/frontend/src/pages/ClipEdit.tsx @@ -64,12 +64,18 @@ const ClipEdit = () => { const sendData = async () => { if (!localFile || uploading) return; + const title = outputMetadata.title.trim(); + if (!title) { + setError('A title is required before exporting.'); + return; + } + setUploading(true); setError(null); let jobId: string; try { - jobId = await compress(localFile, outputMetadata); + jobId = await compress(localFile, { ...outputMetadata, title }); setUploadedId(jobId); } catch (err: unknown) { setError(`Failed to start compression: ${err instanceof Error ? err.message : 'Unknown error'}`);