feat(annotations): add a library-wide notebook for every book

Add read-only /notebook routes that list highlights, journal entries, bookmarks and reviews
across every book a reader can open, as one cursor-paged stream with per-kind counts, a By Book
listing, a daily review deck, a seeded review shuffle, On this day and a library-wide trash. Each
kind is read through its own index-ordered arm cut at the page size before a UNION ALL merge, so a
deep page costs what the first does, and book labels travel once per page in a sidecar map.

Scope follows library access and content filters. Everything is additive and advertised as the
notebook-hub app-info feature. The iOS app calls these routes and the web client does not yet, so
they look unused from the client alone. No migration: the extra indexes for the edited sort and
search wait until the chapter-editor migrations land.
This commit is contained in:
neon
2026-10-04 23:39:10 +00:00
parent ff880a470c
commit a24dc2e2cc
25 changed files with 3706 additions and 1 deletions
+26
View File
@@ -853,6 +853,32 @@ export const E2E_SUITES = Object.freeze({
...SHARED_TYPES_PATHS,
],
},
"notebook-hub": {
id: "notebook-hub",
name: "Notebook Hub",
timeout: 45,
lane: "full",
description: "Library-wide notebook: entries, overview, books, review decks, on this day and trash suite",
vitestTarget: "test/notebook-hub.e2e-spec.ts",
junitOutput: `${TEST_RESULTS_DIR}/notebook-hub-e2e-junit.xml`,
prepareDedicatedDatabase: true,
useDedicatedDatabase: true,
changedPaths: [
"server/src/modules/notebook/**",
"server/src/modules/annotation/**",
"server/src/modules/book-journal/**",
"server/src/modules/bookmark/**",
"server/src/modules/user-book-note/**",
"server/src/modules/book-cover-store/**",
"server/src/modules/library/**",
"server/src/common/utils/content-filter-sql.utils.ts",
"server/src/common/utils/accent-insensitive-search.utils.ts",
"server/test/notebook-hub.e2e-spec.ts",
"server/test/e2e/reader-state-isolation/**",
...SHARED_DB_AND_HELPER_PATHS,
...SHARED_TYPES_PATHS,
],
},
"kobo-annotation-sync": {
id: "kobo-annotation-sync",
name: "Kobo Annotation Sync",