feat(web): bound session search pagination - #376
Conversation
Signed-off-by: seekskyworld <djh1813553759@gmail.com>
Signed-off-by: seekskyworld <djh1813553759@gmail.com>
tt-a1i
left a comment
There was a problem hiding this comment.
Exact-head review: e202201
[P1] Pagination is applied after the same 500-session UI projection, so it cannot retrieve later canonical results. web/adapter/pi-adapter.ts:314-340 retains at most WEB_MAX_SESSIONS before searchSessions() filters and slices at lines 513-522. Any offset at or beyond 500 is empty, and even earlier pages omit matches that fell outside the newest 500 sessions. The endpoint can still emit a nextOffset as if more canonical search results were reachable.
This breaks the PR goal of stable bounded retrieval without loading an unbounded list. Please paginate a canonical or purpose-built bounded search traversal rather than the snapshot projection, and return continuation evidence derived from that traversal. Add tests with more than 500 sessions, including a unique late match and an offset beyond 500.
Verification boundary: exact-head static boundary analysis; current validation does not exercise data beyond the projection cap.
Problem
Adds the pagination slice of #349. A bounded server search needs a stable way to retrieve additional results without loading an unbounded list.
Value
Clients can request 1-100 metadata results at a time with an explicit next offset.
Approach
Add validated
offsetandlimitquery parameters to the read-only Session search endpoint and adapter projection. Existing query, archive, and 200-character bounds remain enforced.Validation
npx tsc --noEmitgit diff --checkImpact