Turn meetings into live agent loops. Record, transcribe, and analyze meetings with real-time AI intelligence — before, during, and after calls.
feat: meeting and recording's page UI updates
Om Gatec6b3d68c1ddd
diff --git a/src/main/db/index.ts b/src/main/db/index.tsindex 76198d2..8990c31 100644--- a/src/main/db/index.ts+++ b/src/main/db/index.ts@@ -285,6 +285,7 @@ function ensureRecordingColumns(): void {addColumnIfMissing('meeting_checklist', "ALTER TABLE recordings ADD COLUMN meeting_checklist TEXT");addColumnIfMissing('collection_id', "ALTER TABLE recordings ADD COLUMN collection_id TEXT");addColumnIfMissing('post_meeting_checklist', "ALTER TABLE recordings ADD COLUMN post_meeting_checklist TEXT");+ addColumnIfMissing('post_meeting_checklist_completed', "ALTER TABLE recordings ADD COLUMN post_meeting_checklist_completed TEXT");}function ensureNudgesHistorySchema(): void {diff --git a/src/main/db/schema.ts b/src/main/db/schema.tsindex 64313a1..8e4856d 100644--- a/src/main/db/schema.ts+++ b/src/main/db/schema.ts@@ -38,6 +38,7 @@ export const recordings = sqliteTable('recordings', {meetingChecklist: text('meeting_checklist'), // JSON: string[] (in-meeting agenda)// Post-meeting analysispostMeetingChecklist: text('post_meeting_checklist'), // JSON: string[] (action items after meeting)+ postMeetingChecklistCompleted: text('post_meeting_checklist_completed'), // JSON: number[] (indices of completed items)});// Meeting Co-Pilot Tablesdiff --git a/src/main/ipc/live-assist.ts b/src/main/ipc/live-assist.tsindex 497607a..635ae25 100644--- a/src/main/ipc/live-assist.ts+++ b/src/main/ipc/live-assist.ts@@ -9,7 +9,7 @@ import { ipcMain, BrowserWindow } from 'electron';import { getLiveAssistService, resetLiveAssistService } from '../services/live-assist.service';import { getMCPInferenceService, resetMCPInferenceService } from '../services/mcp-inference.service';import { createChildLogger } from '../lib/logger';-import type { LiveAssistEvent } from '../../shared/types/live-assist.types';+import type { LiveInsightsEvent } from '../../shared/types/live-assist.types';import type { MCPDisplayResult } from '../../shared/types/mcp.types';const logger = createChildLogger('ipc-live-assist');@@ -33,9 +33,9 @@ export function setupLiveAssistHandlers(): void {// Start Live Assist serviceconst liveAssistService = getLiveAssistService();- liveAssistService.removeAllListeners('assists');- liveAssistService.on('assists', (event: LiveAssistEvent) => {- logger.info({ assistCount: event.assists.length }, 'Sending assists to renderer');+ liveAssistService.removeAllListeners('insights');+ liveAssistService.on('insights', (event: LiveInsightsEvent) => {+ logger.info({ sayCount: event.insights.say_this.length, askCount: event.insights.ask_this.length }, 'Sending insights to renderer');sendToRenderer('live-assist:update', event);});liveAssistService.start();diff --git a/src/main/server/trpc/procedures/recordings.ts b/src/main/server/trpc/procedures/recordings.tsindex ddc14ec..b5f4500 100644--- a/src/main/server/trpc/procedures/recordings.ts+++ b/src/main/server/trpc/procedures/recordings.ts@@ -59,6 +59,10 @@ function toApiRecording(dbRecording: ReturnType<typeof getRecordingById>) {(dbRecording as any).postMeetingChecklist,z.array(z.string()));+ const postMeetingChecklistCompleted = safeJsonParse(+ (dbRecording as any).postMeetingChecklistCompleted,+ z.array(z.number())+ );return {id: dbRecording.id,@@ -84,6 +88,7 @@ function toApiRecording(dbRecording: ReturnType<typeof getRecordingById>) {meetingChecklist: meetingChecklist || null,// Post-meeting analysispostMeetingChecklist: postMeetingChecklist || null,+ postMeetingChecklistCompleted: postMeetingChecklistCompleted || null,};}@@ -350,4 +355,26 @@ export const recordingsRouter = router({return { collectionId: null };}}),++ // Update post-meeting checklist completion status+ updateChecklistCompletion: protectedProcedure+ .input(z.object({+ recordingId: z.number(),+ completedIndices: z.array(z.number()),+ }))+ .output(z.object({ success: z.boolean() }))+ .mutation(async ({ input }) => {+ logger.debug({ recordingId: input.recordingId, completedIndices: input.completedIndices }, 'Updating checklist completion');++ const recording = getRecordingById(input.recordingId);+ if (!recording) {+ throw new Error('Recording not found');+ }++ updateRecordingBySessionId(recording.sessionId, {+ postMeetingChecklistCompleted: JSON.stringify(input.completedIndices),+ });++ return { success: true };+ }),});diff --git a/src/main/services/live-assist.service.ts b/src/main/services/live-assist.service.tsindex d18c389..a468291 100644--- a/src/main/services/live-assist.service.ts+++ b/src/main/services/live-assist.service.ts@@ -2,58 +2,53 @@* Live Assist Service** Runs every 20 seconds during recording, analyzes recent transcript,- * and generates contextual assists (questions, suggestions, actions)+ * and generates contextual assists (things to say, questions to ask)* using an LLM.*/import { EventEmitter } from 'events';-import { v4 as uuid } from 'uuid';import { logger } from '../lib/logger';import { getLLMService } from './llm.service';-import type { LiveAssistItem, LiveAssistResponse } from '../../shared/types/live-assist.types';+import type { LiveInsights } from '../../shared/types/live-assist.types';const log = logger.child({ module: 'live-assist' });const LIVE_ASSIST_INTERVAL_MS = 20000; // 20 seconds-const SYSTEM_PROMPT = `You are a live meeting coach. You receive a rolling 20-second transcript from an ongoing meeting. Your job is to ALWAYS surface helpful nudges — questions to ask, things to say, actions to take.+const SYSTEM_PROMPT = `You are a live meeting coach. You receive a rolling 20-second transcript from an ongoing meeting. Your job is to surface helpful nudges for the User.-IMPORTANT: You MUST always return at least 1-2 assists for every transcript chunk. Never return an empty array. Find something helpful to suggest.+IMPORTANT: All assistance must be directed to the "User" (labeled as [User] in the transcript). Only help the User — do NOT provide assistance for what the other meeting participants (labeled as [Them]) might need. Focus exclusively on what the User can say or ask.---## WHAT TO SURFACE-- A clarifying question worth asking+**say_this** - Things the User could say:- A way to respond to something said-- A vague claim worth pinning down+- An opportunity to summarize or steer the conversation- A topic worth parking for later- A decision that should be captured-- An opportunity to summarize or steer-- A commitment someone made-- Anything where a nudge would help+- A commitment someone made that the User should acknowledge++**ask_this** - Questions the User could ask:+- A clarifying question worth asking+- A vague claim worth pinning down+- Follow-up questions to dig deeper-Even simple observations are valuable. Always find something.+Only surface assists when the User would genuinely benefit. If the conversation is going smoothly and the User doesn't need help, return empty arrays.---## OUTPUT FORMAT-Return a JSON object with an "assists" array. Each item has:-- "type": one of "ask", "speak", "act"-- "urgency": one of "now", "soon", "later"-- "text": the suggestion — short, ready to use-- "reason": one short sentence explaining what you detected+Return a JSON object with two arrays of strings:-Example:{- "assists": [- {- "type": "ask",- "urgency": "now",- "text": "What specific metrics are behind that 15% number?",- "reason": "Speaker claimed 15% improvement without citing data."- }+ "say_this": [+ "That's a great point about the timeline - should we lock in Q3 as our target?"+ ],+ "ask_this": [+ "What specific metrics are behind that 15% number?"]}@@ -61,9 +56,10 @@ Example:## RULES-- ALWAYS return 1-3 assists. Never return an empty array.-- Every assist must connect to something in the transcript.-- Write questions as ready-to-use first-person lines.+- Return 0-3 items per array. Quality over quantity.+- If the User genuinely doesn't need assistance, return empty arrays.+- Every suggestion must connect to something in the transcript.+- Write as ready-to-use first-person lines.- Only output the JSON, nothing else.`;interface TranscriptChunk {@@ -76,7 +72,8 @@ class LiveAssistService extends EventEmitter {private intervalTimer: NodeJS.Timeout | null = null;private isRunning = false;private transcriptBuffer: TranscriptChunk[] = [];- private previousAssistTexts: Set<string> = new Set();+ private previousSayThis: Set<string> = new Set();+ private previousAskThis: Set<string> = new Set();private lastProcessedTimestamp = 0;/**@@ -91,7 +88,8 @@ class LiveAssistService extends EventEmitter {log.info('Starting live assist service');this.isRunning = true;this.transcriptBuffer = [];- this.previousAssistTexts.clear();+ this.previousSayThis.clear();+ this.previousAskThis.clear();this.lastProcessedTimestamp = Date.now();// Run immediately, then every 20 seconds@@ -116,7 +114,8 @@ class LiveAssistService extends EventEmitter {}this.transcriptBuffer = [];- this.previousAssistTexts.clear();+ this.previousSayThis.clear();+ this.previousAskThis.clear();}/**@@ -154,7 +153,7 @@ class LiveAssistService extends EventEmitter {// Build transcript text with speaker labelsconst transcriptText = recentChunks.map(chunk => {- const speaker = chunk.source === 'mic' ? 'You' : 'Them';+ const speaker = chunk.source === 'mic' ? 'User' : 'Them';return `[${speaker}]: ${chunk.text}`;}).join('\n');@@ -163,7 +162,7 @@ class LiveAssistService extends EventEmitter {try {const llm = getLLMService();- const response = await llm.chatCompletionJSON<LiveAssistResponse>([+ const response = await llm.chatCompletionJSON<LiveInsights>([{ role: 'system', content: SYSTEM_PROMPT },{ role: 'user', content: `Analyze this transcript chunk:\n\n${transcriptText}` },]);@@ -173,42 +172,38 @@ class LiveAssistService extends EventEmitter {return;}- const { assists } = response.data;- log.debug({ response }, 'Response from live assist');- log.debug({ assists }, 'Assists generated for this chunk');-- if (!assists || assists.length === 0) {- log.debug('No assists generated for this chunk');- return;- }+ const { say_this, ask_this } = response.data;+ log.debug({ say_this, ask_this }, 'Insights generated for this chunk');// Filter out duplicates from previous rounds- const newAssists: LiveAssistItem[] = assists- .filter(assist => !this.previousAssistTexts.has(assist.text.toLowerCase()))- .slice(0, 3) // Max 3 per round- .map(assist => ({- id: uuid(),- type: assist.type,- urgency: assist.urgency,- text: assist.text,- reason: assist.reason,- timestamp: Date.now(),- }));-- // Track these assists to avoid repetition- newAssists.forEach(assist => {- this.previousAssistTexts.add(assist.text.toLowerCase());- });-- // Keep previous assists set manageable (last 20)- if (this.previousAssistTexts.size > 20) {- const arr = Array.from(this.previousAssistTexts);- this.previousAssistTexts = new Set(arr.slice(-20));+ const newSayThis = (say_this || [])+ .filter(item => !this.previousSayThis.has(item.toLowerCase()))+ .slice(0, 3);++ const newAskThis = (ask_this || [])+ .filter(item => !this.previousAskThis.has(item.toLowerCase()))+ .slice(0, 3);++ // Track these to avoid repetition+ newSayThis.forEach(item => this.previousSayThis.add(item.toLowerCase()));+ newAskThis.forEach(item => this.previousAskThis.add(item.toLowerCase()));++ // Keep previous sets manageable (last 20 each)+ if (this.previousSayThis.size > 20) {+ const arr = Array.from(this.previousSayThis);+ this.previousSayThis = new Set(arr.slice(-20));+ }+ if (this.previousAskThis.size > 20) {+ const arr = Array.from(this.previousAskThis);+ this.previousAskThis = new Set(arr.slice(-20));}- if (newAssists.length > 0) {- log.info({ count: newAssists.length }, 'Generated new live assists');- this.emit('assists', { assists: newAssists, processedAt: Date.now() });+ if (newSayThis.length > 0 || newAskThis.length > 0) {+ log.info({ sayCount: newSayThis.length, askCount: newAskThis.length }, 'Generated new live insights');+ this.emit('insights', {+ insights: { say_this: newSayThis, ask_this: newAskThis },+ processedAt: Date.now(),+ });}} catch (error) {log.error({ error }, 'Error processing transcript for live assist');@@ -220,7 +215,8 @@ class LiveAssistService extends EventEmitter {*/clear(): void {this.transcriptBuffer = [];- this.previousAssistTexts.clear();+ this.previousSayThis.clear();+ this.previousAskThis.clear();}}diff --git a/src/preload/index.ts b/src/preload/index.tsindex da596e3..29f338b 100644--- a/src/preload/index.ts+++ b/src/preload/index.ts@@ -330,7 +330,7 @@ const api: IpcApi = {},liveAssistOn: {- onUpdate: (callback: (data: { assists: any[]; processedAt: number }) => void) => {+ onUpdate: (callback: (data: { insights: { say_this: string[]; ask_this: string[] }; processedAt: number }) => void) => {const listener = (_event: Electron.IpcRendererEvent, data: any) => callback(data);ipcRenderer.on('live-assist:update', listener);return () => ipcRenderer.removeListener('live-assist:update', listener);diff --git a/src/renderer/App.tsx b/src/renderer/App.tsxindex a658276..02067da 100644--- a/src/renderer/App.tsx+++ b/src/renderer/App.tsx@@ -286,12 +286,21 @@ function RecordingView({ onBack }: RecordingViewProps) {const isProcessing = status === 'processing' || status === 'stopping';const isIdle = status === 'idle';- // Handle navigation when session becomes idle (via useEffect, not during render)+ console.log('[RecordingView] status:', status, 'isIdle:', isIdle, 'callSummary:', !!callSummary);++ // Handle navigation when session becomes idle and call summary is ready+ // Only trigger if we were previously recording (not on initial mount edge case)+ const wasRecordingRef = React.useRef(false);React.useEffect(() => {- if (isIdle && !callSummary) {+ if (isRecording) {+ wasRecordingRef.current = true;+ }+ // Navigate to detail page when call summary is ready (after recording ended)+ if (callSummary && wasRecordingRef.current) {+ console.log('[RecordingView] Call summary ready, navigating to recording detail page');onBack?.();}- }, [isIdle, callSummary, onBack]);+ }, [callSummary, isRecording, onBack]);// Get checklist from meeting setupconst { checklist } = meetingSetupStore;@@ -387,23 +396,23 @@ function RecordingView({ onBack }: RecordingViewProps) {{/* Main Container */}<div className="flex-1 bg-white border border-[#efefef] rounded-t-[20px] mx-[10px] p-[20px] flex gap-[30px] overflow-hidden">- {/* Left Column - Transcript Section */}+ {/* Left Column - Live Assist Panel */}<div className="flex-1 flex flex-col min-w-0 overflow-hidden">- <TranscriptionPanel />+ <LiveAssistPanel /></div>- {/* Right Column - Metrics, Agenda, Live Assist */}- <div className="w-[460px] shrink-0 flex flex-col gap-[30px] h-full">+ {/* Right Column - Metrics, Agenda, Transcript */}+ <div className="w-[460px] shrink-0 flex flex-col gap-[13px] h-full">{/* Metrics Bar */}<MetricsBar />{/* Right Panel with scrollable content */}- <div className="flex-1 bg-[#f7f7f7] border border-[#efefef] rounded-[16px] p-[12px] flex flex-col gap-[16px] overflow-auto [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]">+ <div className="flex-1 bg-[#f7f7f7] border border-[#efefef] rounded-[16px] p-[12px] flex flex-col gap-[16px] overflow-hidden min-h-0">{/* Meeting Agenda - only show if checklist exists */}{hasChecklist && <MeetingAgendaPanel checklist={checklist} />}- {/* Live Assist Panel */}- <LiveAssistPanel />+ {/* Meeting Transcript */}+ <TranscriptionPanel /></div></div></div>@@ -649,6 +658,10 @@ export function App() {// Check if actively recording or processingconst isActivelyRecording = sessionStatus === 'recording' || sessionStatus === 'processing' || sessionStatus === 'stopping' || sessionStatus === 'starting';+ // Track if we're waiting for call summary after recording ended+ const copilotCallActive = useCopilotStore((state) => state.isCallActive);+ const awaitingCallSummary = sessionStatus === 'idle' && copilotCallActive;+React.useEffect(() => {if (isActivelyRecording && showMeetingSetup) {setShowMeetingSetup(false);@@ -678,6 +691,8 @@ export function App() {};const renderContent = () => {+ console.log('[App.renderContent] sessionStatus:', sessionStatus, 'isActivelyRecording:', isActivelyRecording, 'awaitingCallSummary:', awaitingCallSummary, 'activeTab:', activeTab);+// Step 0: Authif (!isAuthenticated) {return <AuthView />;@@ -730,8 +745,8 @@ export function App() {);}- // If actively recording, show RecordingView- if (isActivelyRecording && activeTab === 'home') {+ // If actively recording OR waiting for call summary, show RecordingView+ if ((isActivelyRecording || awaitingCallSummary) && activeTab === 'home') {return <RecordingView onBack={handleExitRecordingMode} />;}diff --git a/src/renderer/components/history/RecordingDetailPage.tsx b/src/renderer/components/history/RecordingDetailPage.tsxindex 176c715..fa7f663 100644--- a/src/renderer/components/history/RecordingDetailPage.tsx+++ b/src/renderer/components/history/RecordingDetailPage.tsx@@ -23,6 +23,7 @@ import {Check,Loader2,Video,+ Copy,} from 'lucide-react';import { trpc } from '../../api/trpc';import type { Recording } from '../../../shared/schemas/recording.schema';@@ -96,11 +97,6 @@ export function RecordingDetailPage({ recordingId, onBack }: RecordingDetailPageconst title = recording.meetingName || `Recording - ${formatDate(recording.createdAt)}`;const isVideoReady = recording.status === 'available' && !!recording.playerUrl;- // Debug logging- console.log('[RecordingDetailPage] videoId:', recording.videoId);- console.log('[RecordingDetailPage] collectionId (from recording):', recording.collectionId);- console.log('[RecordingDetailPage] collectionId (local state):', collectionId);-return (<div className="bg-[#f7f7f7] h-full flex flex-col pt-[10px] px-[10px]">{/* Header */}@@ -138,7 +134,11 @@ export function RecordingDetailPage({ recordingId, onBack }: RecordingDetailPage/>{/* Action Items Card (Post-Meeting Checklist) */}- <ActionItemsCard checklist={recording.postMeetingChecklist} />+ <ActionItemsCard+ recordingId={recordingId}+ checklist={recording.postMeetingChecklist}+ completedIndices={recording.postMeetingChecklistCompleted}+ /></div></div>@@ -362,16 +362,31 @@ interface SummaryCardProps {}function SummaryCard({ summary }: SummaryCardProps) {+ const [copied, setCopied] = useState(false);+if (!summary) return null;+ const handleCopy = async () => {+ await navigator.clipboard.writeText(summary);+ setCopied(true);+ setTimeout(() => setCopied(false), 2000);+ };+return (<div className="bg-[#fff5ec] border border-[#ffe9d3] rounded-[16px] p-[20px] flex flex-col gap-[16px]">{/* Header */}<div className="flex items-center gap-[8px]"><FileText className="h-5 w-5 text-[#ec5b16]" />- <h3 className="text-[16px] font-medium text-black tracking-[0.08px]">+ <h3 className="flex-1 text-[16px] font-medium text-black tracking-[0.08px]">Meeting Summary</h3>+ <button+ onClick={handleCopy}+ className="flex items-center gap-[4px] px-[10px] py-[6px] rounded-[8px] text-[12px] font-medium text-[#ec5b16] hover:bg-[#ffe9d3] transition-colors"+ >+ {copied ? <Check className="h-3.5 w-3.5" /> : <Copy className="h-3.5 w-3.5" />}+ {copied ? 'Copied!' : 'Copy'}+ </button></div>{/* Content */}<p className="text-[14px] text-[#2d2d2d] leading-[20px] tracking-[0.07px]">@@ -388,8 +403,20 @@ interface KeyPointsCardProps {}function KeyPointsCard({ keyPoints, expanded, onToggle }: KeyPointsCardProps) {+ const [copied, setCopied] = useState(false);+if (!keyPoints || keyPoints.length === 0) return null;+ const handleCopy = async () => {+ const text = keyPoints.map((kp, idx) => {+ const points = kp.points.map(p => ` • ${p}`).join('\n');+ return `${idx + 1}. ${kp.topic}\n${points}`;+ }).join('\n\n');+ await navigator.clipboard.writeText(text);+ setCopied(true);+ setTimeout(() => setCopied(false), 2000);+ };+return (<div className={cn("bg-[#fff5ec] border border-[#ffe9d3] rounded-[16px] p-[20px] flex flex-col gap-[16px] relative overflow-hidden",@@ -398,9 +425,16 @@ function KeyPointsCard({ keyPoints, expanded, onToggle }: KeyPointsCardProps) {{/* Header */}<div className="flex items-center gap-[8px]"><List className="h-5 w-5 text-[#ec5b16]" />- <h3 className="text-[16px] font-medium text-black tracking-[0.08px]">+ <h3 className="flex-1 text-[16px] font-medium text-black tracking-[0.08px]">Key Points</h3>+ <button+ onClick={handleCopy}+ className="flex items-center gap-[4px] px-[10px] py-[6px] rounded-[8px] text-[12px] font-medium text-[#ec5b16] hover:bg-[#ffe9d3] transition-colors z-20"+ >+ {copied ? <Check className="h-3.5 w-3.5" /> : <Copy className="h-3.5 w-3.5" />}+ {copied ? 'Copied!' : 'Copy'}+ </button></div>{/* Content */}@@ -441,11 +475,38 @@ function KeyPointsCard({ keyPoints, expanded, onToggle }: KeyPointsCardProps) {}interface ActionItemsCardProps {+ recordingId: number;checklist: string[] | null | undefined;+ completedIndices: number[] | null | undefined;}-function ActionItemsCard({ checklist }: ActionItemsCardProps) {- if (!checklist || checklist.length === 0) return null;+function ActionItemsCard({ recordingId, checklist, completedIndices }: ActionItemsCardProps) {+ const [checked, setChecked] = useState<Set<number>>(new Set(completedIndices || []));+ const updateChecklistMutation = trpc.recordings.updateChecklistCompletion.useMutation();++ // Sync local state when completedIndices changes+ useEffect(() => {+ setChecked(new Set(completedIndices || []));+ }, [completedIndices]);++ const handleToggle = (idx: number) => {+ setChecked(prev => {+ const newSet = new Set(prev);+ if (newSet.has(idx)) {+ newSet.delete(idx);+ } else {+ newSet.add(idx);+ }+ // Persist to DB+ updateChecklistMutation.mutate({+ recordingId,+ completedIndices: Array.from(newSet),+ });+ return newSet;+ });+ };++ const isEmpty = !checklist || checklist.length === 0;return (<div className="bg-[#f7f7f7] border border-[#efefef] rounded-[16px] p-[20px] flex flex-col gap-[16px]">@@ -458,22 +519,38 @@ function ActionItemsCard({ checklist }: ActionItemsCardProps) {</div>{/* Content */}- <div className="flex flex-col gap-[10px]">- {checklist.map((item, idx) => (- <div- key={idx}- className="bg-white border border-[#efefef] rounded-[8px] px-[16px] py-[12px] flex items-start gap-[12px]"- >- {/* Checkbox */}- <div className="w-4 h-4 shrink-0 rounded border border-[#ec5b16] flex items-center justify-center mt-[2px]">- {/* Unchecked by default */}- </div>- <span className="text-[14px] text-black leading-[20px] tracking-[0.07px]">- {item}- </span>- </div>- ))}- </div>+ {isEmpty ? (+ <p className="text-[14px] text-[#969696] italic">+ No post meeting agenda detected+ </p>+ ) : (+ <div className="flex flex-col gap-[10px]">+ {checklist.map((item, idx) => {+ const isChecked = checked.has(idx);+ return (+ <div+ key={idx}+ onClick={() => handleToggle(idx)}+ className="bg-white border border-[#efefef] rounded-[8px] px-[16px] py-[12px] flex items-start gap-[12px] cursor-pointer hover:bg-gray-50 transition-colors"+ >+ {/* Checkbox */}+ <div className={cn(+ "w-4 h-4 shrink-0 rounded border flex items-center justify-center mt-[2px]",+ isChecked ? "bg-[#ec5b16] border-[#ec5b16]" : "border-[#ec5b16]"+ )}>+ {isChecked && <Check className="h-3 w-3 text-white" />}+ </div>+ <span className={cn(+ "text-[14px] leading-[20px] tracking-[0.07px]",+ isChecked ? "text-[#969696] line-through" : "text-black"+ )}>+ {item}+ </span>+ </div>+ );+ })}+ </div>+ )}</div>);}@@ -497,8 +574,9 @@ function VideoPlayerSection({ playerUrl, isReady }: VideoPlayerSectionProps) {allowFullScreen/>) : (- <div className="w-full h-full flex items-center justify-center text-[#969696]">- <p className="text-[14px]">Video not available yet</p>+ <div className="w-full h-full flex flex-col items-center justify-center gap-3 text-[#969696]">+ <Loader2 className="h-8 w-8 animate-spin text-[#ec5b16]" />+ <p className="text-[14px]">Loading the video...</p></div>)}</div>diff --git a/src/renderer/components/meeting-setup/MeetingSetupFlow.tsx b/src/renderer/components/meeting-setup/MeetingSetupFlow.tsxindex 07dfbcb..168b1e6 100644--- a/src/renderer/components/meeting-setup/MeetingSetupFlow.tsx+++ b/src/renderer/components/meeting-setup/MeetingSetupFlow.tsx@@ -56,18 +56,10 @@ export function MeetingSetupFlow({ onCancel }: MeetingSetupFlowProps) {// Skip setup and start recording with whatever data is already filled// Accepts optional overrides for name/description from local step stateconst handleSkipAndRecord = async (overrideName?: string, overrideDescription?: string) => {- console.log('[MeetingSetupFlow] handleSkipAndRecord called');- console.log('[MeetingSetupFlow] overrideName:', overrideName);- console.log('[MeetingSetupFlow] overrideDescription:', overrideDescription);- console.log('[MeetingSetupFlow] store name:', name);- console.log('[MeetingSetupFlow] store description:', description);const finalName = (overrideName ?? name).trim() || generateDefaultMeetingName();const finalDescription = (overrideDescription ?? description).trim();- console.log('[MeetingSetupFlow] finalName:', finalName);- console.log('[MeetingSetupFlow] finalDescription:', finalDescription);-// Update store so RecordingHeader can display the correct namesetInfo(finalName, finalDescription);@@ -146,7 +138,7 @@ export function MeetingSetupFlow({ onCancel }: MeetingSetupFlowProps) {const isSkipping = isStarting && !isGenerating;return (- <div className="h-full w-full flex flex-col items-center justify-center relative overflow-hidden">+ <div className="w-full flex flex-col items-center relative">{/* Main content */}<div className="w-full max-w-[480px] px-6 relative z-10">{error && (diff --git a/src/renderer/components/recording/LiveAssistPanel.tsx b/src/renderer/components/recording/LiveAssistPanel.tsxindex df8d3a3..72337a2 100644--- a/src/renderer/components/recording/LiveAssistPanel.tsx+++ b/src/renderer/components/recording/LiveAssistPanel.tsx@@ -2,20 +2,22 @@* Live Assist Panel Component** Shows real-time AI-generated assists during recording:- * - Questions to ask (ask)- * - Things to say (speak)- * - Actions to take (act)- *- * Also shows MCP Findings section.+ * - Say this (things to say)+ * - Ask this (questions to ask)+ * - MCP Findings section+ * - Visual Analysis control button*/-import React from 'react';+import React, { useState, useEffect, useRef, useCallback } from 'react';import ReactMarkdown from 'react-markdown';+import { Loader2 } from 'lucide-react';import { useLiveAssist } from '../../hooks/useLiveAssist';import { useMCP } from '../../hooks/useMCP';-import type { LiveAssistItem } from '../../../shared/types/live-assist.types';+import { useVisualIndexStore } from '../../stores/visual-index.store';+import { useSessionStore } from '../../stores/session.store';+import { trpc } from '../../api/trpc';-// Lightbulb icon for Live Assist+// Lightbulb icon for Live Assist headerfunction LightbulbIcon() {return (<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">@@ -31,13 +33,13 @@ function LightbulbIcon() {);}-// Empty state icon-function EmptyInsightsIcon() {+// Speech bubble icon for "Say this"+function SayThisIcon() {return (- <svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">+ <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path- d="M18 6L8 18H15L14 26L24 14H17L18 6Z"- stroke="#969696"+ d="M17.5 9.58333C17.5029 10.6832 17.2459 11.7682 16.75 12.75C16.162 13.9265 15.2581 14.916 14.1395 15.6077C13.021 16.2995 11.7319 16.6661 10.4167 16.6667C9.31678 16.6695 8.23176 16.4126 7.25 15.9167L2.5 17.5L4.08333 12.75C3.58744 11.7682 3.33047 10.6832 3.33333 9.58333C3.33393 8.26813 3.70051 6.97905 4.39227 5.86045C5.08402 4.74186 6.07355 3.83797 7.25 3.25C8.23176 2.75411 9.31678 2.49713 10.4167 2.5H10.8333C12.5703 2.59583 14.2109 3.32899 15.4409 4.55905C16.671 5.7891 17.4042 7.42973 17.5 9.16667V9.58333Z"+ stroke="#EC5B16"strokeWidth="1.5"strokeLinecap="round"strokeLinejoin="round"@@ -46,99 +48,391 @@ function EmptyInsightsIcon() {);}-interface AssistItemProps {- item: LiveAssistItem;+// Question mark icon for "Ask this"+function AskThisIcon() {+ return (+ <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">+ <circle cx="10" cy="10" r="7.5" stroke="#3B82F6" strokeWidth="1.5" />+ <path+ d="M7.5 7.5C7.5 6.11929 8.61929 5 10 5C11.3807 5 12.5 6.11929 12.5 7.5C12.5 8.88071 11.3807 10 10 10V11.25"+ stroke="#3B82F6"+ strokeWidth="1.5"+ strokeLinecap="round"+ />+ <circle cx="10" cy="14" r="0.75" fill="#3B82F6" />+ </svg>+ );}-function AssistItem({ item }: AssistItemProps) {+// Display icon for Visual Analysis button+function DisplayIcon() {return (- <div className="flex flex-col justify-center w-full">- <ul>- <li className="list-disc ms-[21px]">- <span className="text-[14px] text-black leading-[22px]">{item.text}</span>- </li>- </ul>- </div>+ <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">+ <path+ d="M3.125 3.125H16.875V13.125H3.125V3.125Z"+ stroke="white"+ strokeWidth="1.5"+ strokeLinecap="round"+ strokeLinejoin="round"+ />+ <path+ d="M10 13.125V16.875"+ stroke="white"+ strokeWidth="1.5"+ strokeLinecap="round"+ strokeLinejoin="round"+ />+ <path+ d="M6.25 16.875H13.75"+ stroke="white"+ strokeWidth="1.5"+ strokeLinecap="round"+ strokeLinejoin="round"+ />+ </svg>);}-export function LiveAssistPanel() {- const { assists } = useLiveAssist();- const { activeResults } = useMCP();+// Checkmark icon+function CheckIcon() {+ return (+ <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">+ <path+ d="M11.6667 3.5L5.25 9.91667L2.33333 7"+ stroke="white"+ strokeWidth="2"+ strokeLinecap="round"+ strokeLinejoin="round"+ />+ </svg>+ );+}- // Get the latest MCP result for display- const latestMCPResult = activeResults.length > 0 ? activeResults[activeResults.length - 1] : null;- const mcpFindings = latestMCPResult?.content?.text || latestMCPResult?.content?.markdown || '';+interface InsightItemProps {+ text: string;+ checked: boolean;+ onToggle: () => void;+ variant: 'say' | 'ask';+}- const hasAssists = assists.length > 0;+function InsightItem({ text, checked, onToggle, variant }: InsightItemProps) {+ const isSay = variant === 'say';+ const bgColor = isSay ? 'bg-[#fff5ec]' : 'bg-[#d8e6fd]';+ const borderColor = isSay ? 'border-[rgba(236,91,22,0.2)]' : 'border-[rgba(59,130,246,0.2)]';+ const checkboxBg = checked+ ? isSay+ ? 'bg-[#ec5b16] border-[#ec5b16]'+ : 'bg-[#3b82f6] border-[#3b82f6]'+ : 'bg-white border-[#969696]';return (- <div className="bg-white border border-[#e4e4ec] rounded-[12px] shadow-[0px_1px_3px_0px_rgba(0,0,0,0.04),0px_1px_2px_0px_rgba(0,0,0,0.02)] p-[17px] flex flex-col gap-[20px]">+ <div+ className={`${bgColor} border ${borderColor} rounded-[10px] px-[13px] py-[9px] flex gap-[12px] items-start cursor-pointer hover:opacity-90 transition-opacity`}+ onClick={onToggle}+ >+ <div+ className={`w-[16px] h-[16px] rounded-[4px] flex items-center justify-center shrink-0 border ${checkboxBg} mt-[3px]`}+ >+ {checked && <CheckIcon />}+ </div>+ <p className="flex-1 text-[14px] text-black leading-[22px]">{text}</p>+ </div>+ );+}++interface InsightSectionProps {+ title: string;+ icon: React.ReactNode;+ items: string[];+ checkedItems: Set<number>;+ onToggleItem: (index: number) => void;+ variant: 'say' | 'ask';+ emptyText: string;+ scrollRef: React.RefObject<HTMLDivElement>;+}++function InsightSection({+ title,+ icon,+ items,+ checkedItems,+ onToggleItem,+ variant,+ emptyText,+ scrollRef,+}: InsightSectionProps) {+ return (+ <div className="border border-[#efefef] rounded-[12px] overflow-hidden">{/* Header */}- <div className="flex items-center gap-[6px]">- <LightbulbIcon />- <span className="font-medium text-[16px] text-black">Live Assist</span>+ <div className="bg-[#f7f7f7] border-b border-[#efefef] px-[16px] py-[10px] flex items-center gap-[8px]">+ {icon}+ <span className="font-medium text-[15px] text-black">{title}</span></div>- {/* Assists List */}- <div className="bg-white rounded-[16px] max-h-[206px] min-h-[80px] overflow-y-auto [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]">- {hasAssists ? (- <div className="flex flex-col gap-[6px] text-[14px] text-black">- {assists.map((assist) => (- <AssistItem key={assist.id} item={assist} />+ {/* Content */}+ <div+ ref={scrollRef}+ className="bg-white p-[16px] max-h-[200px] overflow-y-auto [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]"+ >+ {items.length > 0 ? (+ <div className="flex flex-col gap-[10px]">+ {items.map((item, idx) => (+ <InsightItem+ key={`${variant}-${idx}`}+ text={item}+ checked={checkedItems.has(idx)}+ onToggle={() => onToggleItem(idx)}+ variant={variant}+ />))}</div>) : (- <div className="flex flex-col items-center justify-center h-[80px] text-center">- <p className="text-[13px] text-[#969696]">- AI suggestions will appear here as the conversation progresses- </p>+ <div className="flex items-center justify-center py-[20px]">+ <p className="text-[13px] text-[#969696] text-center">{emptyText}</p></div>)}</div>+ </div>+ );+}++export function LiveAssistPanel() {+ const { sayThis, askThis } = useLiveAssist();+ const { activeResults, connectedServerCount } = useMCP();+ const visualIndexStore = useVisualIndexStore();+ const { sessionId, screenWsConnectionId, status } = useSessionStore();++ const isRecording = status === 'recording';+ const { isRunning, sceneIndexId } = visualIndexStore;++ // Local checkbox state+ const [checkedSayThis, setCheckedSayThis] = useState<Set<number>>(new Set());+ const [checkedAskThis, setCheckedAskThis] = useState<Set<number>>(new Set());++ // Refs for auto-scrolling+ const sayThisScrollRef = useRef<HTMLDivElement>(null);+ const askThisScrollRef = useRef<HTMLDivElement>(null);+ const prevSayThisLengthRef = useRef(0);+ const prevAskThisLengthRef = useRef(0);++ // tRPC mutations for visual index control+ const startVisualIndexMutation = trpc.visualIndex.start.useMutation();+ const pauseVisualIndexMutation = trpc.visualIndex.pause.useMutation();+ const resumeVisualIndexMutation = trpc.visualIndex.resume.useMutation();++ // Get the latest MCP result for display+ const latestMCPResult = activeResults.length > 0 ? activeResults[activeResults.length - 1] : null;+ const mcpFindings = latestMCPResult?.content?.text || latestMCPResult?.content?.markdown || '';++ // Toggle handlers+ const handleToggleSayThis = useCallback((index: number) => {+ setCheckedSayThis((prev) => {+ const newSet = new Set(prev);+ if (newSet.has(index)) {+ newSet.delete(index);+ } else {+ newSet.add(index);+ }+ return newSet;+ });+ }, []);++ const handleToggleAskThis = useCallback((index: number) => {+ setCheckedAskThis((prev) => {+ const newSet = new Set(prev);+ if (newSet.has(index)) {+ newSet.delete(index);+ } else {+ newSet.add(index);+ }+ return newSet;+ });+ }, []);++ // Auto-scroll when new items are added+ useEffect(() => {+ if (sayThis.length > prevSayThisLengthRef.current && sayThisScrollRef.current) {+ sayThisScrollRef.current.scrollTop = sayThisScrollRef.current.scrollHeight;+ }+ prevSayThisLengthRef.current = sayThis.length;+ }, [sayThis.length]);++ useEffect(() => {+ if (askThis.length > prevAskThisLengthRef.current && askThisScrollRef.current) {+ askThisScrollRef.current.scrollTop = askThisScrollRef.current.scrollHeight;+ }+ prevAskThisLengthRef.current = askThis.length;+ }, [askThis.length]);++ // Visual Analysis button handler+ const handleVisualAnalysisClick = useCallback(async () => {+ if (!isRecording || !sessionId || !screenWsConnectionId) {+ return;+ }++ if (isRunning) {+ // Stop (pause) visual analysis+ try {+ const result = await pauseVisualIndexMutation.mutateAsync({ sessionId });+ if (result.success) {+ visualIndexStore.setRunning(false);+ }+ } catch (error) {+ console.error('[VisualIndex] Failed to pause:', error);+ }+ } else if (sceneIndexId) {+ // Restart (resume) visual analysis+ try {+ const result = await resumeVisualIndexMutation.mutateAsync({ sessionId });+ if (result.success) {+ visualIndexStore.setRunning(true);+ }+ } catch (error) {+ console.error('[VisualIndex] Failed to resume:', error);+ }+ } else {+ // Turn on (start) visual analysis+ try {+ const result = await startVisualIndexMutation.mutateAsync({+ sessionId,+ screenWsConnectionId,+ });+ if (result.success && result.sceneIndexId) {+ visualIndexStore.setSceneIndexId(result.sceneIndexId);+ visualIndexStore.setRunning(true);+ }+ } catch (error) {+ console.error('[VisualIndex] Failed to start:', error);+ }+ }+ }, [+ isRecording,+ sessionId,+ screenWsConnectionId,+ isRunning,+ sceneIndexId,+ visualIndexStore,+ startVisualIndexMutation,+ pauseVisualIndexMutation,+ resumeVisualIndexMutation,+ ]);++ // Loading state for visual analysis button+ const isVisualAnalysisLoading =+ startVisualIndexMutation.isPending ||+ pauseVisualIndexMutation.isPending ||+ resumeVisualIndexMutation.isPending;++ // Determine button text+ const getVisualAnalysisButtonText = () => {+ if (isVisualAnalysisLoading) return 'Loading...';+ if (isRunning) return 'Stop Visual Analysis';+ if (sceneIndexId) return 'Restart Visual Analysis';+ return 'Turn On Visual Analysis';+ };++ const showVisualAnalysisButton = isRecording && screenWsConnectionId;++ return (+ <div className="flex flex-col h-full gap-[20px] pt-[8px]">+ {/* Header */}+ <div className="flex items-center gap-[8px] shrink-0">+ <LightbulbIcon />+ <h2 className="flex-1 font-semibold text-[18px] text-black tracking-[0.09px]">+ Live Assist+ </h2>+ {showVisualAnalysisButton && (+ <button+ onClick={handleVisualAnalysisClick}+ disabled={isVisualAnalysisLoading}+ className={`flex items-center gap-[4px] px-[20px] py-[12px] rounded-[12px] shadow-[0px_1.272px_15.267px_0px_rgba(0,0,0,0.05)] transition-colors ${+ isVisualAnalysisLoading+ ? 'bg-[#ff4000]/70 cursor-not-allowed'+ : 'bg-[#ff4000] hover:bg-[#e63900]'+ }`}+ >+ {isVisualAnalysisLoading ? (+ <Loader2 className="w-[20px] h-[20px] text-white animate-spin" />+ ) : (+ <DisplayIcon />+ )}+ <span className="font-semibold text-[14px] text-white tracking-[-0.28px]">+ {getVisualAnalysisButtonText()}+ </span>+ </button>+ )}+ </div>- {/* MCP Findings Section */}- <div className="border border-[#efefef] rounded-[12px] overflow-hidden">- {/* MCP Findings Header */}- <div className="bg-[#f7f7f7] border-b border-[#efefef] px-[16px] py-[12px]">- <span className="font-medium text-[14px] text-black tracking-[0.07px]">- MCP Findings- </span>- </div>-- {/* MCP Findings Content */}- <div className="bg-white p-[16px]">- {mcpFindings ? (- <div className="prose prose-sm max-w-none text-[14px] text-black leading-[22px]">- <ReactMarkdown- components={{- p: ({ children }) => <p className="mb-2 last:mb-0">{children}</p>,- a: ({ href, children }) => (- <a- href={href}- className="text-[#ec5b16] underline decoration-solid"- target="_blank"- rel="noopener noreferrer"- >- {children}- </a>- ),- ul: ({ children }) => <ul className="list-disc ml-5 mb-2">{children}</ul>,- li: ({ children }) => <li className="mb-1">{children}</li>,- }}- >- {mcpFindings}- </ReactMarkdown>+ {/* Panels */}+ <div className="flex-1 flex flex-col gap-[20px] min-h-0 overflow-auto [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]">+ {/* Say this section */}+ <InsightSection+ title="Say this"+ icon={<SayThisIcon />}+ items={sayThis}+ checkedItems={checkedSayThis}+ onToggleItem={handleToggleSayThis}+ variant="say"+ emptyText="No suggestions yet - keep the conversation going"+ scrollRef={sayThisScrollRef}+ />++ {/* Ask this section */}+ <InsightSection+ title="Ask this"+ icon={<AskThisIcon />}+ items={askThis}+ checkedItems={checkedAskThis}+ onToggleItem={handleToggleAskThis}+ variant="ask"+ emptyText="No questions yet - we'll suggest when relevant"+ scrollRef={askThisScrollRef}+ />++ {/* MCP Findings Section - only show if MCP servers are connected */}+ {connectedServerCount > 0 && (+ <div className="border border-[#efefef] rounded-[12px] overflow-hidden flex-1 min-h-[100px]">+ {/* MCP Findings Header */}+ <div className="bg-[#f7f7f7] border-b border-[#efefef] px-[16px] py-[10px]">+ <span className="font-medium text-[14px] text-black tracking-[0.07px]">+ MCP Findings+ </span></div>- ) : (- <div className="flex flex-col items-center gap-[16px] py-[14px]">- <EmptyInsightsIcon />- <p className="text-[13px] text-[#969696] text-center leading-[18.75px]">- See live results triggered by conversation keywords- </p>++ {/* MCP Findings Content */}+ <div className="bg-white p-[16px]">+ {mcpFindings ? (+ <div className="prose prose-sm max-w-none text-[14px] text-black leading-[22px]">+ <ReactMarkdown+ components={{+ p: ({ children }) => <p className="mb-2 last:mb-0">{children}</p>,+ a: ({ href, children }) => (+ <a+ href={href}+ className="text-[#ec5b16] underline decoration-solid"+ target="_blank"+ rel="noopener noreferrer"+ >+ {children}+ </a>+ ),+ ul: ({ children }) => <ul className="list-disc ml-5 mb-2">{children}</ul>,+ li: ({ children }) => <li className="mb-1">{children}</li>,+ }}+ >+ {mcpFindings}+ </ReactMarkdown>+ </div>+ ) : (+ <div className="flex items-center justify-center py-[14px]">+ <p className="text-[13px] text-[#969696] text-center">+ See live results triggered by conversation keywords+ </p>+ </div>+ )}</div>- )}- </div>+ </div>+ )}</div></div>);diff --git a/src/renderer/components/recording/MeetingAgendaPanel.tsx b/src/renderer/components/recording/MeetingAgendaPanel.tsxindex a06950c..3e30010 100644--- a/src/renderer/components/recording/MeetingAgendaPanel.tsx+++ b/src/renderer/components/recording/MeetingAgendaPanel.tsx@@ -3,7 +3,7 @@** Shows meeting checklist items during recording:* - Collapsible header with chevron- * - Checkbox items with orange accent+ * - Checkbox items with gray styling*/import React, { useState } from 'react';@@ -47,14 +47,14 @@ interface ChecklistItemProps {function ChecklistItem({ text, checked, onToggle }: ChecklistItemProps) {return (<div- className="bg-[#fff5ec] border border-[rgba(236,91,22,0.2)] rounded-[10px] px-[13px] py-[9px] flex items-center gap-[12px] cursor-pointer hover:bg-[#ffeddb] transition-colors w-full"+ className="bg-[#efefef] border border-[rgba(0,0,0,0.1)] rounded-[10px] px-[12px] py-[8px] flex items-center gap-[12px] cursor-pointer hover:bg-[#e5e5e5] transition-colors w-full"onClick={onToggle}>{/* Checkbox */}<divclassName={`w-[16px] h-[16px] rounded-[4px] flex items-center justify-center shrink-0 transition-colors ${checked- ? 'bg-[#ec5b16] border border-[#ec5b16]'+ ? 'bg-[#242424] border border-[#242424]': 'bg-white border border-[#efefef]'}`}>@@ -63,7 +63,7 @@ function ChecklistItem({ text, checked, onToggle }: ChecklistItemProps) {{/* Text */}<p- className={`flex-1 text-[14px] leading-[24px] tracking-[0.07px] ${+ className={`flex-1 text-[14px] leading-[22px] ${checked ? 'line-through text-[#969696]' : 'text-black'}`}>@@ -112,15 +112,15 @@ export function MeetingAgendaPanel({}return (- <div className="bg-white border border-[#efefef] rounded-[16px] p-[16px] flex flex-col gap-[20px]">+ <div className="bg-white border border-[#efefef] rounded-[16px] p-[16px] flex flex-col gap-[20px] max-h-[50%] shrink-0">{/* Header */}<div- className="flex items-center gap-[6px] cursor-pointer"+ className="flex items-center gap-[6px] cursor-pointer shrink-0"onClick={() => setIsExpanded(!isExpanded)}>- <div className="flex-1 flex items-center gap-[4px]">+ <div className="flex-1 flex items-center gap-[8px]"><ClipboardCheckIcon />- <span className="font-medium text-[16px] text-black">Meeting Agenda</span>+ <span className="font-medium text-[15px] text-black">Meeting Agenda</span></div>{isExpanded ? (<ChevronUp className="w-[24px] h-[24px] text-[#464646]" />@@ -131,7 +131,7 @@ export function MeetingAgendaPanel({{/* Content */}{isExpanded && (- <div className="flex flex-col gap-[10px]">+ <div className="flex flex-col gap-[10px] overflow-y-auto min-h-0 [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]">{checklist.map((item, idx) => (<ChecklistItemkey={idx}diff --git a/src/renderer/components/recording/MetricsBar.tsx b/src/renderer/components/recording/MetricsBar.tsxindex 6f1d0c3..e337d3d 100644--- a/src/renderer/components/recording/MetricsBar.tsx+++ b/src/renderer/components/recording/MetricsBar.tsx@@ -3,45 +3,27 @@** Shows recording metrics:* - Talk ratio (You vs Them with progress bar)- * - Health score with colored border- * - Sentiment indicator*/import React from 'react';import { useCopilotStore } from '../../stores/copilot.store';-import { SentimentIcon, type SentimentType } from '../icons/SentimentIcons';export function MetricsBar() {- const { metrics, healthScore, isCallActive } = useCopilotStore();+ const { metrics } = useCopilotStore();const mePercent = metrics ? Math.round(metrics.talkRatio.me * 100) : 50;const themPercent = metrics ? Math.round(metrics.talkRatio.them * 100) : 50;- // Determine health color (Figma colors)- const getHealthBorderColor = () => {- if (healthScore >= 70) return 'border-[#559e58]';- if (healthScore >= 50) return 'border-[#eab308]';- return 'border-[#ef4444]';- };-- // Map health score to sentiment type- const getSentimentType = (): SentimentType => {- if (healthScore >= 70) return 'happy';- if (healthScore >= 50) return 'neutral';- if (healthScore >= 30) return 'sad';- return 'angry';- };-return (- <div className="flex items-center gap-[16px] h-[35px]">+ <div className="flex items-center h-[35px]">{/* Talk Ratio Pill */}- <div className="bg-white border border-[#efefef] rounded-[40px] h-full px-[16px] py-[4px] flex items-center">- <div className="flex items-center gap-[12px]">+ <div className="bg-white border border-[#efefef] rounded-[40px] h-full px-[16px] py-[4px] flex items-center flex-1">+ <div className="flex items-center gap-[12px] w-full"><span className="text-[14px] text-[#464646] tracking-[0.07px] whitespace-nowrap">You: {mePercent}%</span>{/* Progress bar */}- <div className="w-[106px] h-[7px] bg-[#f0f0f5] rounded-[4px] overflow-hidden relative">+ <div className="flex-1 h-[7px] bg-[#f0f0f5] rounded-[4px] overflow-hidden relative">{/* Me portion (orange) */}<divclassName="absolute top-0 left-0 h-full bg-[#ec5b16] rounded-l-[4px]"@@ -58,19 +40,6 @@ export function MetricsBar() {</span></div></div>-- {/* Health Score Pill */}- {isCallActive && (- <div- className={`bg-white border ${getHealthBorderColor()} rounded-[40px] px-[11px] py-[9px] flex items-center gap-[6px] w-[91px]`}- >- <span className="text-[14px] text-black tracking-[0.07px]">Health</span>- <span className="font-semibold text-[14px] text-black text-right">{healthScore}</span>- </div>- )}-- {/* Sentiment Indicator */}- {isCallActive && <SentimentIcon sentiment={getSentimentType()} size={22} />}</div>);}diff --git a/src/renderer/components/transcription/TranscriptionPanel.tsx b/src/renderer/components/transcription/TranscriptionPanel.tsxindex 0dcde79..72469b0 100644--- a/src/renderer/components/transcription/TranscriptionPanel.tsx+++ b/src/renderer/components/transcription/TranscriptionPanel.tsx@@ -2,18 +2,17 @@* Transcription Panel Component** Design matching Figma:- * - Header with transcript icon and Visual Analysis toggle+ * - Header with transcript icon* - Timestamp badges (orange for You, blue for Them)* - Visual Analysis entries with blue styling- * - Gradient overlays at top and bottom+ * - Auto-scroll on new items*/-import React, { useEffect, useRef, useCallback } from 'react';+import React, { useEffect, useRef } from 'react';import ReactMarkdown from 'react-markdown';import { useTranscriptionStore, TranscriptItem } from '../../stores/transcription.store';import { useVisualIndexStore, VisualIndexItem } from '../../stores/visual-index.store';import { useSessionStore } from '../../stores/session.store';-import { trpc } from '../../api/trpc';// Sparkle icon for Meeting Transcriptfunction SparkleIcon() {@@ -31,28 +30,6 @@ function SparkleIcon() {);}-interface ToggleProps {- enabled: boolean;- onChange: (enabled: boolean) => void;-}--function Toggle({ enabled, onChange }: ToggleProps) {- return (- <button- onClick={() => onChange(!enabled)}- className={`w-[28.8px] h-[16px] rounded-[16px] relative transition-colors ${- enabled ? 'bg-[#ec5b16]' : 'bg-[#e4e4ec]'- }`}- >- <div- className={`absolute w-[12px] h-[12px] bg-white rounded-[6px] top-[2px] shadow-[0px_1px_3px_0px_rgba(0,0,0,0.15)] transition-all ${- enabled ? 'left-[14.8px]' : 'left-[2px]'- }`}- />- </button>- );-}-interface TranscriptMessageProps {item: TranscriptItem;}@@ -170,141 +147,83 @@ function PendingMessage({ text, source }: PendingMessageProps) {);}+// Merge and sort transcript items with visual items by timestamp+interface MergedItem {+ type: 'transcript' | 'visual';+ timestamp: number;+ data: TranscriptItem | VisualIndexItem;+}++function mergeItems(transcripts: TranscriptItem[], visuals: VisualIndexItem[]): MergedItem[] {+ const merged: MergedItem[] = [+ ...transcripts.map((t) => ({ type: 'transcript' as const, timestamp: t.timestamp, data: t })),+ ...visuals.map((v) => ({ type: 'visual' as const, timestamp: v.timestamp, data: v })),+ ];+ return merged.sort((a, b) => a.timestamp - b.timestamp);+}+export function TranscriptionPanel() {const { items, enabled, pendingMic, pendingSystemAudio } = useTranscriptionStore();- const visualIndexStore = useVisualIndexStore();- const { items: visualItems, enabled: visualAnalysisEnabled, isRunning, sceneIndexId } = visualIndexStore;- const { status, sessionId, screenWsConnectionId } = useSessionStore();+ const { items: visualItems } = useVisualIndexStore();+ const { status } = useSessionStore();const scrollRef = useRef<HTMLDivElement>(null);+ const prevItemCountRef = useRef(0);const isRecording = status === 'recording';- // tRPC mutations for visual index control- const startVisualIndexMutation = trpc.visualIndex.start.useMutation();- const pauseVisualIndexMutation = trpc.visualIndex.pause.useMutation();- const resumeVisualIndexMutation = trpc.visualIndex.resume.useMutation();-- // Handle visual analysis toggle - starts/pauses indexing- const handleVisualAnalysisToggle = useCallback(async (newEnabled: boolean) => {- if (!isRecording || !sessionId || !screenWsConnectionId) {- // Just toggle visibility if not recording or no screen ws- visualIndexStore.setEnabled(newEnabled);- return;- }-- visualIndexStore.setEnabled(newEnabled);-- if (newEnabled) {- // Turning ON - start or resume visual indexing- if (!sceneIndexId) {- // First time - start visual indexing- try {- const result = await startVisualIndexMutation.mutateAsync({- sessionId,- screenWsConnectionId,- });- if (result.success && result.sceneIndexId) {- visualIndexStore.setSceneIndexId(result.sceneIndexId);- visualIndexStore.setRunning(true);- }- } catch (error) {- console.error('[VisualIndex] Failed to start:', error);- }- } else {- // Resume existing scene index- try {- const result = await resumeVisualIndexMutation.mutateAsync({ sessionId });- if (result.success) {- visualIndexStore.setRunning(true);- }- } catch (error) {- console.error('[VisualIndex] Failed to resume:', error);- }- }- } else {- // Turning OFF - pause visual indexing- if (sceneIndexId && isRunning) {- try {- const result = await pauseVisualIndexMutation.mutateAsync({ sessionId });- if (result.success) {- visualIndexStore.setRunning(false);- }- } catch (error) {- console.error('[VisualIndex] Failed to pause:', error);- }- }- }- }, [isRecording, sessionId, screenWsConnectionId, sceneIndexId, isRunning, visualIndexStore, startVisualIndexMutation, pauseVisualIndexMutation, resumeVisualIndexMutation]);+ // Merge transcript and visual items sorted by timestamp+ const mergedItems = mergeItems(items, visualItems);+ const totalItemCount = mergedItems.length + (pendingMic ? 1 : 0) + (pendingSystemAudio ? 1 : 0);// Auto-scroll to bottom when new items arriveuseEffect(() => {- if (scrollRef.current) {+ if (totalItemCount > prevItemCountRef.current && scrollRef.current) {scrollRef.current.scrollTop = scrollRef.current.scrollHeight;}- }, [items, visualItems, pendingMic, pendingSystemAudio]);+ prevItemCountRef.current = totalItemCount;+ }, [totalItemCount]);return (- <div className="flex flex-col h-full gap-[20px] pt-[8px]">+ <div className="border border-[#efefef] rounded-[12px] flex flex-col flex-1 min-h-0 overflow-hidden">{/* Header */}- <div className="flex items-center gap-[4px] shrink-0">+ <div className="bg-white border-b border-[#efefef] px-[16px] py-[10px] flex items-center gap-[8px] shrink-0 rounded-t-[12px]"><SparkleIcon />- <h2 className="flex-1 font-semibold text-[18px] text-black tracking-[0.09px]">- Meeting Transcript- </h2>- {/* Visual Analysis Toggle - only show during recording with screen enabled */}- {isRecording && screenWsConnectionId && (- <div className="flex items-center gap-[6px]">- <span className="font-medium text-[14px] text-[#464646] leading-[18px]">- Visual Analysis- </span>- <Toggle enabled={visualAnalysisEnabled} onChange={handleVisualAnalysisToggle} />- </div>- )}+ <span className="font-medium text-[15px] text-black">Meeting Transcript</span></div>- {/* Transcript Container */}- <div className="flex-1 min-h-0 border border-[rgba(4,4,4,0.1)] rounded-[16px] relative overflow-hidden">- {/* Top gradient overlay */}- <div className="absolute top-0 left-0 right-0 h-[52px] rounded-t-[15px] bg-gradient-to-b from-white to-transparent pointer-events-none z-10" />-- {/* Scrollable content */}- <div- ref={scrollRef}- className="h-full overflow-y-auto px-[20px] py-[20px] flex flex-col gap-[10px] [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]"- >- {items.length === 0 && !pendingMic && !pendingSystemAudio ? (- <div className="flex flex-col items-center justify-center h-full text-center py-16">- <div className="w-[64px] h-[64px] rounded-full bg-[#f7f7f7] flex items-center justify-center mb-4">- <SparkleIcon />- </div>- <p className="text-[#464646] font-medium text-[14px]">- {enabled- ? isRecording- ? 'Waiting for speech...'- : 'Start recording to see transcription'- : 'Enable transcription to see live text'}- </p>+ {/* Transcript Content */}+ <div+ ref={scrollRef}+ className="flex-1 bg-white overflow-y-auto p-[16px] flex flex-col gap-[10px] [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]"+ >+ {mergedItems.length === 0 && !pendingMic && !pendingSystemAudio ? (+ <div className="flex flex-col items-center justify-center h-full text-center py-16">+ <div className="w-[64px] h-[64px] rounded-full bg-[#f7f7f7] flex items-center justify-center mb-4">+ <SparkleIcon /></div>- ) : (- <>- {items.map((item) => (- <TranscriptMessage key={item.id} item={item} />- ))}-- {/* Visual Analysis entries */}- {visualAnalysisEnabled && visualItems.map((item) => (- <VisualAnalysisEntry key={item.id} item={item} />- ))}-- {/* Pending transcripts */}- {pendingMic && <PendingMessage text={pendingMic} source="mic" />}- {pendingSystemAudio && <PendingMessage text={pendingSystemAudio} source="system_audio" />}- </>- )}- </div>-- {/* Bottom gradient overlay */}- <div className="absolute bottom-0 left-0 right-0 h-[51px] rounded-b-[15px] bg-gradient-to-t from-white to-transparent pointer-events-none z-10" />+ <p className="text-[#464646] font-medium text-[14px]">+ {enabled+ ? isRecording+ ? 'Waiting for speech...'+ : 'Start recording to see transcription'+ : 'Enable transcription to see live text'}+ </p>+ </div>+ ) : (+ <>+ {mergedItems.map((item) =>+ item.type === 'transcript' ? (+ <TranscriptMessage key={(item.data as TranscriptItem).id} item={item.data as TranscriptItem} />+ ) : (+ <VisualAnalysisEntry key={(item.data as VisualIndexItem).id} item={item.data as VisualIndexItem} />+ )+ )}++ {/* Pending transcripts */}+ {pendingMic && <PendingMessage text={pendingMic} source="mic" />}+ {pendingSystemAudio && <PendingMessage text={pendingSystemAudio} source="system_audio" />}+ </>+ )}</div></div>);diff --git a/src/renderer/hooks/useGlobalRecorderEvents.ts b/src/renderer/hooks/useGlobalRecorderEvents.tsindex 18a3c3d..d7672f8 100644--- a/src/renderer/hooks/useGlobalRecorderEvents.ts+++ b/src/renderer/hooks/useGlobalRecorderEvents.ts@@ -38,28 +38,21 @@ export function useGlobalRecorderEvents() {const api = getElectronAPI();if (!api) return;- console.log('[Global] Setting up recorder event listener');-const unsubscribe = api.on.recorderEvent((event: RecorderEvent) => {const session = sessionStoreRef.current;const transcription = transcriptionStoreRef.current;const visualIndex = visualIndexStoreRef.current;- console.log('[GlobalRecorderEvents] Event received:', event.event, event.data);-switch (event.event) {case 'recording:started':- console.log('[GlobalRecorderEvents] Recording started, setting status to recording');session.setStatus('recording');break;case 'recording:stopped':- console.log('[GlobalRecorderEvents] Recording stopped, setting status to processing');session.setStatus('processing');break;case 'recording:error':- console.error('[GlobalRecorderEvents] Recording error:', event.data);session.setError(String(event.data));session.setStatus('idle');break;@@ -98,7 +91,7 @@ export function useGlobalRecorderEvents() {break;case 'visual_index':- if (event.data && visualIndex.enabled) {+ if (event.data) {const visualData = event.data as VisualIndexEvent;visualIndex.addItem({text: visualData.text,diff --git a/src/renderer/hooks/useLiveAssist.ts b/src/renderer/hooks/useLiveAssist.tsindex 0091388..699b1af 100644--- a/src/renderer/hooks/useLiveAssist.ts+++ b/src/renderer/hooks/useLiveAssist.ts@@ -2,14 +2,13 @@* useLiveAssist Hook** Manages the live assist feature lifecycle and subscribes to- * assist updates from the main process.+ * insight updates from the main process.*/import { useEffect, useRef } from 'react';import { useLiveAssistStore } from '../stores/live-assist.store';import { useSessionStore } from '../stores/session.store';import { getElectronAPI } from '../api/ipc';-import type { LiveAssistItem } from '../../shared/types/live-assist.types';export function useLiveAssist() {const store = useLiveAssistStore();@@ -48,9 +47,11 @@ export function useLiveAssist() {console.log('[LiveAssist] Setting up event listener');const unsubscribe = api.liveAssistOn.onUpdate((event) => {- console.log('[LiveAssist] Received assists:', event.assists.length);- const assists = event.assists as LiveAssistItem[];- store.addAssists(assists);+ console.log('[LiveAssist] Received insights:', {+ sayThis: event.insights.say_this.length,+ askThis: event.insights.ask_this.length,+ });+ store.addInsights(event.insights);});return () => {@@ -60,7 +61,8 @@ export function useLiveAssist() {}, [store]);return {- assists: store.assists,+ sayThis: store.sayThis,+ askThis: store.askThis,isProcessing: store.isProcessing,lastProcessedAt: store.lastProcessedAt,error: store.error,diff --git a/src/renderer/hooks/useSession.ts b/src/renderer/hooks/useSession.tsindex aa1028c..d3f8eec 100644--- a/src/renderer/hooks/useSession.ts+++ b/src/renderer/hooks/useSession.ts@@ -53,8 +53,10 @@ export function useSession() {}, [sessionStore.status, sessionStore.startTime]);const startRecording = useCallback(async (meetingSetup?: MeetingSetupData) => {+ console.log('[useSession] startRecording called with:', meetingSetup?.name);const api = getElectronAPI();if (!api) {+ console.log('[useSession] Error: Electron API not available');sessionStore.setError('Electron API not available');return;}@@ -63,10 +65,12 @@ export function useSession() {const apiUrl = configStore.apiUrl;if (!accessToken) {+ console.log('[useSession] Error: Not authenticated');sessionStore.setError('Not authenticated. Please log in first.');return;}+ console.log('[useSession] Setting status to starting');sessionStore.setStatus('starting');transcriptionStore.clear();useVisualIndexStore.getState().clear();@@ -156,8 +160,10 @@ export function useSession() {}}+ console.log('[useSession] Recording started successfully, sessionId:', captureSession.sessionId);sessionStore.startSession(captureSession.sessionId, sessionToken!, tokenExpiresAt!, result.screenWsConnectionId);} catch (error) {+ console.log('[useSession] Error starting recording:', error);const errorMessage = error instanceof Error ? error.message : 'Failed to start recording';if (errorMessage.includes('logged in') || errorMessage.includes('UNAUTHORIZED')) {diff --git a/src/renderer/stores/live-assist.store.ts b/src/renderer/stores/live-assist.store.tsindex 712a3a0..cf8a79a 100644--- a/src/renderer/stores/live-assist.store.ts+++ b/src/renderer/stores/live-assist.store.ts@@ -1,51 +1,53 @@/*** Live Assist Store*- * Manages the state for real-time meeting assists generated+ * Manages the state for real-time meeting insights generated* from transcript analysis every 20 seconds.*/import { create } from 'zustand';-import type { LiveAssistItem } from '../../shared/types/live-assist.types';+import type { LiveInsights } from '../../shared/types/live-assist.types';interface LiveAssistState {- assists: LiveAssistItem[];+ sayThis: string[];+ askThis: string[];isProcessing: boolean;lastProcessedAt: number | null;error: string | null;// Actions- setAssists: (assists: LiveAssistItem[]) => void;- addAssists: (assists: LiveAssistItem[]) => void;+ addInsights: (insights: LiveInsights) => void;setProcessing: (isProcessing: boolean) => void;setError: (error: string | null) => void;clear: () => void;}export const useLiveAssistStore = create<LiveAssistState>((set) => ({- assists: [],+ sayThis: [],+ askThis: [],isProcessing: false,lastProcessedAt: null,error: null,- setAssists: (assists) => set({- assists,- lastProcessedAt: Date.now(),- error: null,- }),+ addInsights: (insights) => set((state) => {+ // Deduplicate by checking existing items (case-insensitive)+ const existingSayThis = new Set(state.sayThis.map(s => s.toLowerCase()));+ const existingAskThis = new Set(state.askThis.map(s => s.toLowerCase()));- addAssists: (newAssists) => set((state) => {- // Deduplicate by text to avoid repeating the same assist- const existingTexts = new Set(state.assists.map(a => a.text.toLowerCase()));- const uniqueNewAssists = newAssists.filter(- a => !existingTexts.has(a.text.toLowerCase())+ const newSayThis = insights.say_this.filter(+ item => !existingSayThis.has(item.toLowerCase())+ );+ const newAskThis = insights.ask_this.filter(+ item => !existingAskThis.has(item.toLowerCase()));- // Keep last 10 assists max- const combined = [...state.assists, ...uniqueNewAssists].slice(-10);+ // Append new items to the end (max 15 per category)+ const combinedSayThis = [...state.sayThis, ...newSayThis].slice(-15);+ const combinedAskThis = [...state.askThis, ...newAskThis].slice(-15);return {- assists: combined,+ sayThis: combinedSayThis,+ askThis: combinedAskThis,lastProcessedAt: Date.now(),error: null,};@@ -56,7 +58,8 @@ export const useLiveAssistStore = create<LiveAssistState>((set) => ({setError: (error) => set({ error, isProcessing: false }),clear: () => set({- assists: [],+ sayThis: [],+ askThis: [],isProcessing: false,lastProcessedAt: null,error: null,diff --git a/src/shared/schemas/recording.schema.ts b/src/shared/schemas/recording.schema.tsindex 6050102..3484917 100644--- a/src/shared/schemas/recording.schema.ts+++ b/src/shared/schemas/recording.schema.ts@@ -93,6 +93,7 @@ export const RecordingSchema = z.object({meetingChecklist: z.array(z.string()).nullable().optional(),// Post-meeting analysispostMeetingChecklist: z.array(z.string()).nullable().optional(),+ postMeetingChecklistCompleted: z.array(z.number()).nullable().optional(),});export const CreateRecordingInputSchema = z.object({diff --git a/src/shared/types/ipc.types.ts b/src/shared/types/ipc.types.tsindex 492d4b7..369e214 100644--- a/src/shared/types/ipc.types.ts+++ b/src/shared/types/ipc.types.ts@@ -176,7 +176,7 @@ export interface LiveAssistApi {}export interface LiveAssistEvents {- onUpdate: (callback: (data: { assists: any[]; processedAt: number }) => void) => () => void;+ onUpdate: (callback: (data: { insights: { say_this: string[]; ask_this: string[] }; processedAt: number }) => void) => () => void;}export interface WorkflowsApi {diff --git a/src/shared/types/live-assist.types.ts b/src/shared/types/live-assist.types.tsindex b2dee84..03ad075 100644--- a/src/shared/types/live-assist.types.ts+++ b/src/shared/types/live-assist.types.ts@@ -5,28 +5,12 @@* transcript chunks and provides contextual suggestions.*/-export type AssistType = 'ask' | 'speak' | 'act';-export type AssistUrgency = 'now' | 'soon' | 'later';--export interface LiveAssistItem {- id: string;- type: AssistType;- urgency: AssistUrgency;- text: string;- reason: string;- timestamp: number; // When this assist was generated-}--export interface LiveAssistResponse {- assists: Array<{- type: AssistType;- urgency: AssistUrgency;- text: string;- reason: string;- }>;+export interface LiveInsights {+ say_this: string[];+ ask_this: string[];}-export interface LiveAssistEvent {- assists: LiveAssistItem[];+export interface LiveInsightsEvent {+ insights: LiveInsights;processedAt: number;}