All list endpoints now accept ?page and ?limit (default 50, max 200) and
return { data, total, page, limit } instead of a bare array, preventing
memory and performance failures at scale.
- GET /api/dogs: adds pagination, server-side search (?search) and sex
filter (?sex), and a stats aggregate (total/males/females) for the
Dashboard to avoid counting from the array
- GET /api/litters: adds pagination; also fixes N+1 query by fetching
all puppies for the current page in a single query instead of one per
litter
- DogList: moves search/sex filtering server-side with 300ms debounce;
adds Prev/Next pagination controls
- LitterList: uses paginated response; adds Prev/Next pagination controls
- Dashboard: reads counts from stats/total fields instead of array length
- LitterDetail, LitterForm: switch dogs fetch to /api/dogs/all (complete
list, no pagination, for sire/dam dropdowns)
- DogForm: updates litters fetch to use paginated response shape
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Remove blanket `id !== sid && id !== did` exclusion from commonIds filter
which was silently zeroing out COI for parent×offspring pairings because
the sire (sid) IS the common ancestor in damMap but was being filtered out.
- Instead: exclude `did` from sireMap keys (sire can't be its own common
ancestor with the dam) and exclude `sid` from damMap keys (same logic).
- Parent×offspring pairing now correctly yields ~25% COI as expected by
Wright's path coefficient method.
- All other normal pairings are unaffected.