feat: Improve podcast maker UX and fix bugs

Frontend:
- Add progress modals with educational content for analysis and voice cloning
- Improve tab navigation in AnalysisPanel (combine Titles, Hook, CTA into one tab)
- Fix tab styling to make inactive tabs visible
- Fix avatar 'Make Presentable' not updating preview (blob URL handling)
- Improve mobile responsiveness for avatar tabs
- Clean up verbose console logging (AnalysisPanel, demoMode, RobustCamera)
- Add sequential progress messages instead of cycling

Backend:
- Fix 'Depends object has no attribute get' error in auth and image editing
- Use get_session_for_user instead of get_db outside FastAPI DI context
- Reduce WARNING logs to DEBUG in audio handler
- Add proper emphasis boolean handling in script generation
- Add missing fields to PodcastScene and PodcastSceneLine models
- Fix voice cloning cost estimate display issue
This commit is contained in:
ajaysi
2026-04-07 16:28:11 +05:30
parent 1a456b21b7
commit e59c77b221
17 changed files with 851 additions and 198 deletions

View File

@@ -1,4 +1,4 @@
import { useState, useEffect, useMemo, useCallback } from "react";
import React, { useState, useEffect, useMemo, useCallback, useRef } from "react";
import { podcastApi } from "../../../services/podcastApi";
import { usePreflightCheck } from "../../../hooks/usePreflightCheck";
import { useBudgetTracking } from "../../../hooks/useBudgetTracking";
@@ -344,8 +344,8 @@ export const usePodcastWorkflow = ({ projectState, onError }: UsePodcastWorkflow
}
}, [isResearching, project, selectedQueries, queries, researchProvider, preflightCheck, analysis, setResearch, setRawResearch, setScriptData, setShowScriptEditor, setShowRenderQueue, projectState.bible]);
// Add a ref to track if we're currently generating to prevent double calls
const isGeneratingRef = React.useRef(false);
// Add a ref to track if we're currently generating to prevent double calls
const isGeneratingRef = useRef(false);
const handleGenerateScript = useCallback(async () => {
// Guard against double calls
@@ -360,8 +360,9 @@ export const usePodcastWorkflow = ({ projectState, onError }: UsePodcastWorkflow
return;
}
// Mark as generating immediately
// Mark as generating immediately (both ref and state)
isGeneratingRef.current = true;
setIsGeneratingScript(true);
setPreflightOperationName("Script Generation");
const preflightResult = await preflightCheck.check({
@@ -373,13 +374,13 @@ export const usePodcastWorkflow = ({ projectState, onError }: UsePodcastWorkflow
if (!preflightResult.can_proceed) {
isGeneratingRef.current = false; // Reset on preflight failure
setIsGeneratingScript(false); // Reset loading state on preflight failure
return;
}
setScriptData(null);
setShowRenderQueue(false);
setShowScriptEditor(true);
setIsGeneratingScript(true);
setAnnouncement("Generating script with AI... Creating scenes and dialogue based on your research...");
try {