Skip to content

Commit 221f444

Browse files
committed
Removed state if span isn’t the first
1 parent 53b6d6d commit 221f444

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

apps/webapp/app/components/run/RunTimeline.tsx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,17 @@ export function RunTimeline({ run }: { run: TimelineSpanRun }) {
115115

116116
// Centralized function to build all timeline items
117117
function buildTimelineItems(run: TimelineSpanRun): TimelineItem[] {
118-
const state = run.isError ? "error" : run.isFinished ? "complete" : "inprogress";
118+
let state: TimelineEventState;
119+
if (run.isError) {
120+
state = "error";
121+
} else if (run.expiredAt) {
122+
state = "error";
123+
} else if (run.isFinished) {
124+
state = "complete";
125+
} else {
126+
state = "inprogress";
127+
}
128+
119129
const items: TimelineItem[] = [];
120130

121131
// 1. Triggered Event
@@ -745,8 +755,6 @@ export function createTimelineSpanEventsFromSpanEvents(
745755

746756
if (index === 0) {
747757
markerVariant = "start-cap";
748-
} else if (index === matchingSpanEvents.length - 1) {
749-
markerVariant = "end-cap-thick";
750758
}
751759

752760
return {

0 commit comments

Comments
 (0)