feat: add transcript conversation view to AI agent details#2333
feat: add transcript conversation view to AI agent details#2333
Conversation
|
The latest Buf updates on your PR. Results from workflow Buf CI / validate (pull_request).
|
3ee4eb9 to
9849ec9
Compare
|
@claude Review the PR |
|
Claude finished @weeco's task in 2m 21s —— View job PR Review
Overall this is well-structured, follows existing patterns, and the feature is clearly useful. The code is clean and readable. A few issues worth addressing: Issues1. System prompt not expandable in Chat view ( In <p className="mt-2 text-muted-foreground text-sm leading-relaxed">{systemPrompt}</p>But in 2. In {allToolCalls.map((tool) => (
<ToolCallItem key={tool.toolCallId} ... />
))}The proto definition has 3. No empty state when a transcript has zero turns ( If the API returns a transcript with an empty 4. const request = create(ListTranscriptsRequestSchema, {
agentId: input.agentId,
pageSize: -1, // Disables pagination — fetches everything
});This is fine for now since client-side filtering needs all the data, but for an agent that's been running for months this could return hundreds or thousands of conversations in a single payload. Worth adding a comment explaining the intentional choice and tracking a follow-up to add server-side pagination + filtering when the list grows too large. 5. const maxLatency = Math.max(...allToolCalls.map(toolCallLatencyMs), 0);The spread can hit the JS argument stack limit if there are many tool calls. Prefer reduce: const maxLatency = allToolCalls.reduce((max, tc) => Math.max(max, toolCallLatencyMs(tc)), 0);Minor in practice (tool calls rarely number in the thousands), but a cheap fix. Minor Observations
|
|
@claude re-review |
|
Claude finished @weeco's task in 53s —— View job PR Re-Review
All 5 issues from the previous review have been addressed in commit
The code is clean, well-structured, and ready to merge. No new issues found. |
frontend/src/components/pages/agents/details/transcript-utils.ts
Outdated
Show resolved
Hide resolved
frontend/src/components/pages/agents/details/ai-agent-transcripts-tab.tsx
Outdated
Show resolved
Hide resolved
frontend/src/components/pages/agents/details/ai-agent-transcripts-tab.tsx
Outdated
Show resolved
Hide resolved
frontend/src/components/pages/agents/details/ai-agent-transcripts-tab.tsx
Outdated
Show resolved
Hide resolved
frontend/src/components/pages/agents/details/ai-agent-transcripts-tab.tsx
Show resolved
Hide resolved
malinskibeniamin
left a comment
There was a problem hiding this comment.
@claude review this PR. Check comments already left behind
|
Claude finished @malinskibeniamin's task in 2m 38s —— View job PR Re-Review
Addressing each comment from @malinskibeniamin:
|
|
https://redpanda-ui-registry.netlify.app/docs/empty empty component |
Add is_reconstructed to TranscriptTurn proto so the frontend can visually distinguish turns restored from accumulated chat history vs turns backed by live OTel spans. Frontend renders reconstructed turns with reduced opacity, dashed borders, a history separator, and hides unavailable metrics.
Add transcripts tab to agent details page with conversation list, detail view (chat + detailed modes), status badges, and query hook. Restructure agent routes to support nested transcript pages.
React Compiler cannot handle BigIntLiteral expressions (0n). Use plain 0 since the value is immediately wrapped in Number().
- Use ExpandableText for system prompt in ChatView (was raw <p>) - Add index fallback for tool call React keys (toolCallId can be empty) - Add empty state when transcript has zero turns - Replace Math.max spread with reduce to avoid stack limit risk - Add TODO comment on pageSize: -1 for future pagination
Delete transcript-utils.ts and use the existing formatDuration and formatTimestamp from transcripts/utils/transcript-formatters.ts with buf wkt converters (durationMs, timestampDate) at call sites.
- Gate route prefetch on TracingService feature support - Remove unnecessary useMemo on transcript list (data changes per refresh) - Replace custom empty state with shared Empty compound component - Extract formatProtoTimestamp, formatProtoTime, formatProtoDuration, formatTokenCount utilities to keep JSX dumb - Replace all inline proto timestamp/duration/token formatting with utils
1290799 to
1bf5e2f
Compare
The generated route tree was not updated after the agent transcript conversation route was added in #2333.
The generated route tree was not updated after the agent transcript conversation route was added in #2333.
The generated route tree was not updated after the agent transcript conversation route was added in #2333.
Summary
is_reconstructedfield toTranscriptTurnproto for turns restored from accumulated chat history when earlier spans are evictedturn_countcounts user turns (interactions), not all messagesTest plan