You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Make the default run list filters more explicit #2494
In the /runs API endpoint we apply a time range filter (last 7 days) by default. This is not obvious in the API docs or in the SDK runs.list method, which can lead to confusion.
We should document this behavior in the docs. Additionally it might be reasonable to add the applied filters as metadata in the API response.
Similarly in the runs page in the dashboard, we can hint at changing the default time range filter when there are no runs returned for the selected filters.
Reacted by Yash Srivastava, felix-quotez, Wout De Rijck and Himanshu Patro
@WoutDeRijck there's a performance impact on changing this default to be longer. Returning all of the filters in the response, including the implicit time period makes sense.
I've put together a small change along the lines @matt-aitken suggested above (keep the 7 day default for performance, but make it explicit by returning the applied filters), and would like to contribute it if a maintainer is willing to vouch for me.
GET /api/v1/runs now returns a filters object next to data and pagination, echoing the filters the list was produced with. When the request has no filter[createdAt], that includes the implicit default: "filters": { "createdAt": { "period": "7d" } }. Explicit period / from / to, and any status, env, task, version, tag, queue, etc. filters are echoed as well. Only the webapp ApiRunListPresenter is touched; the resolution of the default reuses timeFilters() from SharedFilters, so the API and the dashboard stay in sync.
Documents the new filters field on ListRunsResult in docs/v3-openapi.yaml, and adds a note to the runs.list() section of docs/runs.mdx explaining the 7 day default and how to pass period / from / to to list older runs.
Adds a .server-changes entry and a small vitest unit test for the filter echo (webapp typecheck, oxfmt and oxlint are clean; I couldn't run the container-based tests locally as I don't have Docker).
Deliberately left out of this change, could be follow-ups if you want them:
The SDK's CursorPage schema strips unknown keys, so runs.list() doesn't surface filters yet. Exposing it would mean a packages/core schema change plus a changeset, which felt like a separate PR.
A hint in the dashboard's empty run list ("showing the last 7 days") for the UI side of this issue.
Happy to adjust the shape or scope before opening a draft PR. If the vouch process should go through discussion #5010 instead, let me know and I'll post there.
Activity
WoutDeRijck commentedon Jun 30, 2026
We were indeed confused by this, is there a way to remove the time range filter?
matt-aitken commentedon Jul 2, 2026
@WoutDeRijck there's a performance impact on changing this default to be longer. Returning all of the filters in the response, including the implicit time period makes sense.
Rutvij97 commentedon Nov 10, 2026
I've put together a small change along the lines @matt-aitken suggested above (keep the 7 day default for performance, but make it explicit by returning the applied filters), and would like to contribute it if a maintainer is willing to vouch for me.
Branch: https://github.com/Rutvij97/trigger.dev/tree/feat/runs-list-applied-filters (compare: main...Rutvij97:trigger.dev:feat/runs-list-applied-filters)
What it does:
GET /api/v1/runsnow returns afiltersobject next todataandpagination, echoing the filters the list was produced with. When the request has nofilter[createdAt], that includes the implicit default:"filters": { "createdAt": { "period": "7d" } }. Explicitperiod/from/to, and any status, env, task, version, tag, queue, etc. filters are echoed as well. Only the webappApiRunListPresenteris touched; the resolution of the default reusestimeFilters()fromSharedFilters, so the API and the dashboard stay in sync.filtersfield onListRunsResultindocs/v3-openapi.yaml, and adds a note to theruns.list()section ofdocs/runs.mdxexplaining the 7 day default and how to passperiod/from/toto list older runs..server-changesentry and a small vitest unit test for the filter echo (webapp typecheck, oxfmt and oxlint are clean; I couldn't run the container-based tests locally as I don't have Docker).Deliberately left out of this change, could be follow-ups if you want them:
CursorPageschema strips unknown keys, soruns.list()doesn't surfacefiltersyet. Exposing it would mean apackages/coreschema change plus a changeset, which felt like a separate PR.Happy to adjust the shape or scope before opening a draft PR. If the vouch process should go through discussion #5010 instead, let me know and I'll post there.