The console's public-list helper fetches only the first API page. Template selectors use /templates?limit=1000, and the owning-organization snapshot catalog uses /sandboxes/{id}/snapshots, whose default page size is 100. Resources beyond that first page are absent from the selector or catalog.
Reproduction with synthetic input:
- Have the first list request return a page containing
firstwith a non-nullnext_cursor. - Have the continuation return a page containing
lastwithnext_cursor: null. - Call
getPublicPagefromui/src/lib/public-api.ts.
On current main (29c1de7e), the helper makes one request and returns only first. It should include the continuation's results when the complete list fits the console's loading budget.
Proposed fix: follow cursors sequentially with explicit limits on requests, page size, accumulated records, and elapsed time. Reject repeated cursors, cancel stalled reads, and report a load error if the budget is exceeded, rather than returning a partial list. PR #541 implements this and includes regression coverage.
This issue is filed in response to the maintainer's request on https://github.com/perplexityai/SPACE/pull/541#issuecomment-6299508073.
Self-assessed severity: low. Existing resources are hidden in console selectors/catalogs once the list exceeds one API page; the resources themselves remain available through the API.
AI assistance: Codex drafted this issue and contributed the implementation, tests, and PR description.
Activity
3Thanks, we confirmed the console only reads the first page of these lists, so this is accepted in scope. We’ll review #541 against it; could you note which tests you ran yourself?
Created with Perplexity
Thanks, the scope looks good and a pull request is welcome. Please include a test that fails without the fix, and put "Fixes #1749" in the pull request description so it goes straight to review. Agreeing on scope does not guarantee the pull request will be merged.
Thanks for opening this issue! A SPACE maintainer will take a look.
CONTRIBUTING.md explains how we review outside contributions.