Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

fix(trace): drop the date window from the trace-scoped Scores tab (LFE-14851) (#15878)

Nikita Kabardin70ac3a92621d
diff --git a/web/src/components/table/use-cases/scores.tsx b/web/src/components/table/use-cases/scores.tsx
index 212e5c35db..bd9a815edf 100644
--- a/web/src/components/table/use-cases/scores.tsx
+++ b/web/src/components/table/use-cases/scores.tsx
@@ -191,6 +191,13 @@ export default function ScoresTable({
]
: [];
+ // Scoped to a single trace (trace/observation detail): a time window can only
+ // hide that trace's own scores — the trace id already bounds the query — so the
+ // rows are unwindowed and the picker is not offered. The window still bounds the
+ // filter-option queries, which are project-wide either way.
+ const isTraceScoped = Boolean(traceId);
+ const rowDateRangeFilter: FilterState = isTraceScoped ? [] : dateRangeFilter;
+
const environmentFilterOptions =
api.projects.environmentFilterOptions.useQuery(
{
@@ -384,7 +391,7 @@ export default function ScoresTable({
);
const filterState = createFilterState(
- queryFilter.effectiveFilterState.concat(dateRangeFilter),
+ queryFilter.effectiveFilterState.concat(rowDateRangeFilter),
[
...(userId ? [{ key: "User ID", value: userId }] : []),
...(traceId ? [{ key: "Trace ID", value: traceId }] : []),
@@ -1002,8 +1009,12 @@ export default function ScoresTable({
]}
rowHeight={rowHeight}
setRowHeight={setRowHeight}
- timeRange={showControlsInPageHeader ? undefined : timeRange}
- setTimeRange={showControlsInPageHeader ? undefined : setTimeRange}
+ timeRange={
+ showControlsInPageHeader || isTraceScoped ? undefined : timeRange
+ }
+ setTimeRange={
+ showControlsInPageHeader || isTraceScoped ? undefined : setTimeRange
+ }
multiSelect={{
selectAll,
setSelectAll,