Feat: Add TTS to analysis tabs and improve Research Queries UX

- Add TextToSpeechButton to Outline, Takeaways, and Guest tabs in analysis phase
- Add help icon with tooltip to Research Queries explaining the workflow
- Change Run Research button to show 'Next: Select Query' when disabled
- Add hint text 'Select a query to continue' when no queries selected
This commit is contained in:
ajaysi
2026-04-06 17:59:13 +05:30
parent 12960a22ea
commit 3f1d5cbb09
4 changed files with 50 additions and 5 deletions

View File

@@ -3,12 +3,15 @@ import { Stack, Box, Typography, Chip, Paper } from "@mui/material";
import { Quiz as TalkIcon } from "@mui/icons-material";
import { PodcastAnalysis } from "../../types";
import { AnalysisTabContent } from "../AnalysisTabNav";
import { TextToSpeechButton } from "../../../shared/TextToSpeechButton";
interface GuestTabProps {
analysis: PodcastAnalysis;
}
export const GuestTab: React.FC<GuestTabProps> = ({ analysis }) => {
const talkingPointsText = analysis.guest_talking_points?.map((p, idx) => `Question ${idx + 1}: ${p}`).join(" ") || "";
if (!analysis.guest_talking_points || analysis.guest_talking_points.length === 0) {
return (
<AnalysisTabContent title="Guest Talking Points" icon={<TalkIcon />}>
@@ -22,6 +25,9 @@ export const GuestTab: React.FC<GuestTabProps> = ({ analysis }) => {
return (
<AnalysisTabContent title="Guest Talking Points" icon={<TalkIcon />}>
<Stack spacing={2}>
<Box sx={{ display: "flex", justifyContent: "flex-end", mb: 1 }}>
<TextToSpeechButton text={talkingPointsText} size="small" showSettings />
</Box>
{analysis.guest_talking_points.map((point: string, idx: number) => (
<Paper key={idx} elevation={0} sx={{ p: 2, bgcolor: "#faf5ff", border: "1px solid rgba(168,85,247,0.2)", borderRadius: 2, display: "flex", alignItems: "flex-start", gap: 1.5 }}>
<Chip label="Q" size="small" sx={{ minWidth: 24, bgcolor: "#a855f7", color: "#fff" }} />