Page the Spam, Trash and Everything topic views

Merged
RO
4d ago
+207-53

The Go SDK can't page HEY's Spam, Trash and Everything views. GetSpam, GetTrash and GetEverything decode the topics but drop the Link header that carries the next-page cursor, so callers see the first page and nothing after it. hey-cli wants these views for hey thread list --in spam|trash|everything (hey-cli#161). Without them it would have to read the routes through the document client and parse Link itself.

This adds GetSpamPage, GetTrashPage and GetEverythingPage. They return a TopicListPage with the view's title, description, topics, the opaque next_page cursor and X-Total-Count, the same shape as GetSentPage and the collection and label pages. The existing methods are unchanged for callers; they now share one read with the new ones and use instrument like the newer wrappers.

Only Go needed this. The spec already marks all four routes @heyPagination(style: "link", totalCountHeader: "X-Total-Count"), and the Rust, TypeScript, Kotlin and Swift SDKs already return pages for them. Haystack already sends both headers on these routes through geared_pagination, so no API change is needed.

GetSentPage keeps its own SentPage type. Sent pages by offset in haystack and sends no X-Total-Count, so a total there would always read zero.

Tests: make go-check go-check-drift. They cover the cursor and total on a first page, the empty cursor and empty list on the last page, and the error path for each view.

A second commit updates url from 2.5.8 to 2.5.9 in both Rust lockfiles. A new advisory, RUSTSEC-2026-0592, made cargo deny fail Rust Tests here. It has nothing to do with this change, and main will fail the same way until the bump lands.