Skip to content

Show total result count on the dashboard filter header - #206

Open
fredj wants to merge 1 commit into
georchestra:mainfrom
fredj:feat/dashboard-result-count
Open

fredj wants to merge 1 commit into
georchestra:mainfrom
fredj:feat/dashboard-result-count

Conversation

@fredj

@fredj fredj commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator

The dashboard only lists a page of datasets at a time, so users could not tell how many datasets match their current search and filters. It now shows the total next to "Filtrer vos données", e.g. "Filtrer vos données - 1005 résultats".

  • The list endpoint returns a new total field: the SQL count of links matching the filters, minus the links the listing drops because neither their staging nor their final table exists. It is exact and identical on every page. This costs one extra query per list request, limited to non-empty links.
  • The frontend takes the total from the first page, so it stays stable while loading more, and decrements it when a dataset is deleted.
  • The API client is regenerated and the new integrityLinks.filters.resultCount key is added to all translation files (fr and en filled in).
  • README: the frontend gateway path is /dataset/, not /datafeeder/.

Checked in the browser against a dev database: the total matched the number of datasets reachable through "Charger plus" (386), and with a search term (32 results, 32 rows).

@fredj
fredj marked this pull request as ready for review October 22, 2026 08:23
@f-necas
f-necas requested review from f-necas and tonio October 22, 2026 08:25
The list endpoint returns a `total` field on the first page: the number
of links matching the current filters that the listing keeps, those
without a staging or final table excluded. It is counted from a single
query selecting only the columns that check reads, so it cannot go
negative from a link created between two queries. Later pages return
null instead of counting again.

The dashboard shows it next to "Filtrer vos données", taken from the
first page, and decremented on delete.
@fredj
fredj force-pushed the feat/dashboard-result-count branch from c92cff8 to 2bc1c54 Compare October 30, 2026 08:39
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.

2 participants