From eafacd4d5540dad7ff2c3e88a46426d83ccd05d3 Mon Sep 17 00:00:00 2001 From: Dotta Date: Tue, 3 Mar 2026 12:19:26 -0600 Subject: [PATCH] ui: deduplicate live run from comments timeline When an issue has an active running run, the same run was appearing both as a live widget and as a run entry in the comments timeline. Filter out runs shown by the live widget from the timeline linkedRuns to prevent this duplication. Co-Authored-By: Claude Opus 4.6 --- ui/src/pages/IssueDetail.tsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ui/src/pages/IssueDetail.tsx b/ui/src/pages/IssueDetail.tsx index 03d5a58d..d97e31f0 100644 --- a/ui/src/pages/IssueDetail.tsx +++ b/ui/src/pages/IssueDetail.tsx @@ -214,6 +214,15 @@ export function IssueDetail() { const hasLiveRuns = (liveRuns ?? []).length > 0 || !!activeRun; + // Filter out runs already shown by the live widget to avoid duplication + const timelineRuns = useMemo(() => { + const liveIds = new Set(); + for (const r of liveRuns ?? []) liveIds.add(r.id); + if (activeRun) liveIds.add(activeRun.id); + if (liveIds.size === 0) return linkedRuns ?? []; + return (linkedRuns ?? []).filter((r) => !liveIds.has(r.runId)); + }, [linkedRuns, liveRuns, activeRun]); + const { data: allIssues } = useQuery({ queryKey: queryKeys.issues.list(selectedCompanyId!), queryFn: () => issuesApi.list(selectedCompanyId!), @@ -743,7 +752,7 @@ export function IssueDetail() {