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
fix(frontend): sync totalItems from loadMore response (closes#1862)
totalItems was only set from the first /findings call. Subsequent loadMore
fetches never updated it, so the 'Load More (X/Y)' guard used a stale total
whenever filters changed the server-side count between pages.
Changes:
- Import FindingsResponse type and use it instead of �ny in the initial
load callback; filter findings to those with string ids for safety
- Add setTotalItems(data.total ?? moreFindings.length) inside loadMore after
each successful paginated fetch, matching the same pattern already used on
initial load; also apply the id-string filter to moreFindings
- Add two unit tests for the totalItems sync: one verifies the button hides
when totalItems drops to match findings.length after loadMore; the other
verifies the counter keeps updating correctly across pages
0 commit comments