From 45d2b0b69352f4a0d56e5cde2156dc250806c28c Mon Sep 17 00:00:00 2001 From: ajaysi Date: Mon, 6 Apr 2026 16:20:28 +0530 Subject: [PATCH] Fix: Remove duplicate Research Queries section in podcast maker - Remove Research Queries section from AnalysisPanel.tsx - Keep QuerySelection component as single source for research queries - Remove unused props (onRunResearch, isResearchRunning, selectedQueries, etc.) --- .../components/PodcastMaker/AnalysisPanel.tsx | 117 +----------------- .../PodcastMaker/PodcastDashboard.tsx | 5 - 2 files changed, 3 insertions(+), 119 deletions(-) diff --git a/frontend/src/components/PodcastMaker/AnalysisPanel.tsx b/frontend/src/components/PodcastMaker/AnalysisPanel.tsx index 7bde1257..474379bf 100644 --- a/frontend/src/components/PodcastMaker/AnalysisPanel.tsx +++ b/frontend/src/components/PodcastMaker/AnalysisPanel.tsx @@ -1,6 +1,6 @@ import React, { useState, useEffect } from "react"; -import { Stack, Box, Typography, Divider, Chip, Paper, alpha, CircularProgress, Button, Checkbox } from "@mui/material"; -import { Psychology as PsychologyIcon, Insights as InsightsIcon, Search as SearchIcon, Person as PersonIcon, AutoAwesome as AutoAwesomeIcon, Edit as EditIcon, Save as SaveIcon, Close as CloseIcon, Add as AddIcon, EditNote as EditNoteIcon, Input as InputIcon, Groups as GroupsIcon, ListAlt as ListAltIcon, RecordVoiceOver as VoiceIcon, Lightbulb as TipsIcon, Quiz as TalkIcon } from "@mui/icons-material"; +import { Stack, Box, Typography, Divider, Chip, alpha, Button } from "@mui/material"; +import { Psychology as PsychologyIcon, Insights as InsightsIcon, Person as PersonIcon, AutoAwesome as AutoAwesomeIcon, Edit as EditIcon, Save as SaveIcon, Close as CloseIcon, Add as AddIcon, EditNote as EditNoteIcon, Input as InputIcon, Groups as GroupsIcon, ListAlt as ListAltIcon, RecordVoiceOver as VoiceIcon, Lightbulb as TipsIcon, Quiz as TalkIcon } from "@mui/icons-material"; import { PodcastAnalysis, PodcastEstimate } from "./types"; import { GlassyCard, glassyCardSx, SecondaryButton } from "./ui"; import { Refresh as RefreshIcon } from "@mui/icons-material"; @@ -17,11 +17,6 @@ interface AnalysisPanelProps { avatarPrompt?: string | null; onRegenerate?: () => void; onUpdateAnalysis?: (updatedAnalysis: PodcastAnalysis) => void; - onRunResearch?: () => void; - isResearchRunning?: boolean; - selectedQueries?: Set; - onToggleQuery?: (queryId: string) => void; - queries?: { id: string; query: string; rationale: string }[]; } type TabId = 'inputs' | 'audience' | 'content' | 'outline' | 'titles' | 'hook' | 'takeaways' | 'cta' | 'guest'; @@ -68,12 +63,7 @@ export const AnalysisPanel: React.FC = ({ avatarUrl, avatarPrompt, onRegenerate, - onUpdateAnalysis, - onRunResearch, - isResearchRunning, - selectedQueries, - onToggleQuery, - queries + onUpdateAnalysis }) => { const [activeTab, setActiveTab] = useState('inputs'); const [avatarBlobUrl, setAvatarBlobUrl] = useState(null); @@ -454,107 +444,6 @@ export const AnalysisPanel: React.FC = ({ )} - - {/* Research Section - Separate from tabs */} - - - - - - - Research Queries - {selectedQueries && selectedQueries.size > 0 && ( - - )} - - {onRunResearch && ( - - )} - - - {!analysis?.research_queries || analysis.research_queries.length === 0 ? ( - - No research queries yet. Click "Regenerate Analysis" to generate research queries based on your podcast idea. - - ) : ( - - {(queries || analysis.research_queries?.map((rq, idx) => ({ id: `query-${idx}`, ...rq }))).map((rq: { id: string; query: string; rationale: string }, idx: number) => { - const queryId = rq.id; - const isSelected = selectedQueries?.has(queryId) || false; - return ( - onToggleQuery?.(queryId)} - > - - onToggleQuery?.(queryId)} - sx={{ - color: "#64748b", - "&.Mui-checked": { - color: "#4f46e5", - }, - padding: 0.5, - }} - /> - - - - {rq.query} - - - Rationale: {rq.rationale} - - - - - ); - })} - - )} - ); diff --git a/frontend/src/components/PodcastMaker/PodcastDashboard.tsx b/frontend/src/components/PodcastMaker/PodcastDashboard.tsx index 1cd83a65..4152bf55 100644 --- a/frontend/src/components/PodcastMaker/PodcastDashboard.tsx +++ b/frontend/src/components/PodcastMaker/PodcastDashboard.tsx @@ -242,11 +242,6 @@ const PodcastDashboard: React.FC = () => { avatarPrompt={project?.avatarPrompt} onRegenerate={() => setShowRegenModal(true)} onUpdateAnalysis={(updated) => projectState.setAnalysis(updated)} - onRunResearch={() => workflow.handleRunResearch()} - isResearchRunning={workflow.isResearching} - selectedQueries={selectedQueries} - onToggleQuery={workflow.toggleQuery} - queries={queries} /> )}