Paginate the Review Queue with cursor-based infinite scroll
Fetching every needs_review activity's laps and per-second samples up front
gets expensive once there are many -- that work is now deferred to the
current page only. GET /api/review-queue/ takes limit/before and returns
{items, next_cursor, total}; sorting/cursor filtering still needs each
activity's cheap summary row, but only the requested page's items get their
laps/samples fetched.
Frontend loads 10 at a time and fetches the next page when the list's
bottom sentinel scrolls into view. Selecting a specific-kind filter (not
"All") loads the rest of the backlog up front, since filtering only the
items scrolled into view so far would hide matches further down.
This commit is contained in:
@@ -140,6 +140,12 @@ export interface ReviewQueueItem extends KindAssignment {
|
||||
samples: Sample[];
|
||||
}
|
||||
|
||||
export interface ReviewQueuePage {
|
||||
items: ReviewQueueItem[];
|
||||
next_cursor: string | null;
|
||||
total: number;
|
||||
}
|
||||
|
||||
export interface ProgressionPoint {
|
||||
date: string;
|
||||
activity_id: number;
|
||||
|
||||
Reference in New Issue
Block a user