Skip to content

fix/duration-filters - #2127

Open
alanpeixinho wants to merge 2 commits into
kernelci:mainfrom
profusion:fix/duration-filters-428-2126
Open

alanpeixinho wants to merge 2 commits into
kernelci:mainfrom
profusion:fix/duration-filters-428-2126

Conversation

@alanpeixinho

Copy link
Copy Markdown
Contributor

What it is

Fixes duration filter handling in the dashboard and API:

  • Duration filters showing 0 filter card #428: 0 is not treated as an active duration filter (no chip, not persisted, not sent). Duration inputs show 0 correctly (?? instead of ||). Clearing a duration field removes it from filter state.
  • wrong param parse on build duration #2126: Non-zero duration filters work from URL state and query params: minified URL keys parse as numbers, Zod coerces duration values safely, API mapping only sends active durations, and the backend no
    longer truncates multi-digit values (e.g. 3600 → 3) when filters come from the query string.

Closes #428
Closes #2126

How to test

  1. Open a tree view with duration filters (build / boot / test).
  2. Set min or max to 0 → no duration chip; other filters unchanged.
  3. Set a non-zero duration (e.g. build min 120) → chip appears; results respect the filter.
  4. Reload or share the URL with duration in df|… → chip and filter still apply.
  5. (API) Request with filter_duration_[lte]=3600 → results match 3600, not 3.

Closes kernelci#428

Signed-off-by: Alan Peixinho <alan.peixinho@profusion.mobi>
Closes kernelci#2126

Signed-off-by: Alan Peixinho <alan.peixinho@profusion.mobi>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

wrong param parse on build duration Duration filters showing 0 filter card

1 participant