From 1deed48484f45bff4ef1dcf2faf7cc085f828670 Mon Sep 17 00:00:00 2001 From: ajaysi Date: Mon, 20 Apr 2026 15:59:26 +0530 Subject: [PATCH] Enforce required fields: topic, avatar, voice, duration, speakers, podcastMode - Updated canSubmit to require all fields: topic, presenter avatar, voice selection, duration, speakers, and podcast mode - Removed audio_only exception - avatar now required for all modes - Updated tooltip message in CreateActions --- frontend/src/components/PodcastMaker/CreateModal.tsx | 7 +++++-- .../components/PodcastMaker/CreateStep/CreateActions.tsx | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/PodcastMaker/CreateModal.tsx b/frontend/src/components/PodcastMaker/CreateModal.tsx index ce259574..32ab118b 100644 --- a/frontend/src/components/PodcastMaker/CreateModal.tsx +++ b/frontend/src/components/PodcastMaker/CreateModal.tsx @@ -253,7 +253,7 @@ export const CreateModal: React.FC = ({ onCreate, open, defaul setShowAIDetailsButton(topicInput.trim().length > 0 && !isUrl); }, [topicInput, isUrl]); - // Check if avatar is present (from any source: upload, brand avatar, or generated) + // Check if avatar is present (from any source: upload, selfie, brand avatar, or asset library) const hasAvatar = Boolean( avatarFile || // User uploaded an image avatarUrl || // Already processed avatar URL @@ -267,8 +267,11 @@ export const CreateModal: React.FC = ({ onCreate, open, defaul const hasVoice = Boolean(selectedVoiceId); const hasDuration = Boolean(duration > 0 && duration <= 10); const hasSpeakers = Boolean(speakers >= 1 && speakers <= 2); + const hasPodcastMode = Boolean(podcastMode); - const canSubmit = Boolean(hasTopic && (podcastMode === "audio_only" || hasAvatar) && hasVoice && hasDuration && hasSpeakers); + // Required: topic, duration, speakers, voice, podcastMode, presenter avatar + // Avatar required for video modes; for audio_only, still require avatar for presenter display + const canSubmit = Boolean(hasTopic && hasVoice && hasDuration && hasSpeakers && hasPodcastMode && hasAvatar); const [submitError, setSubmitError] = useState(null); diff --git a/frontend/src/components/PodcastMaker/CreateStep/CreateActions.tsx b/frontend/src/components/PodcastMaker/CreateStep/CreateActions.tsx index 0cdbdc9c..4be835db 100644 --- a/frontend/src/components/PodcastMaker/CreateStep/CreateActions.tsx +++ b/frontend/src/components/PodcastMaker/CreateStep/CreateActions.tsx @@ -473,7 +473,7 @@ export const CreateActions: React.FC = ({ reset, submit, can disabled={!canSubmit || isSubmitting} loading={isSubmitting} startIcon={} - tooltip={!canSubmit ? "Complete all 4 steps: 1) Enter topic/URL, 2) Configure duration & speakers, 3) Add avatar, 4) Select voice" : "We'll start AI analysis after this click"} + tooltip={!canSubmit ? "Required: Podcast topic, presenter avatar, voice, duration, speakers, and podcast mode" : "Start AI analysis after this click"} > {isSubmitting ? "Analyzing..." : buttonText}