diff --git a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.$runParam/route.tsx b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.$runParam/route.tsx index 840a4376e2..8ad68c00a9 100644 --- a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.$runParam/route.tsx +++ b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.$runParam/route.tsx @@ -959,6 +959,7 @@ function TimelineView({ const initialTimelineDimensions = useInitialDimensions(timelineContainerRef); const minTimelineWidth = initialTimelineDimensions?.width ?? 300; const maxTimelineWidth = minTimelineWidth * 10; + const disableSpansAnimations = rootSpanStatus !== "executing"; //we want to live-update the duration if the root span is still executing const [duration, setDuration] = useState(queueAdjustedNs(totalDuration, queuedDuration)); @@ -1130,8 +1131,8 @@ function TimelineView({ "-ml-[0.5px] h-[0.5625rem] w-px rounded-none", eventBackgroundClassName(node.data) )} - layoutId={node.data.isPartial ? `${node.id}-${event.name}` : undefined} - animate={!node.data.isPartial ? false : undefined} + layoutId={disableSpansAnimations ? undefined : `${node.id}-${event.name}`} + animate={disableSpansAnimations ? false : undefined} /> )} @@ -1149,8 +1150,8 @@ function TimelineView({ "-ml-[0.1562rem] size-[0.3125rem] rounded-full border bg-background-bright", eventBorderClassName(node.data) )} - layoutId={node.data.isPartial ? `${node.id}-${event.name}` : undefined} - animate={!node.data.isPartial ? false : undefined} + layoutId={disableSpansAnimations ? undefined : `${node.id}-${event.name}`} + animate={disableSpansAnimations ? false : undefined} /> )} @@ -1169,8 +1170,8 @@ function TimelineView({ > ) : null} @@ -1193,6 +1194,7 @@ function TimelineView({ } node={node} fadeLeft={isTopSpan && queuedDuration !== undefined} + disableAnimations={disableSpansAnimations} /> > ) : ( @@ -1207,8 +1209,8 @@ function TimelineView({ "-ml-0.5 size-3 rounded-full border-2 border-background-bright", eventBackgroundClassName(node.data) )} - layoutId={node.data.isPartial ? node.id : undefined} - animate={!node.data.isPartial ? false : undefined} + layoutId={disableSpansAnimations ? undefined : node.id} + animate={disableSpansAnimations ? false : undefined} /> )} @@ -1440,8 +1442,9 @@ function SpanWithDuration({ showDuration, node, fadeLeft, + disableAnimations, ...props -}: Timeline.SpanProps & { node: TraceEvent; showDuration: boolean; fadeLeft: boolean }) { +}: Timeline.SpanProps & { node: TraceEvent; showDuration: boolean; fadeLeft: boolean; disableAnimations?: boolean }) { return ( {node.data.isPartial && ( {formatDurationMilliseconds(props.durationMs, { style: "short",