Say how many workouts the list holds and let a sport narrow it

The list hook already returned the canonical total and the page threw it
away, so the surface never said how much history it was showing. Render it
as a meta line above the rows.

The route and the hook already accepted a sport, with nothing to reach it.
Add the chip row. Its vocabulary comes from the unfiltered read, which is
the same query the list itself runs when no sport is chosen, so the row
costs no extra request and choosing a sport can never empty the row it was
chosen from. A filtered view falls outside the server prefetch and pays one
client fetch; a filter that matches nothing says so instead of borrowing the
first-run empty state.
This commit is contained in:
Marc-André Bombeck committed 2026-07-30 23:23:37 +02:00
1 parent 52cccb3835
commit 0784cbcbb1
8 files changed
+172 -18

No files matched your search

+7 -1
View File
@@ -3139,7 +3139,13 @@
"loadError": "Non è stato possibile caricare i tuoi allenamenti",
"loadMore": "Carica altri allenamenti",
"loadingMore": "Caricamento di altri allenamenti",
"loadMoreError": "Non è stato possibile caricare altri allenamenti"
"loadMoreError": "Non è stato possibile caricare altri allenamenti",
"countOne": "{count} allenamento",
"countOther": "{count} allenamenti",
"countFew": "{count} allenamenti",
"filterLabel": "Filtra per sport",
"filterAll": "Tutti gli sport",
"filterEmpty": "Nessuna sessione di questo sport nella tua cronologia."
},
"bloodGlucose": {
"title": "Glicemia",