Measure when users see a reply to their onboarding chat input (#23574)

This commit is contained in:
scotttong authored and GitHub committed 2026-12-02 18:03:08 -08:00
1 parent 2b65b97cae
commit b0f682b66b
17 files changed
+367 -7

No files matched your search

@@ -83,6 +83,7 @@ export function TaskChatActivityPhase({
<div
className="min-w-0 px-1 text-sm text-foreground/90"
data-testid="task-chat-phase-interstitial"
data-reply-run={item.interstitial.channel === "final" ? item.interstitial.sourceRunId : undefined}
data-conversation-text={item.interstitial.channel === "final" ? "final" : "progress"}
>
<MarkdownBody softBreaks linkIssueReferences>
@@ -304,6 +304,8 @@ function TaskChatBubbleContent({
) : null}
{bodyText.length > 0 ? (
<div
data-reply-run={item.author === "agent" && !item.optimistic && item.origin !== "fast_response"
&& (item.origin === "comment" || item.channel === "final") ? item.sourceRunId : undefined}
data-conversation-text={isHuman ? (isOwnMessage ? "human" : "progress") : item.channel === "progress" ? "progress" : "final"}
// Stable hook so the TaskChatLab bubble-treatment explorations
// (PAP-501) can scope background/border overrides to the agent
@@ -618,6 +618,7 @@ export function TaskChatRunnerActivityGroup({
<div
className="min-w-0 px-1 text-sm text-foreground/90"
data-testid="task-chat-phase-interstitial"
data-reply-run={item.interstitial.channel === "final" ? item.interstitial.sourceRunId : undefined}
data-conversation-text={item.interstitial.channel === "final" ? "final" : "progress"}
>
<MarkdownBody softBreaks linkIssueReferences>
@@ -133,6 +133,7 @@ export function TaskChatTurn({
<div className="w-full" data-testid="task-chat-final-response">
<div
className="break-words px-1 py-2 text-sm text-foreground"
data-reply-run={item.finalResponse.sourceRunId}
data-testid="task-chat-agent-bubble"
>
<MarkdownBody softBreaks linkIssueReferences>
@@ -879,6 +879,7 @@ export function transcriptToTaskChatItems(
author: "agent",
authorName: agentName,
text: entry.text,
...(channel === "final" ? { sourceRunId: runId } : {}),
channel,
streaming: running,
// Explicit final-answer items stream durably. Unclassified text