October 4, 2026 at 12:00:00 AM UTC
Indigo paged search results
indigoatprotoc3ds
Search stopped at its first page: a query, a profile's posts, a followers list — all returned twenty entries and no way to ask for more (issue #10). This adds paging to every search-kind that has a server cursor.
Changes
src/app/search.{c,h}— the search model grows a cursor and ahas_moreflag.indigo_search_begin_page(s, append)stages a fetch (fresh fetch resets, page keeps),indigo_search_finish_page(s, added, next_cursor)completes it, andindigo_search_wants_pageis the prefetch gate: near the end of what is held, more are wanted — the same rule the timeline uses, so scrolling does not pause at a page boundary. An empty page on a non-empty list ends the paging even when the server still offers a cursor.src/atproto/session.{c,h}— every submit function gains apagingflag; the worker passes the session's cursor to Wolfram only when set, and copies the next cursor into the event before freeing the list. Request size isINDIGO_SEARCH_PAGE(20); the app accumulates up toINDIGO_SEARCH_MAX(60, raised from 20 — the union grew ~100KB and the host test stack limit went with it).src/app/app.c— the*_loadedfunctions append instead of resetting (staging decides), andupdate_searchpollswants_pageand maps the search-kind back to its request kind. Saved feeds are the one exception: they come from the account's preferences in a single fetch, so there is no second page to ask for.- Tests:
test_search_pagingcovers append, cursor stop, and empty-page stop. Existing tests updated for the staging-based reset (a bareloadedcall no longer clears). AGENTS.md, README, CHANGELOG updated.
Verification
make test— 2949 checks, 0 failuresmake warnings— cleanmake snapshots— 111 PNGs, no diffsmake allwith devkitARM — indigo.3dsx built clean
Commit de12fcf, pushed. Issue #10 closed.
all entries