fix: apply the amount/limit per project and reset the overview filter (#347, #348) - #350
Merged
timdegroot1996 merged 2 commits intoSep 25, 2026
Conversation
…#347, #348) The amount filter sliced the combined run list before the overview grouped it by project, so a project with a lower run frequency could fall entirely outside the last X runs and disappear from the overview. The same held for the retention limit: an unscoped '-r limit=N' kept the N newest runs globally and could wipe the whole history of a low frequency project. Both now group by project first and keep the last X runs of every project. A project is a run name plus every 'project_' run tag, the grouping the overview page already uses; the keys are prefixed so a run name can never collide with a run tag. A run is kept when it is one of the last X runs of at least one of its projects, which means the shown total can be higher than X. The new keep set of _remove_by_limit is a superset of the old one, so the change can never remove more runs than before. Navigating back to the overview page now also drops the single project filter that was applied by clicking a project card, since the overview is meant to show every project. Filters the user changed themselves are left alone: the applied project is remembered and only cleared while the filter modal still holds exactly that filter. The filter modal documents the new behaviour through the 'Amount per project' label and its information popup, and the CLI help, the admin page, the server API examples and the documentation were updated along with it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…reset Resolves the conflicts with the filter option availability (#346) and the per page hidden custom filters (#349): - README and the metadata tooltip keep both descriptions, the amount tooltip keeps this branch's per project rewrite - the menu.js and overview.js import lists are a union of both sides - filter.test.js keeps both appended suites The availability counts are unaffected by the per project amount: #346 leaves the amount filter out of them on purpose, since it is not a category. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Merged
timdegroot1996
deleted the
fix/347-348-per-project-amount-and-overview-reset
branch
September 26, 2026 15:58
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #347
Fixes #348
Problem
#347 — the amount filter sliced the combined run list before the overview grouped it by project, so a project with a lower run frequency could fall entirely outside the last X runs and disappear from the overview (not reduced — its whole section missing). The same held for retention: an unscoped
-r limit=Nkept the N newest runs globally and could wipe the entire history of a low frequency project while barely touching a busy one.#348 — clicking a project card filters the dashboard to that project, but navigating back to the overview kept that filter, so the overview showed only the one project instead of all of them.
Root cause
filter_amount()didfilteredRuns.slice(-X)on the flat list;prepare_projects_grouped_data()groups after that stage._remove_by_limit()droppedcandidates[: len(candidates) - limit]across all runs unless the caller manually addedtag=scoping.update_menu()re-runs the filter pipeline on every menu switch, so theselectedTagSetting/selectedRunSettingpre-filter set by the card click was still in effect on the way back.Fix
One definition of a project, shared by the browser and the database: a run's run name plus every
project_run tag — the grouping the overview already uses. The keys are prefixed (name:/tag:) so a run name can never collide with a run tag.js/common.js— newget_run_projects(run).js/filter.js—filter_amount()groups run indexes per project and keeps the last X of each, unioned. A run is kept when it is in the last X of at least one of its projects, so the shown total can be higher than X. Index based, so chronological order and de-duplication come for free.database.py—_remove_by_limit()keeps the N newest per project (new_get_run_projects()helper).tag=scoping still narrows the candidates first, then the limit applies per project inside that scope. The new keep set is a strict superset of the old one, so this can never delete more than before.js/menu.js+js/filter.js—clear_overview_project_navigation_filter()runs when navigating tomenuOverviewand drops the card-applied filter, but only while the filter modal still holds exactly that filter, so anything the user changed by hand survives. The version filter is cleared only when the same navigation set it (version badge).The filter modal documents this: the label is now "Amount per project" and its ⓘ popup explains the grouping and the "total can exceed X" consequence. The
--quantityand-r limit=CLI help, the admin page label, the/remove-outputsAPI examples,docs/filtering.md,basic-command-line-interface-cli.md,performance.md,dashboard-server.md,custom-database-class.mdand the README were updated to match.Tests
_remove_by_limitper-project tests; 4 existing ones rewritten to the new semanticsdatabase.pystashed, pass with itget_run_projects(5 cases) + the per-project amount logic (6 cases)Validate Dashboard Amount Filter Is Applied Per Project,Validate Overview Resets The Project Card Filter When Navigating Back,Validate Overview Keeps Filters That Were Changed By Handjs/stashed 2 of the 3 fail (showing 1 of 18vs2 of 18,10 of 10vs18 of 18); the third is the guard test and passes either wayFull runs:
406 passed(python),311 passed(javascript),106 tests, 106 passed, 0 failed(robot, in Docker).The
run/runAmountFilter.pngreference was regenerated from the Docker run:amount=5now renders "showing 10 of 18 runs" (5 WebshopUI + 5 WebshopAPI), which is the intended new behaviour. Thehelp.txtfixture follows the CLI help changes.Notes
example/robot_dashboard.htmlandexample/robot_results.dbwere deliberately not regenerated — that belongs to the release procedure, and the per-project amount changes the example's default view.🤖 Generated with Claude Code