diff --git a/attached_assets/image_1756822814457.png b/attached_assets/image_1756822814457.png new file mode 100644 index 0000000..ecaeb67 Binary files /dev/null and b/attached_assets/image_1756822814457.png differ diff --git a/client/src/pages/admin.tsx b/client/src/pages/admin.tsx index 4a4ae93..f54a001 100644 --- a/client/src/pages/admin.tsx +++ b/client/src/pages/admin.tsx @@ -320,17 +320,19 @@ function EditVideoDialog({ if (data && data.description) { console.log("Setting description:", data.description); // Debug log - const newFormData = { - ...formData, - description: data.description - }; - setFormData(newFormData); - // Automatically save the generated description with proper type conversion + // Update only the description field, keep all other current form data + setFormData(prev => ({ + ...prev, + description: data.description + })); + + // For saving, use current formData but update description const processedData = { - ...newFormData, - episodeNumber: newFormData.episodeNumber ? parseInt(newFormData.episodeNumber.toString()) : null, - tags: Array.isArray(newFormData.tags) ? newFormData.tags : [] + ...formData, // Use current form data + description: data.description, // Only update description + episodeNumber: formData.episodeNumber ? parseInt(formData.episodeNumber.toString()) : null, + tags: Array.isArray(formData.tags) ? formData.tags : [] }; // Save without closing modal for AI generation