feat: make analytics real-time via WebSocket-triggered refresh
- Analytics panel now refreshes immediately when messages are created, updated, deleted, or analyzed - WebSocket events (message_created, message_updated, message_deleted, message_analyzed) trigger custom event 'analytics_refresh' - Analytics hook listens to 'analytics_refresh' event for instant updates - Auto-refresh interval lowered from 60s to 5s as fallback - Two-tier refresh: real-time push + 5s polling safety net Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
fed9f39bd9
commit
9a7b8f569d
@@ -17,6 +17,7 @@ export interface DashboardSocketHandlers {
|
||||
onMediaState?: (state: MediaState) => void;
|
||||
onVoiceRecordingUploaded?: (recording: any) => void;
|
||||
onPcm?: (data: ArrayBuffer) => void;
|
||||
onAnalyticsRefresh?: () => void;
|
||||
}
|
||||
|
||||
export function useDashboardSocket(handlers: DashboardSocketHandlers) {
|
||||
|
||||
Reference in New Issue
Block a user