/dashboard/calls/:id (and /agent-console/calls/:id) is src/pages/CallDetail.tsx. It is the primary debugging surface for a single call: everything that happened, who ended it, how fast each stage was, what the LLM extracted, and how caching behaved.

Loading & Admin vs Agent

The page branches on location.pathname:
ContextEndpointDifferences
/dashboard/calls/:idGET /api/v1/calls/:id?make_recording_accessible=trueAdmin view; shows raw JSON export
/agent-console/calls/:idGET /api/v1/agent-desk/calls/:idAgent view; export hidden
If recording_url is an internal /api/... path, the page fetches it as a blob (so the authenticated proxy serves it) and plays the object URL; an external URL is used directly. Admin view also offers a raw JSON download via GET /api/v1/calls/:id/export.json.

Layout

The body is three columns:
ColumnContents
LeftInfo cards (duration, status, disconnected-by, caller, carrier/DID), Latency, Tokens, Post-Call Cache, Live Prompt Cache, Events
MiddleRecording player, Transcript
RightIntegration Log, Tool Calls, Knowledge Retrieval, Post-Call Analysis, QC Analysis, per-turn latency/token table
Banners above the columns flag transfers (was_transferred, failed-transfer reason, transfer-to-agent) and service_error events.

Metrics

Two helper modules in src/pages/callDetailMetrics.ts compute the metric panels:
  • buildTurnData(metrics, latencySamples) — per-turn STT/RAG/tool/LLM/TTS/total ms and token counts. TTFB entries are classified to a stage by classifyTtfbProcessor (STT engines → STT; LLM providers → LLM; TTS engines → TTS).
  • computeTtfbAvgs(metrics) — average STT/LLM/TTS time-to-first-byte.
The Latency section shows avg STT, LLM, RAG, Tool, TTS, and a highlighted Total (preferring latency.total_avg_response_ms, else summing the stage averages). The Tokens section shows prompt, completion, TTS characters, and combined post-call + QC tokens.

Cache Sections

CXB Console renders two clearly separated cache panels, matching CXB Core’s split between in-call and post-call caching.

Post-Call Cache

Built by buildCacheSummary, which prefers a server-stored llm_cache_summary and otherwise aggregates post_call + qc usage entries. The section shows a hit/created status badge plus Cached Read, Cache Created, Fresh Prompt, and Completion token counts. It only renders when caching was enabled or any cache tokens/statuses exist.

Live Prompt Cache

Built by buildLivePromptCacheSummary, which selects only llm usage entries tagged cache.namespace === "live_prompt". It shows the same four token cards under an “In-call LLM cache” label. This is deliberately scoped to the live conversation so it does not pollute the post-call aggregate.
Cache hit/miss is derived from real reported tokens, not estimates: a positive cache_read_input_tokens is a hit, cache_creation_input_tokens is a create. See CXB Core caching for how these metrics are produced.

Transcript

src/components/TranscriptViewer.tsx merges three streams into one time-ordered timeline: conversation messages, custom_tool_result events, and knowledge_search events (sorted by ts). Messages render as bot/user bubbles; tool and knowledge entries render inline so you can see exactly when a tool fired or a KB lookup happened relative to the dialogue. The transcript source prefers call.transcript, falling back to call.agent_transcript for agent calls.

Events, Tools & Knowledge

  • Events (left, collapsible) — the raw event timeline with name, function, by, duration, note, and timestamp.
  • Integration Log (right) — CRM pre-fetch / post-call push attempts with status, URL, request, response, and errors.
  • Tool Calls (right) — custom_tool_result events with status, arguments, request payload, and errors.
  • Knowledge Retrieval (right) — knowledge_search events with query, hit count, per-stage latency (cache/embedding/vector database), cache-source flags, and active KB IDs.

Analysis & QC

  • Post-Call Analysis renders each non-empty field from post_call_analysis, labelizing keys. disposition/sub_disposition render as badges; object values render as pretty JSON.
  • QC Analysis renders qc_analysis the same way (scores, remarks, nested objects).

CXB Core Caching

How live-prompt and post-call cache metrics are produced.

Call Logs

Finding and filtering calls.

Bot Detail & Integration

Cache enable/disable/refresh controls.