+ No trace-enabled runs match the selected equipment and
+ project filters.
+
+ )}
+
+ >
)}
From dbbb9433bb88d73460e80b640a94906d38454280 Mon Sep 17 00:00:00 2001
From: navidgh67
Date: Mon, 12 Oct 2026 00:19:19 -0400
Subject: [PATCH 2/2] Keep selected runs listed when the run filters exclude
them
Runs selected before changing the equipment/project filters stayed plotted
and counted toward the selection limit but disappeared from the list, so
they couldn't be unchecked and could disable every visible run. They now
stay listed, and the count line says how many sit outside the filters.
Co-Authored-By: Claude Opus 5.5 (1M context)
Claude-Session: https://claude.ai/code/session_01SiF54uvxWoEdPxabhv3fFw
---
web/components/cross-run-trace-analysis.tsx | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/web/components/cross-run-trace-analysis.tsx b/web/components/cross-run-trace-analysis.tsx
index 66b5ebe..3ae4827 100644
--- a/web/components/cross-run-trace-analysis.tsx
+++ b/web/components/cross-run-trace-analysis.tsx
@@ -212,6 +212,16 @@ export function CrossRunTraceAnalysis() {
[runs, selectedEquipment, selectedProject],
);
+ // Selected runs stay listed even when the filters exclude them, so they can
+ // still be unchecked (they keep counting toward MAX_SELECTED_RUNS).
+ const listedRuns = useMemo(() => {
+ const matching = new Set(filteredRuns.map((run) => run.run_id));
+ return runs.filter(
+ (run) => matching.has(run.run_id) || selectedIds.includes(run.run_id),
+ );
+ }, [filteredRuns, runs, selectedIds]);
+ const selectedOutsideFilters = listedRuns.length - filteredRuns.length;
+
const visibleTraces = useMemo(
() => (selectedIds.length === 0 ? [] : traces),
[selectedIds.length, traces],
@@ -435,13 +445,17 @@ export function CrossRunTraceAnalysis() {