Found by codex review of #464 (comment 3740349664).
StockPage.toggleGrade calls listEggLots({ gradeId }) without limit/offset, and the API defaults to the newest 50 lots (DefaultPageSize). Once a grade has more than 50 lots, older lots — including ones that still carry available or restricted stock — are invisible on the screen, so neither their movement ledger (history) nor the #406 write off action can be reached for them.
Pre-existing screen behavior (the API is paged; the screen never pages), but #406 raises the stakes: a write-off is precisely the kind of correction that targets an old lot.
Fix sketch: a "show more" pager on the lots table passing offset, or a lot search/filter. The API already supports limit/offset — SPA-only change.
Found by codex review of #464 (comment 3740349664).
StockPage.toggleGradecallslistEggLots({ gradeId })withoutlimit/offset, and the API defaults to the newest 50 lots (DefaultPageSize). Once a grade has more than 50 lots, older lots — including ones that still carry available or restricted stock — are invisible on the screen, so neither their movement ledger (history) nor the #406write offaction can be reached for them.Pre-existing screen behavior (the API is paged; the screen never pages), but #406 raises the stakes: a write-off is precisely the kind of correction that targets an old lot.
Fix sketch: a "show more" pager on the lots table passing
offset, or a lot search/filter. The API already supportslimit/offset— SPA-only change.