Repository navigation
Description
Original author: Cedric Vidal (@cedricvidal)
Summary
Filtering on the Runs list page is currently only partially evaluated server-side. Several filter dimensions are applied client-side over the current paginated page only, so under server-side pagination and grouping the results are incomplete — a filter can show few or zero matches even when matching runs exist on other pages.
Full server-side filtering for the Runs list existed before the UX v2 refactor. This issue tracks restoring it.
Background (prior art)
- Move runs grouping server side #568 — Move runs grouping server side (original issue)
- feat: move runs grouping and filtering server-side #570 — feat: move runs grouping and filtering server-side (merged 2026-04-12, closed Move runs grouping server side #568). Moved grouping, filtering, and aggregation into the API:
GET /api/v1/requestsgainedstatus,outcome,taskPromptId(and related) query params backed by a MongoDB$match, added migration 009 indexes for filtered/grouped queries, and removed the client-side.filter()for status/outcome/task entirely. - UX v2 #945 — UX v2 (merged 2026-06-01). Reworked the Runs list into the new master/detail layout. In the new
apps/portal/src/pages/RunsList.tsx, filtering is now performed client-side viaArray.filter()over the fetched page for most dimensions.
This is a factual record of where the behavior changed, not an attribution of fault.
Current behavior — apps/portal/src/pages/RunsList.tsx
Sent server-side, but only when exactly one value is selected and it isn't the (Unknown) sentinel (singleServerValue()):
- worker, status, outcome, profile, taskPromptId, submissionId, criteria, turns, maxIterations
Evaluated client-side over the current page only (after fetch, in the filteredRuns memo):
- model, OS/platform, priority, agent version, date range, free-text search
- any multi-value selection of worker / status / outcome / profile
- any
(Unknown)sentinel selection
Because the client only holds one page (limit 10–100), these filters operate on an incomplete dataset. Client-side sorting has the same single-page limitation (tracked separately in #739).
Desired behavior
- All Runs list filters evaluated server-side so they compose correctly with server-side pagination and grouping.
- Multi-value selections supported server-side (e.g.
status in [...]). - Server-side support for the dimensions that currently lack it: model, OS/platform, priority, agent version, and date range (date/time range is also tracked by It should be possible to search for runs by date and time range #907).
- Free-text search behavior made consistent (server-side, or clearly scoped).
- Maintain CLI ↔ Portal parity for any new filter params.
Pointers
- API handler:
apps/api/src/routes/requests/index.ts(filter construction ~L1050) andListRequestsQuerySchemainpackages/shared/src/schemas/request.ts. The API already accepts several of these params; the gaps are mainly (a) multi-value support, (b) the missing dimensions (model / OS / priority / version), and (c) the portal wiring them to the API instead of filtering locally. - Add indexes for any new filterable fields (see migration 009 /
docs/architecture/database.md).
Related
- It should be possible to search for runs by date and time range #907 — search runs by date/time range
- The portal runs table should allow sorting rows #739 — server-side sorting of the runs table
- The runs page should allow filtering by criteria and task prompt feature #163 — filter runs by criteria and task prompt feature
Activity