Open History to see the last commit
1import { ThreadHoverCardPopup } from "../ThreadHoverCard";
2import { AgentElapsed } from "./AgentElapsed";
3import { projectedSubagentsToRuntime } from "@t3tools/client-runtime/state/subagentRuntime";
4import type { ReactNode } from "react";
5import { useThreadShell, useProject } from "../../state/entities";
6import { SubagentTooltipContent } from "./SubagentTooltipContent";
7import { useAtomValue } from "@effect/atom-react";
8import { scopeThreadRef, scopeProjectRef } from "@t3tools/client-runtime/environment";
9import { environmentThreadDetails } from "../../state/threads";
10import { EMPTY_SERVER_PROVIDERS, serverEnvironment } from "../../state/server";
11import { MiddleTruncate } from "../ui/middle-truncate";
12import * as DateTime from "effect/DateTime";
13import { WorkLogRow } from "./WorkLog";
14import {
15 resolveHandoffEndpoints,
16 type HandoffEndpoints,
17 type HandoffTimelineRun,
18} from "@t3tools/client-runtime/handoff";
19import { formatSubagentDisplayTitle } from "@t3tools/client-runtime/state/subagent-display";
20import {
21 ProviderDriverKind,
22 type OrchestrationV2Notification,
23 type OrchestrationV2TurnItem,
24 type OrchestrationV2Subagent,
25 type ProviderInstanceId,
26 type ServerProvider,
27 type ThreadId,
28 type EnvironmentId,
29 type NodeId,
30 type ScopedThreadRef,
31} from "@t3tools/contracts";
32import type { TimestampFormat } from "@t3tools/contracts/settings";
33import {
34 BotIcon,
35 ChevronRightIcon,
36 ArrowRightLeftIcon,
37 ArrowRightIcon,
38 GitForkIcon,
39 MessageSquareIcon,
40 MinusIcon,
41 XIcon,
42} from "lucide-react";
43
44import { Tooltip, TooltipTrigger, TooltipPopup } from "../ui/tooltip";
45import {
46 applyProviderInstanceSettings,
47 deriveProviderInstanceEntries,
48 shouldShowInstanceBadge,
49 type ProviderInstanceEntry,
50} from "../../providerInstances";
51import { formatShortTimestamp } from "../../timestampFormat";
52import { getTriggerDisplayModelName } from "./providerIconUtils";
53import { ProviderInstanceIcon, providerTextColor } from "./ProviderInstanceIcon";
54import { cn } from "~/lib/utils";
55import { TimelineSystemDivider } from "./TimelineSystemDivider";
56import { subagentResumedSince } from "./V2LifecycleRow.logic";
57import { Button, InlineButton } from "../ui/button";
58import { T3Wordmark } from "../T3Wordmark";
59
60const LIFECYCLE_TYPES = new Set<OrchestrationV2TurnItem["type"]>([
61 "run_interrupt_request",
62 "run_interrupt_result",
63 "compaction",
64 "handoff",
65 "fork",
66 "subagent",
67 "thread_created",
68]);
69
70export function isV2LifecycleItem(item: OrchestrationV2TurnItem): boolean {
71 return LIFECYCLE_TYPES.has(item.type);
72}
73
74export type { HandoffTimelineRun } from "@t3tools/client-runtime/handoff";
75
76export function V2LifecycleRow(props: {
77 readonly item: OrchestrationV2TurnItem;
78 readonly environmentId: EnvironmentId;
79 readonly resourceSummary?: boolean | undefined;
80 readonly createdAt: string;
81 readonly timestampFormat: TimestampFormat;
82 readonly runs: ReadonlyArray<HandoffTimelineRun>;
83 readonly onOpenThread: (threadId: ThreadId) => void;
84}) {
85 const { item } = props;
86 if (item.type === "run_interrupt_request") {
87 return (
88 <div className="flex justify-end px-1 py-1" data-v2-item-type={item.type}>
89 <div className="flex max-w-[80%] items-center gap-2 text-xs text-destructive">
90 <span aria-hidden="true" className="font-mono">
91 ■
92 </span>
93 <span className="font-medium">Interrupt requested</span>
94 <span aria-hidden="true" className="opacity-50">
95 ·
96 </span>
97 <span className="font-medium">{item.message}</span>
98 <span className="text-3xs text-muted-foreground">
99 {formatShortTimestamp(props.createdAt, props.timestampFormat)}
100 </span>
101 </div>
102 </div>
103 );
104 }
105 if (item.type === "run_interrupt_result") {
106 return (
107 <TimelineSystemDivider
108 label="Run interrupted"
109 detail={item.message}
110 tone="danger"
111 icon={XIcon}
112 />
113 );
114 }
115 if (item.type === "compaction") {
116 const tokenDetail =
117 item.beforeTokenCount === undefined && item.afterTokenCount === undefined
118 ? null
119 : `${item.beforeTokenCount ?? "?"} → ${item.afterTokenCount ?? "?"} tokens`;
120 const label =
121 item.status === "failed"
122 ? "Context compaction failed"
123 : item.status === "cancelled" || item.status === "interrupted"
124 ? "Context compaction stopped"
125 : item.status === "pending" || item.status === "running" || item.status === "waiting"
126 ? "Compacting context"
127 : "Context compacted";
128 return (
129 <TimelineSystemDivider label={label} detail={item.summary ?? tokenDetail} icon={MinusIcon} />
130 );
131 }
132 if (item.type === "handoff") {
133 return (
134 <EnvironmentHandoffRow
135 environmentId={props.environmentId}
136 endpoints={resolveHandoffEndpoints(item, props.runs)}
137 failed={item.status === "failed"}
138 />
139 );
140 }
141 if (item.type === "fork") {
142 const relatedThreadId = item.source.type === "run" ? item.source.threadId : item.targetThreadId;
143 return (
144 <TimelineSystemDivider
145 label={item.source.type === "run" ? "Forked from conversation" : "Conversation fork"}
146 icon={GitForkIcon}
147 actionLabel={item.source.type === "run" ? "Open source conversation" : "Open fork"}
148 onAction={() => props.onOpenThread(relatedThreadId)}
149 />
150 );
151 }
152 if (item.type === "thread_created") {
153 if (props.resourceSummary) {
154 return (
155 <div
156 data-v2-item-type={item.type}
157 className="flex min-w-0 items-center gap-3 rounded-lg border border-border/60 p-3"
158 >
159 <span className="flex size-9 shrink-0 items-center justify-center rounded-lg bg-muted/60">
160 <MessageSquareIcon className="size-4 text-secondary-label" aria-hidden />
161 </span>
162 <span className="min-w-0 flex-1 truncate text-sm font-medium">
163 {item.title ?? "Created thread"}
164 </span>
165 <Button
166 size="xs"
167 variant="outline"
168 aria-label={`Open ${item.title ?? "created thread"}`}
169 onClick={() => props.onOpenThread(item.targetThreadId)}
170 >
171 Open chat
172 </Button>
173 </div>
174 );
175 }
176 return (
177 <WorkLogRow
178 data-v2-item-type={item.type}
179 icon={<T3Wordmark className="size-4 text-icon-muted" aria-hidden />}
180 label={<>Created thread{item.title ? ` · ${item.title}` : ""}</>}
181 trailing={
182 <InlineButton
183 aria-label={`Open ${item.title ?? "created thread"}`}
184 onClick={() => props.onOpenThread(item.targetThreadId)}
185 >
186 Open chat
187 </InlineButton>
188 }
189 />
190 );
191 }
192 if (item.type === "subagent") {
193 return (
194 <SubagentTimelineLink
195 parentRef={scopeThreadRef(props.environmentId, item.threadId)}
196 subagentId={item.subagentId}
197 providerInstanceId={item.providerInstanceId}
198 origin={item.origin}
199 status={item.status}
200 driver={item.driver}
201 title={formatSubagentDisplayTitle(item.title ?? "Subagent")}
202 result={item.result}
203 progress={item.progress}
204 startedAt={item.startedAt}
205 completedAt={item.completedAt}
206 threadId={item.childThreadId}
207 onOpenThread={props.onOpenThread}
208 />
209 );
210 }
211 return null;
212}
213
214const STATUS_VISUALS: Record<
215 OrchestrationV2TurnItem["status"],
216 { dotClass: string; label: string }
217> = {
218 pending: { dotClass: "bg-info", label: "Queued" },
219 running: { dotClass: "bg-info", label: "Running" },
220 waiting: { dotClass: "bg-info", label: "Waiting" },
221 idle: { dotClass: "bg-muted-foreground/50", label: "Idle · resumable" },
222 completed: { dotClass: "bg-success", label: "Completed" },
223 failed: { dotClass: "bg-destructive", label: "Failed" },
224 cancelled: { dotClass: "bg-muted-foreground/60", label: "Stopped" },
225 interrupted: { dotClass: "bg-muted-foreground/60", label: "Stopped" },
226};
227
228function subagentStatusVisual(status: OrchestrationV2TurnItem["status"]) {
229 return STATUS_VISUALS[status];
230}
231
232const SETTLED_SUBAGENT_STATUSES = new Set<OrchestrationV2TurnItem["status"]>([
233 "completed",
234 "failed",
235 "cancelled",
236 "interrupted",
237]);
238
239const GENERIC_CHILD_END = /^Child task ended with status\b/i;
240
241function plainDetail(text: string): string {
242 return text
243 .replace(/\[([^\]]+)\]\([^)]*\)/g, "$1")
244 .replace(/`/g, "")
245 .replace(/^[ \t]*[-*][ \t]+/gm, "")
246 .replace(/\s+/g, " ")
247 .trim();
248}
249
250function isoOrNull(value: DateTime.Utc | null | undefined): string | null {
251 return value ? DateTime.formatIso(value) : null;
252}
253
254export function SubagentElapsed({ agent }: { agent: Parameters<typeof AgentElapsed>[0]["agent"] }) {
255 return <AgentElapsed agent={agent} />;
256}
257
258function SubagentAvatar({
259 driver,
260 displayName,
261 iconUrl,
262 status,
263 className,
264}: {
265 driver?: ProviderDriverKind | undefined;
266 displayName?: string | undefined;
267 iconUrl?: string | undefined;
268 status?: OrchestrationV2TurnItem["status"] | undefined;
269 className?: string;
270}) {
271 return (
272 <span
273 aria-hidden
274 className={cn(
275 "relative inline-flex size-6 shrink-0 items-center justify-center rounded-full border border-border/70 bg-muted ring-2 ring-background",
276 className,
277 )}
278 >
279 {driver ? (
280 <ProviderInstanceIcon
281 driverKind={driver}
282 displayName={displayName ?? driver}
283 acpRegistryIconUrl={iconUrl}
284 className="z-auto"
285 iconClassName="size-3.5"
286 />
287 ) : (
288 <BotIcon className="size-3.5 text-muted-foreground" />
289 )}
290 {status ? (
291 <span
292 className={cn(
293 "absolute -right-px -bottom-px size-2 rounded-full ring-2 ring-background",
294 subagentStatusVisual(status).dotClass,
295 )}
296 />
297 ) : null}
298 </span>
299 );
300}
301
302// Select strings; status pushes replace providers even when avatar fields are unchanged.
303export function EnvironmentSubagentAvatar({
304 environmentId,
305 providerInstanceId,
306 ...props
307}: {
308 environmentId: EnvironmentId;
309 providerInstanceId: ProviderInstanceId;
310 driver?: ProviderDriverKind | undefined;
311 status?: OrchestrationV2TurnItem["status"] | undefined;
312}) {
313 const providersAtom = serverEnvironment.providersValueAtom(environmentId);
314 const displayName = useAtomValue(
315 providersAtom,
316 (providers) =>
317 providers?.find((provider) => provider.instanceId === providerInstanceId)?.displayName,
318 );
319 const iconUrl = useAtomValue(
320 providersAtom,
321 (providers) =>
322 providers?.find((provider) => provider.instanceId === providerInstanceId)?.iconUrl,
323 );
324 return <SubagentAvatar {...props} displayName={displayName} iconUrl={iconUrl} />;
325}
326
327const NOTIFICATION_OUTCOME_STATUS: Record<
328 OrchestrationV2Notification["outcome"],
329 OrchestrationV2TurnItem["status"] | null
330> = {
331 completed: "completed",
332 failed: "failed",
333 cancelled: "cancelled",
334 updated: null,
335 unknown: null,
336};
337
338const NOTIFICATION_OUTCOME_LABEL: Record<OrchestrationV2Notification["outcome"], string> = {
339 completed: "Finished",
340 failed: "Failed",
341 cancelled: "Stopped",
342 updated: "Updated",
343 unknown: "Finished",
344};
345
346export function SubagentNotificationLink(props: {
347 readonly parentRef: ScopedThreadRef;
348 readonly childThreadId: ThreadId;
349 readonly outcome: OrchestrationV2Notification["outcome"];
350 readonly createdAt: string;
351 readonly timestampFormat: TimestampFormat;
352 readonly onOpenThread: (threadId: ThreadId) => void;
353 readonly fallback: ReactNode;
354}) {
355 const agent = useAtomValue(
356 environmentThreadDetails.threadAtom(props.parentRef),
357 (thread) =>
358 thread?.projection.subagents.find((agent) => agent.childThreadId === props.childThreadId) ??
359 null,
360 );
361 if (agent === null) return props.fallback;
362 const resumed =
363 NOTIFICATION_OUTCOME_STATUS[props.outcome] !== null &&
364 subagentResumedSince(agent, props.createdAt);
365 return (
366 <SubagentTimelineLink
367 parentRef={props.parentRef}
368 subagentId={agent.id}
369 providerInstanceId={agent.providerInstanceId}
370 origin={agent.origin}
371 status={agent.status}
372 driver={agent.driver}
373 title={formatSubagentDisplayTitle(agent.title ?? "Subagent")}
374 result={agent.result}
375 progress={agent.progress}
376 startedAt={agent.startedAt}
377 completedAt={agent.completedAt}
378 threadId={props.childThreadId}
379 onOpenThread={props.onOpenThread}
380 {...(resumed
381 ? {}
382 : {
383 event: {
384 status: NOTIFICATION_OUTCOME_STATUS[props.outcome],
385 label: NOTIFICATION_OUTCOME_LABEL[props.outcome],
386 timestamp: formatShortTimestamp(props.createdAt, props.timestampFormat),
387 },
388 })}
389 />
390 );
391}
392
393function SubagentTimelineLink(props: {
394 readonly parentRef: ScopedThreadRef;
395 readonly subagentId: NodeId;
396 readonly providerInstanceId: ProviderInstanceId;
397 readonly origin: OrchestrationV2Subagent["origin"];
398 readonly driver: ProviderDriverKind;
399 readonly title: string;
400 readonly result: string | null;
401 readonly progress: string | undefined;
402 readonly status: OrchestrationV2TurnItem["status"];
403 readonly startedAt: DateTime.Utc | null;
404 readonly completedAt: DateTime.Utc | null;
405 readonly threadId: ThreadId | null;
406 readonly onOpenThread: (threadId: ThreadId) => void;
407 readonly event?: {
408 readonly status: OrchestrationV2TurnItem["status"] | null;
409 readonly label: string;
410 readonly timestamp: string;
411 };
412}) {
413 const agent = useAtomValue(
414 environmentThreadDetails.threadAtom(props.parentRef),
415 (thread) => thread?.projection.subagents.find((agent) => agent.id === props.subagentId) ?? null,
416 );
417 const threadId = props.threadId;
418 const liveStatus = agent?.status ?? props.status;
419 const status = props.event ? props.event.status : liveStatus;
420 const statusLabel = props.event?.label ?? subagentStatusVisual(liveStatus).label;
421 const result = (agent?.result ?? props.result)?.trim();
422 const progress = (agent?.progress ?? props.progress)?.trim();
423 const settled = SETTLED_SUBAGENT_STATUSES.has(status ?? liveStatus);
424 const rawDetail = settled ? result || progress : progress || result;
425 const detail =
426 rawDetail && !GENERIC_CHILD_END.test(rawDetail) ? plainDetail(rawDetail) || null : null;
427 const failed = status === "failed";
428 const timing = {
429 status: liveStatus,
430 startedAt: isoOrNull(agent?.startedAt ?? props.startedAt),
431 completedAt: isoOrNull(agent?.completedAt ?? props.completedAt),
432 };
433 const content = (
434 <>
435 <EnvironmentSubagentAvatar
436 environmentId={props.parentRef.environmentId}
437 providerInstanceId={props.providerInstanceId}
438 driver={props.driver}
439 status={status ?? undefined}
440 />
441 <span className="min-w-0 flex-1">
442 <span className="flex items-baseline gap-2">
443 <span className="min-w-0 truncate text-xs font-medium text-foreground">
444 {props.title}
445 </span>
446 {detail !== null && (props.event !== undefined || status !== "completed") ? (
447 <span
448 className={cn(
449 "shrink-0 text-3xs",
450 failed ? "text-destructive" : "text-muted-foreground",
451 )}
452 >
453 {statusLabel}
454 </span>
455 ) : null}
456 </span>
457 <span
458 className={cn(
459 "block text-2xs leading-relaxed",
460 failed ? "text-destructive" : "text-muted-foreground",
461 )}
462 >
463 {detail === null ? (
464 statusLabel
465 ) : detail.includes("/") && !detail.includes(" ") ? (
466 <MiddleTruncate value={detail} showTitle={false} className="flex" />
467 ) : (
468 <span className="block truncate">{detail}</span>
469 )}
470 </span>
471 </span>
472 <span className="shrink-0 text-xs text-muted-foreground tabular-nums">
473 {props.event ? props.event.timestamp : <SubagentElapsed agent={timing} />}
474 </span>
475 {threadId !== null ? (
476 <ChevronRightIcon
477 aria-hidden
478 className="size-3.5 shrink-0 text-muted-foreground/60 transition-colors group-hover/subagent:text-foreground"
479 />
480 ) : null}
481 </>
482 );
483 const className =
484 "group/subagent flex w-full min-w-0 items-center gap-2.5 rounded-md px-2 py-1.5 text-left";
485 return (
486 <Tooltip>
487 <TooltipTrigger
488 delay={200}
489 render={
490 threadId === null ? (
491 <div data-v2-item-type="subagent" aria-description={statusLabel} className={className}>
492 {content}
493 </div>
494 ) : (
495 <button
496 type="button"
497 data-v2-item-type="subagent"
498 aria-label={`Open ${props.title}`}
499 aria-description={statusLabel}
500 onClick={() => props.onOpenThread(threadId)}
501 className={cn(
502 className,
503 "cursor-pointer transition-colors hover:bg-accent/20 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring/70",
504 )}
505 >
506 {content}
507 </button>
508 )
509 }
510 />
511 <ThreadHoverCardPopup>
512 <SubagentTimelineTooltip
513 {...props}
514 elapsed={agent ? <AgentElapsed agent={projectedSubagentsToRuntime([agent])[0]!} /> : null}
515 model={agent?.model ?? null}
516 modelSelection={agent?.modelSelection}
517 status={liveStatus}
518 result={agent?.result ?? props.result}
519 progress={agent?.progress ?? props.progress}
520 />
521 </ThreadHoverCardPopup>
522 </Tooltip>
523 );
524}
525
526function SubagentTimelineTooltip(
527 props: Parameters<typeof SubagentTimelineLink>[0] & {
528 model: string | null;
529 modelSelection: OrchestrationV2Subagent["modelSelection"];
530 elapsed: ReactNode;
531 },
532) {
533 const environmentId = props.parentRef.environmentId;
534 // Read providers only in the open popup to avoid per-row subscriptions.
535 const providers =
536 useAtomValue(serverEnvironment.providersValueAtom(environmentId)) ?? EMPTY_SERVER_PROVIDERS;
537 const parent = useThreadShell(props.parentRef)?.source;
538 const child = useThreadShell(
539 props.threadId ? scopeThreadRef(environmentId, props.threadId) : null,
540 )?.source;
541 const parentProject = useProject(
542 parent ? scopeProjectRef(environmentId, parent.projectId) : null,
543 );
544 const childProject = useProject(child ? scopeProjectRef(environmentId, child.projectId) : null);
545 return (
546 <SubagentTooltipContent
547 title={formatSubagentDisplayTitle(child?.title ?? props.title)}
548 model={props.model}
549 providerInstanceId={props.providerInstanceId}
550 origin={props.origin}
551 modelSelection={props.modelSelection}
552 provider={providers.find((provider) => provider.instanceId === props.providerInstanceId)}
553 providers={providers}
554 driver={props.driver}
555 elapsed={props.elapsed}
556 status={props.status}
557 result={props.result}
558 progress={props.progress}
559 parentThread={parent}
560 childThread={child}
561 parentProject={parentProject ?? undefined}
562 childProject={childProject ?? undefined}
563 />
564 );
565}
566
567function EnvironmentHandoffRow({
568 environmentId,
569 ...props
570}: {
571 readonly environmentId: EnvironmentId;
572 readonly endpoints: HandoffEndpoints;
573 readonly failed: boolean;
574}) {
575 const providers =
576 useAtomValue(serverEnvironment.providersValueAtom(environmentId)) ?? EMPTY_SERVER_PROVIDERS;
577 return <HandoffRow {...props} environmentId={environmentId} providers={providers} />;
578}
579
580export function HandoffRow(props: {
581 readonly environmentId: EnvironmentId;
582 readonly endpoints: HandoffEndpoints;
583 readonly providers: ReadonlyArray<ServerProvider>;
584 readonly pending?: boolean;
585 readonly failed?: boolean;
586}) {
587 const { from: fromEndpoints, to } = props.endpoints;
588 const settings = useAtomValue(serverEnvironment.settingsValueAtom(props.environmentId));
589 const derived = deriveProviderInstanceEntries(props.providers);
590 const entries = settings ? applyProviderInstanceSettings(derived, settings, null) : derived;
591 return (
592 <TimelineSystemDivider
593 label={props.pending ? "Context handoff pending" : "Context handoff"}
594 icon={ArrowRightLeftIcon}
595 showDetailSeparator={false}
596 tone={props.failed ? "danger" : "neutral"}
597 detail={
598 <span className="inline-flex min-w-0 flex-wrap items-center justify-center gap-1.5">
599 {fromEndpoints.map((endpoint, index) => (
600 <span
601 key={`${endpoint.instanceId}:${endpoint.model ?? ""}`}
602 className="inline-flex min-w-0 items-center"
603 >
604 <HandoffEndpoint
605 entries={entries}
606 instanceId={endpoint.instanceId}
607 model={endpoint.model}
608 />
609 {index < fromEndpoints.length - 1 ? (
610 <span aria-hidden="true" className="ml-0.5">
611 ,
612 </span>
613 ) : null}
614 </span>
615 ))}
616 {fromEndpoints.length > 0 ? (
617 <ArrowRightIcon aria-hidden="true" className="size-3 shrink-0" />
618 ) : null}
619 <HandoffEndpoint entries={entries} instanceId={to.instanceId} model={to.model} />
620 </span>
621 }
622 />
623 );
624}
625
626function HandoffEndpoint(props: {
627 readonly entries: ReadonlyArray<ProviderInstanceEntry>;
628 readonly instanceId: ProviderInstanceId;
629 readonly model?: string | undefined;
630}) {
631 const entry = props.entries.find((candidate) => candidate.instanceId === props.instanceId);
632 const showBadge = entry !== undefined && shouldShowInstanceBadge(entry, props.entries);
633 const model = props.model?.trim();
634 const providerModel =
635 model === undefined || model.length === 0
636 ? undefined
637 : entry?.models.find((candidate) => candidate.slug === model);
638 const label =
639 providerModel !== undefined
640 ? getTriggerDisplayModelName(providerModel)
641 : model !== undefined && model.length > 0
642 ? model
643 : (entry?.displayName ?? props.instanceId);
644 const labelColor = providerTextColor(
645 entry?.driverKind ?? ProviderDriverKind.make(props.instanceId),
646 );
647 return (
648 <Tooltip>
649 <TooltipTrigger
650 render={
651 <span
652 tabIndex={0}
653 className="inline-flex min-w-0 items-center gap-1.5 rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring"
654 >
655 <ProviderInstanceIcon
656 driverKind={entry?.driverKind ?? ProviderDriverKind.make(props.instanceId)}
657 displayName={entry?.displayName ?? props.instanceId}
658 accentColor={entry?.accentColor}
659 acpRegistryAgentId={entry?.acpRegistryAgentId}
660 acpRegistryIconUrl={entry?.acpRegistryIconUrl}
661 showBadge={showBadge}
662 size="compact"
663 iconClassName={cn(showBadge && "opacity-60")}
664 indicatorBackground="var(--background)"
665 />
666 <span
667 className={cn("truncate font-medium", labelColor.className)}
668 style={labelColor.style}
669 >
670 {label}
671 </span>
672 </span>
673 }
674 />
675 <TooltipPopup>
676 {entry?.displayName ?? props.instanceId} · {label}
677 </TooltipPopup>
678 </Tooltip>
679 );
680}