Skip to content

Constructor feed: accept ?page=N - #609

Merged
mdirolf merged 1 commit into
crosshare-org:masterfrom
alexdej:feed-puzzle-details-minimal
Nov 13, 2026
Merged

mdirolf merged 1 commit into
crosshare-org:masterfrom
alexdej:feed-puzzle-details-minimal

Conversation

@alexdej

@alexdej alexdej commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Following up on our emails about automated traffic. We archive puzzles from a few Crosshare accounts (student papers, mostly) for the gxd crossword corpus, and we now fetch only the constructor feed and /api/ipuz/<id>, once a day.

The one time we'd still need more than the feed is a backfill past the newest ten puzzles, which today means the constructor's HTML pages. This lets the feed take ?page=N, paged the same way the constructor page is (paginatedPuzzles, 10 per page), so a backfill can stay on the feed. A missing or invalid value is page 0, so existing feed URLs behave as before, and the feed's self link names the page.

Testing: tsc, eslint and prettier pass; against the emulator's demo data, /api/feed/mike is unchanged, ?page=1 returns the next (empty) page, and ?page=abc / ?page=-2 return page 0.

If you'd rather we didn't page back at all, no problem; we'll do the rare backfill by hand.

So a reader can go back past the newest ten puzzles from the feed, without
loading the constructor's HTML pages. A missing or invalid value is page 0,
so existing feed URLs are unchanged; the feed's self link names the page.
@mdirolf

mdirolf commented Nov 13, 2026

Copy link
Copy Markdown
Member

Thank you!

@mdirolf
mdirolf merged commit f0aa9d7 into crosshare-org:master Nov 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants