feat: add Pipeline Analytics dashboard with latency metrics#10
Open
mudassar531 wants to merge 2 commits intoTrilletAI:mainfrom
Open
feat: add Pipeline Analytics dashboard with latency metrics#10mudassar531 wants to merge 2 commits intoTrilletAI:mainfrom
mudassar531 wants to merge 2 commits intoTrilletAI:mainfrom
Conversation
Add a new Pipeline Analytics page that provides detailed voice agent performance monitoring with per-turn latency breakdowns: New files: - API route: /api/analytics/pipeline - aggregates STT, LLM TTFT, TTS, and EOU delay metrics from soundflare_metrics_logs - React hook: usePipelineAnalytics - React Query wrapper with caching - Page: /[projectid]/analytics - new route with agent_id query param - Component: PipelineAnalytics - full dashboard with: - KPI cards (total calls, avg/P95 latency, success rate) - Pipeline breakdown cards (STT, LLM TTFT, TTS, EOU delay) - Daily call volume bar chart - Hourly latency trend area chart - Call log table with expandable per-turn metrics - Call detail slide-over panel - Database migration: materialized view for efficient aggregation - Sidebar navigation: added Pipeline Analytics link under Logs group Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
API route: - Add UUID validation for agent_id - Add date format validation (YYYY-MM-DD regex) - Batch Supabase .in() queries (200 per batch) to avoid URL length limits - Add server-side pagination (page/limit params, default 50, max 100) - Mask phone numbers server-side (not just frontend) - Add isFinite() check on metrics to prevent NaN propagation - Round all metric values to 4 decimal places for consistent precision - Return success_count, failed_count, turn_count in summary Component: - Remove unused imports (LineChart, Line, PipelineSummary) - Add pagination controls (prev/next with showing X-Y of Z) - Reset page on period change to avoid stale state - Add Escape key handler for slide-over panel - Add aria-label and aria-hidden for accessibility Hook: - Add Pagination type interface - Pass page/limit params through to API Database migration: - Add UNIQUE index on (session_id, call_date, call_hour) required for CONCURRENTLY refresh Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
@mudassar531 is attempting to deploy a commit to the Trillet AI Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pipeline Analytics Dashboard
Adds a new Pipeline Analytics page that provides detailed voice agent performance monitoring with per-turn latency breakdowns (STT, LLM TTFT,
TTS TTFB, EOU delay).
Features
indicators
Files
database/add_pipeline_analytics_view.sqlsrc/app/api/analytics/pipeline/route.tssrc/hooks/usePipelineAnalytics.tssrc/components/analytics/PipelineAnalytics.tsxsrc/components/analytics/index.tssrc/app/[projectid]/analytics/page.tsxsrc/components/shared/SidebarWrapper.tsxProduction Hardening
.in()batched to 200 per call (URL length safety)isFinite()guards on all numeric metricsHow to test
database/add_pipeline_analytics_view.sql/<projectId>/analytics?agent_id=<uuid>Built to match existing Soundflare patterns (phosphor-react icons, shadcn/ui Card, recharts, React Query hooks, Supabase admin client).