Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

fix(sessions): Give marker icons a visible tooltip (#18156)

Der Gerät3faca12e21cd
diff --git a/web/src/features/sessions/SessionConversationTimeline/components/SessionConversationTimelineTrace/SessionConversationTimelineTrace.clienttest.tsx b/web/src/features/sessions/SessionConversationTimeline/components/SessionConversationTimelineTrace/SessionConversationTimelineTrace.clienttest.tsx
index e837ecb596..ce72174989 100644
--- a/web/src/features/sessions/SessionConversationTimeline/components/SessionConversationTimelineTrace/SessionConversationTimelineTrace.clienttest.tsx
+++ b/web/src/features/sessions/SessionConversationTimeline/components/SessionConversationTimelineTrace/SessionConversationTimelineTrace.clienttest.tsx
@@ -137,6 +137,30 @@ describe("SessionConversationTimelineTrace", () => {
).not.toBeInTheDocument();
});
+ it("shows a no-conversational-content marker with the correct accessible name", () => {
+ const emptyAgentTurn = prepareSessionTimelineObservations([
+ observation("agent-turn", null, "AGENT", new Date(0)),
+ ]);
+
+ render(
+ <SessionConversationTimelineTrace
+ trace={{ ...trace, observationCount: 1 }}
+ turnNumber={1}
+ state={{ type: "loaded", observations: emptyAgentTurn }}
+ onOpenTrace={vi.fn()}
+ onOpenObservation={vi.fn()}
+ scrollTarget={null}
+ />,
+ );
+
+ // The marker is rendered as an img role with the label as its accessible name.
+ // Floating-ui tooltip content is tested at the browser/integration level — jsdom's
+ // fireEvent.focus does not change document.activeElement so useFocus never opens.
+ expect(
+ screen.getByRole("img", { name: "No conversational content" }),
+ ).toBeInTheDocument();
+ });
+
it("decodes Unicode escapes in truncated observation previews", () => {
const truncated = prepareSessionTimelineObservations([
{
diff --git a/web/src/features/sessions/SessionConversationTimeline/components/SessionConversationTimelineTrace/SessionConversationTimelineTrace.tsx b/web/src/features/sessions/SessionConversationTimeline/components/SessionConversationTimelineTrace/SessionConversationTimelineTrace.tsx
index f72e54d29d..1e05ee4f15 100644
--- a/web/src/features/sessions/SessionConversationTimeline/components/SessionConversationTimelineTrace/SessionConversationTimelineTrace.tsx
+++ b/web/src/features/sessions/SessionConversationTimeline/components/SessionConversationTimelineTrace/SessionConversationTimelineTrace.tsx
@@ -6,6 +6,7 @@ import {
CircleAlert,
FileWarning,
Info,
+ type LucideIcon,
MessageSquareOff,
MoreHorizontal,
TriangleAlert,
@@ -34,6 +35,7 @@ import {
TooltipProvider,
TooltipTrigger,
} from "@/src/components/ui/tooltip";
+import { Tooltip as DSTooltip } from "@/src/components/design-system/Tooltip/Tooltip";
import { type RouterOutputs } from "@/src/utils/api";
import { formatIntervalSeconds } from "@/src/utils/dates";
import { cn } from "@/src/utils/tailwind";
@@ -132,6 +134,33 @@ function SessionTimelineStatusIndicator({
);
}
+/**
+ * Badge for a state an observation header reports next to its duration, e.g.
+ * truncated content. The label is both the accessible name and the tooltip.
+ */
+function SessionTimelineMarkerIcon({
+ icon: Icon,
+ label,
+}: {
+ icon: LucideIcon;
+ label: string;
+}) {
+ return (
+ <DSTooltip label={label}>
+ {({ getTriggerProps }) => (
+ <span
+ {...getTriggerProps()}
+ className="bg-muted text-muted-foreground shrink-0 rounded-md p-1"
+ role="img"
+ aria-label={label}
+ >
+ <Icon className="h-3 w-3" aria-hidden="true" />
+ </span>
+ )}
+ </DSTooltip>
+ );
+}
+
const toPreviewText = (value: unknown) => {
const text =
typeof value === "string"
@@ -530,34 +559,22 @@ function SessionTimelineConversationObservation({
<SessionTimelineStatusIndicator observation={observation} />
) : null}
{isTruncated ? (
- <span
- className="bg-muted text-muted-foreground shrink-0 rounded-md p-1"
- role="img"
- aria-label="Content truncated"
- title="Content truncated"
- >
- <FileWarning className="h-3 w-3" aria-hidden="true" />
- </span>
+ <SessionTimelineMarkerIcon
+ icon={FileWarning}
+ label="Content truncated"
+ />
) : null}
{hasNoConversationalContent ? (
- <span
- className="bg-muted text-muted-foreground shrink-0 rounded-md p-1"
- role="img"
- aria-label="No conversational content"
- title="No conversational content"
- >
- <MessageSquareOff className="h-3 w-3" aria-hidden="true" />
- </span>
+ <SessionTimelineMarkerIcon
+ icon={MessageSquareOff}
+ label="No conversational content"
+ />
) : null}
{observation.metadataTruncated ? (
- <span
- className="bg-muted text-muted-foreground shrink-0 rounded-md p-1"
- role="img"
- aria-label="Metadata omitted because it is too large"
- title="Metadata omitted because it is too large"
- >
- <FileWarning className="h-3 w-3" aria-hidden="true" />
- </span>
+ <SessionTimelineMarkerIcon
+ icon={FileWarning}
+ label="Metadata omitted because it is too large"
+ />
) : null}
{observation.latency !== null && observation.type !== "EVENT" ? (
<span className="text-muted-foreground font-mono text-[11px]">