project-nomad/admin/app
Chris Sherwood e38dbf8a65
feat(zim): add "Rescan Library" button for sideloaded ZIM files
Adds a user-facing trigger to rebuild the Kiwix library index from the
ZIM files currently on disk. Covers the sideload case: a user copies a
.zim onto the box (USB, SSH, network share) outside NOMAD's download
flow, and Kiwix has no way to discover it without regenerating the
library index.

Reuses the existing native KiwixLibraryService.rebuildFromDisk() (which
also extracts embedded favicons natively), so no kiwix-tools container
and no icon-patch step are needed. In library mode (--monitorLibrary)
kiwix-serve hot-reloads the XML automatically; only legacy glob-mode
containers are restarted.

- KiwixLibraryService.rebuildFromDisk now returns the book count; adds
  getBookCount() for the before/after delta
- ZimService.rescanLibrary() orchestrates rebuild + legacy restart
- POST /api/zim/rescan-library + ZimController.rescanLibrary
- "Rescan Library" button on the Content Manager page (shown when Kiwix
  is installed) with a success toast reporting books found

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 04:46:45 +00:00
..
controllers feat(zim): add "Rescan Library" button for sideloaded ZIM files 2026-06-23 04:46:45 +00:00
exceptions fix(Docs): documentation renderer fixes 2025-12-23 16:00:33 -08:00
jobs fix(KB): respect Manual ingest policy on post-download dispatch 2026-05-20 10:16:00 -07:00
middleware fix(API): skip compression for Server-Sent Events (#798) 2026-05-20 10:16:00 -07:00
models fix(models): correct inverted belongsTo keys on ChatMessage.session (#921) 2026-05-20 10:16:00 -07:00
services feat(zim): add "Rescan Library" button for sideloaded ZIM files 2026-06-23 04:46:45 +00:00
utils refactor(KB): move FileWarning to shared types/rag following existing convention 2026-05-20 10:16:00 -07:00
validators fix(security): canonicalize hostnames to block IPv4-mapped IPv6 IMDS bypass 2026-05-20 10:16:00 -07:00