Skip to content

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

fix(web): honor date-range window in eval preview tables (#14982)

Caleb79579229a4c2
diff --git a/web/src/components/table/use-cases/observations.tsx b/web/src/components/table/use-cases/observations.tsx
index 1d1df4f8e0..7d5daed653 100644
--- a/web/src/components/table/use-cases/observations.tsx
+++ b/web/src/components/table/use-cases/observations.tsx
@@ -537,8 +537,13 @@ export default function ObservationsTable({
modelIdFilter,
);
- // Use external filter state if provided, otherwise use combined filter state
- const filterState = externalFilterState || combinedFilterState;
+ // Use external filter state if provided, otherwise use combined filter
+ // state. Even with an external filter, still apply the date-range bound so
+ // callers that pass an externalDateRange (e.g. the eval preview's "last 24
+ // hours" window) have it honored for the row query, not just score columns.
+ const filterState = externalFilterState
+ ? externalFilterState.concat(dateRangeFilter)
+ : combinedFilterState;
const backendFilterState = transformFiltersForBackend(
filterState,
diff --git a/web/src/components/table/use-cases/traces.tsx b/web/src/components/table/use-cases/traces.tsx
index 805934c28f..6d235c5a18 100644
--- a/web/src/components/table/use-cases/traces.tsx
+++ b/web/src/components/table/use-cases/traces.tsx
@@ -398,8 +398,13 @@ export default function TracesTable({
dateRangeFilter,
);
- // Use external filter state if provided, otherwise use combined filter state
- const filterState = externalFilterState || combinedFilterState;
+ // Use external filter state if provided, otherwise use combined filter
+ // state. Even with an external filter, still apply the date-range bound so
+ // callers that pass an externalDateRange (e.g. the eval preview's "last 24
+ // hours" window) have it honored for the row query, not just score columns.
+ const filterState = externalFilterState
+ ? externalFilterState.concat(dateRangeFilter)
+ : combinedFilterState;
const [paginationState, setPaginationState] = usePaginationState(0, 50, {
page: "pageIndex",
diff --git a/web/src/features/events/components/EventsTable.tsx b/web/src/features/events/components/EventsTable.tsx
index ddde37ea5c..8495c57572 100644
--- a/web/src/features/events/components/EventsTable.tsx
+++ b/web/src/features/events/components/EventsTable.tsx
@@ -615,8 +615,13 @@ export default function ObservationsEventsTable({
.concat(userIdFilter)
.concat(sessionIdFilter);
- // Use external filter state if provided, otherwise use combined filter state
- const filterState = externalFilterState || combinedFilterState;
+ // Use external filter state if provided, otherwise use combined filter
+ // state. Even with an external filter, still apply the date-range bound so
+ // callers that pass an externalDateRange (e.g. the eval preview's "last 24
+ // hours" window) have it honored for the row query, not just score columns.
+ const filterState = externalFilterState
+ ? externalFilterState.concat(dateRangeFilter)
+ : combinedFilterState;
// Use the custom hook for observations data fetching
const {