Summary
ZotSeek's bulk "Update Library Index" only indexes My Library, while auto-index
(when enabled) already indexes items from any library, including groups. This is
inconsistent, and there is no way to control which libraries get indexed.
Add first-class support for indexing group libraries, controlled by a single
indexing-scope preference that both the bulk action and auto-index respect.
Current behavior
- Manual "Update Library Index" indexes only the user library
(getLibraryItems() on userLibraryID).
- Auto-index (
zotseek.autoIndex): shouldProcess() in
src/core/auto-index-manager.ts applies no library filter, so new items in
group libraries are already indexed as they arrive.
- The storage layer is already library-aware: everything is keyed by
(library_key, item_key), and the search engine can filter by libraryId
via store.getByLibrary().
So the only missing pieces are a bulk entry point for group libraries and user
control over scope.
Proposed behavior
Introduce a preference that decides which libraries ZotSeek indexes:
zotseek.indexScope = "user" (default) | "all" | "group:123,group:456"
- Default
"user" (My Library only). Group content is opt-in, so upgrading does
not silently start indexing shared group libraries.
- The preference governs BOTH paths:
onIndexLibrary() in src/index.ts (bulk): pick getAllLibraryItems() vs
getLibraryItems() based on the preference.
shouldProcess() in src/core/auto-index-manager.ts: reject items whose
libraryID is out of scope. Auto-index cannot prompt the user, which is why
scope must be a persisted preference rather than a per-click menu choice.
- The value format is extensible on purpose: the v1 UI can be a simple
"My Library only / All libraries" toggle, while a future per-library selector
(group:123,group:456) needs no preference migration.
UI
A dropdown in the ZotSeek preferences pane, next to the indexing settings.
v1: My Library only (default) / All libraries.
Acceptance criteria
- New
zotseek.indexScope preference, default "user", with a UI control.
- Bulk index and auto-index both honor it.
- Menu / confirm / resume strings reflect the active scope.
- Existing resume markers (
type: 'library' scope) keep working.
Related
PR #40 adds the multi-library bulk plumbing (getAllLibraries(),
getAllLibraryItems(), MCP library_key) and fixes a group-collection resume
bug. It currently flips the default to index all libraries; this issue narrows
that to the opt-in preference described above.
Summary
ZotSeek's bulk "Update Library Index" only indexes My Library, while auto-index
(when enabled) already indexes items from any library, including groups. This is
inconsistent, and there is no way to control which libraries get indexed.
Add first-class support for indexing group libraries, controlled by a single
indexing-scope preference that both the bulk action and auto-index respect.
Current behavior
(
getLibraryItems()onuserLibraryID).zotseek.autoIndex):shouldProcess()insrc/core/auto-index-manager.tsapplies no library filter, so new items ingroup libraries are already indexed as they arrive.
(library_key, item_key), and the search engine can filter bylibraryIdvia
store.getByLibrary().So the only missing pieces are a bulk entry point for group libraries and user
control over scope.
Proposed behavior
Introduce a preference that decides which libraries ZotSeek indexes:
"user"(My Library only). Group content is opt-in, so upgrading doesnot silently start indexing shared group libraries.
onIndexLibrary()insrc/index.ts(bulk): pickgetAllLibraryItems()vsgetLibraryItems()based on the preference.shouldProcess()insrc/core/auto-index-manager.ts: reject items whoselibraryIDis out of scope. Auto-index cannot prompt the user, which is whyscope must be a persisted preference rather than a per-click menu choice.
"My Library only / All libraries" toggle, while a future per-library selector
(
group:123,group:456) needs no preference migration.UI
A dropdown in the ZotSeek preferences pane, next to the indexing settings.
v1: My Library only (default) / All libraries.
Acceptance criteria
zotseek.indexScopepreference, default"user", with a UI control.type: 'library'scope) keep working.Related
PR #40 adds the multi-library bulk plumbing (
getAllLibraries(),getAllLibraryItems(), MCPlibrary_key) and fixes a group-collection resumebug. It currently flips the default to index all libraries; this issue narrows
that to the opt-in preference described above.