project-nomad/admin/types
chriscrosstalk 810a70acb7 fix(ZIM): accumulate across Kiwix pages to prevent empty Content Explorer (#746)
When many ZIMs are already installed locally, a single Kiwix catalog page
(12 items) could return 12 already-installed items, which zim_service
would fully filter out client-side. The endpoint returned items: [] with
has_more: true, and the frontend's infinite-scroll guard
(flatData.length > 0) blocked fetchNextPage — leaving the user with
"No records found" despite plenty of uninstalled ZIMs available.

Backend now accumulates across up to 5 Kiwix fetches (60 items each)
until it has enough post-filter results to return, dedupes by entry id,
advances currentStart by actual entries returned (not requested), and
returns a next_start cursor. The frontend consumes that cursor instead
of computing Kiwix offsets locally, and the flatData.length > 0 guard is
removed so the existing on-mount effect drives bounded auto-fetch when
a short page lands.

The pre-existing has_more off-by-one (compared totalResults against the
input start rather than the post-fetch position) is fixed implicitly.

Diagnosis credit: @johno10661.

Closes #731

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-21 14:26:28 -07:00
..
benchmark.ts refactor(Benchmarks): cleanup api calls 2026-02-01 05:23:11 +00:00
chat.ts fix(AI): improved perf via rewrite and streaming logic 2026-03-03 20:51:38 -08:00
collections.ts feat: curated content update checking 2026-02-11 21:49:46 -08:00
docker.ts feat: initial commit 2025-06-29 15:51:08 -07:00
downloads.ts feat(downloads): rich progress, friendly names, cancel, and live status (#554) 2026-04-03 14:26:50 -07:00
files.ts feat: curated content system overhaul 2026-02-11 15:44:46 -08:00
kv_store.ts feat(AI): enable flash_attn by default and disable ollama cloud (#616) 2026-04-03 14:26:50 -07:00
maps.ts feat: [wip] new maps system 2025-11-30 22:29:16 -08:00
ollama.ts feat(AI): enable remote AI chat host 2026-04-03 14:26:50 -07:00
rag.ts feat(AI): enable remote AI chat host 2026-04-03 14:26:50 -07:00
services.ts feat: support for updating services 2026-03-11 14:08:09 -07:00
system.ts feat(GPU): warn when GPU passthrough not working and offer one-click fix 2026-03-11 14:08:09 -07:00
util.ts feat: initial commit 2025-06-29 15:51:08 -07:00
zim.ts fix(ZIM): accumulate across Kiwix pages to prevent empty Content Explorer (#746) 2026-04-21 14:26:28 -07:00