feat(authors): group author pages by series, collections and shared credits #7

Merged
chris-paganon merged 18 commits from feat/author-pages into master 2026-11-14 18:28:08 +00:00

Summary

Author pages no longer show a flat, paginated bibliography. The whole (capped) bibliography is loaded once and grouped:

  1. Series (top): one sub-group per series.
    • Linked series (Open Library series_key/series_name/series_position): ordered by position. Single positions come first (1, 2, 2.5), then ranges such as box sets 1-7, then unknown positions. The heading has a View series link to the existing /series/[id] page.
    • Subject-tag series (series:Skyward-style subjects): shown with a "Subject tag · positions unknown" badge and ordered by first publication year. There's no series page link because these tags have no Open Library series ID. A tag with the same name as a linked series is merged into it.
    • Series groups are ordered by record count, then total edition count.
  2. Other books and records: anything not matched. These stay visible, never hidden. The description says plainly that this group mixes standalone books, series books Open Library hasn't linked, translations and partial editions.
  3. Collections and box sets: detected from title patterns (A / B, box set, omnibus, bundle, sampler, collection, complete, trilogy, Books 1-3, 4 Books) and from single-author collection/anthology subjects.
  4. Anthologies and shared credits: works where Open Library lists someone else first, works with 5 or more credited authors, or multi-author works with an anthology subject. This catches anthologies (Unfettered, Epic, Dangerous Women), completed or co-written books (Wheel of Time with Robert Jordan), study guides, and sometimes translators credited as authors. The description says so.

Other UI:

  • The count is shown as "238 Open Library records", with a note that translations, partial volumes, box sets and duplicates are separate records. It is not presented as a count of distinct books.
  • A note says the groups come from series links, subject tags and author credits and can be incomplete or wrong, and that years come from the earliest recorded edition.
  • An Order books control (applies to the non-series groups): Most editions first (default) or First published. Most-editions is the default because Open Library's first-publish years are unreliable for prolific authors (Steelheart, Firefight and Mistborn all show 2001).
  • Jump links to each section. Long groups are collapsed (series after 4 cards, other groups after 6) with a "Show all N" toggle.
  • The language filter still works.
  • Book cards are unchanged and still rendered via BookLibraryGrid.

Data sources and request count

No per-book requests. An author page makes 2 Open Library requests, the same as before:

  • /authors/{id}.json (profile, unchanged)
  • one /search.json?q=author_key:{id} with the existing OPEN_LIBRARY_SEARCH_FIELDS plus subject,edition_count, limit=500, sort=editions.

The single larger request replaces paginated 20-item requests, because grouping needs the whole list. Measured responses: Sanderson 238 records, ~115 KB, ~2.7 s; Rowling 421 records, ~200 KB; Agatha Christie 1,362 records capped to 500, ~300 KB, ~3.6 s. When an author has more than 500 records, the page says it shows the 500 records with the most editions and suggests the language filter. The request goes through the existing throttled, cached requestOpenLibraryData.

Why heuristics: Open Library's structured series fields cover only ~3.4k works in the whole catalog, and none of Sanderson's or Klune's. Subject series: tags are the only series signal for most authors. Search results don't expose author roles, so author credit order and author count stand in for them.

Note: the "Series navigation" feature (browse/search series, library grouping) is out of scope. Only the series-heading link to the existing series page is added.

Implementation

  • server/utils/author-bibliography.ts: groupAuthorBibliography() (pure) and requestOpenLibraryAuthorBibliography(). The extra fields (subject, edition_count, raw author_key) are parsed with a separate tolerant zod schema, so normalizeOpenLibraryResponse and BookSearchResult are untouched (this avoids conflicts with the card-metadata work).
  • shared/utils/author-bibliography.ts: response types plus AUTHOR_BIBLIOGRAPHY_LIMIT.
  • app/components/author/AuthorBibliography.vue and AuthorBibliographyGroup.vue: the new author page UI.
  • app/components/book/BookBibliographyHeader.vue: header extracted from BookBibliography.vue, now shared by author and series pages. The series page is otherwise unchanged and still paginated.
  • The author endpoint ignores page now. language is still validated.

Known limitations

  • Subject tags are uneven. For example, Sanderson's "Mistborn" record appears in two single-record tag series ("Mistborn Original Trilogy" and "The Mistborn Saga"), and most Stormlight books aren't tagged, so they fall under "Other books and records".
  • Collection detection by title can misfire, e.g. a novel whose title contains "Collection".
  • "Shared credits" sometimes includes translations where the translator is listed first.

Verification

  • pnpm lint-full passes on every commit.
  • Browser tests at http://127.0.0.4:3004:
    • Sanderson (OL1394865A): 15 series, 151 other, 37 collections, 26 shared credits.
    • T. J. Klune (OL7411322A): main books first; 6 box sets and 2 anthologies separated.
    • J. K. Rowling (OL23919A): linked Harry Potter series in positions #1–#7, then the 1-7 and 1-4 box sets; "View series" opens /series/OL326110L.
    • Agatha Christie (OL27695A): 500-record cap.
    • ?language=fre filters the results; an invalid language returns 400.
    • Sort toggle and "Show all" work.
    • The series page still renders with the extracted header.

Demo video below (1.5× speed): Sanderson scrolled through its groups and the order toggle, then Klune, then Rowling's linked series and the series page link.

demo

Download the demo video (author-pages-demo.mp4)

## Summary Author pages no longer show a flat, paginated bibliography. The whole (capped) bibliography is loaded once and grouped: 1. **Series** (top): one sub-group per series. - *Linked series* (Open Library `series_key`/`series_name`/`series_position`): ordered by position. Single positions come first (1, 2, 2.5), then ranges such as box sets `1-7`, then unknown positions. The heading has a **View series** link to the existing `/series/[id]` page. - *Subject-tag series* (`series:Skyward`-style subjects): shown with a "Subject tag · positions unknown" badge and ordered by first publication year. There's no series page link because these tags have no Open Library series ID. A tag with the same name as a linked series is merged into it. - Series groups are ordered by record count, then total edition count. 2. **Other books and records**: anything not matched. These stay visible, never hidden. The description says plainly that this group mixes standalone books, series books Open Library hasn't linked, translations and partial editions. 3. **Collections and box sets**: detected from title patterns (`A / B`, box set, omnibus, bundle, sampler, collection, complete, trilogy, `Books 1-3`, `4 Books`) and from single-author collection/anthology subjects. 4. **Anthologies and shared credits**: works where Open Library lists someone else first, works with 5 or more credited authors, or multi-author works with an anthology subject. This catches anthologies (Unfettered, Epic, Dangerous Women), completed or co-written books (Wheel of Time with Robert Jordan), study guides, and sometimes translators credited as authors. The description says so. Other UI: - The count is shown as "238 Open Library records", with a note that translations, partial volumes, box sets and duplicates are separate records. It is not presented as a count of distinct books. - A note says the groups come from series links, subject tags and author credits and can be incomplete or wrong, and that years come from the earliest recorded edition. - An **Order books** control (applies to the non-series groups): *Most editions first* (default) or *First published*. Most-editions is the default because Open Library's first-publish years are unreliable for prolific authors (Steelheart, Firefight and Mistborn all show 2001). - Jump links to each section. Long groups are collapsed (series after 4 cards, other groups after 6) with a "Show all N" toggle. - The language filter still works. - Book cards are unchanged and still rendered via `BookLibraryGrid`. ## Data sources and request count No per-book requests. An author page makes **2 Open Library requests**, the same as before: - `/authors/{id}.json` (profile, unchanged) - one `/search.json?q=author_key:{id}` with the existing `OPEN_LIBRARY_SEARCH_FIELDS` plus `subject,edition_count`, `limit=500`, `sort=editions`. The single larger request replaces paginated 20-item requests, because grouping needs the whole list. Measured responses: Sanderson 238 records, ~115 KB, ~2.7 s; Rowling 421 records, ~200 KB; Agatha Christie 1,362 records capped to 500, ~300 KB, ~3.6 s. When an author has more than 500 records, the page says it shows the 500 records with the most editions and suggests the language filter. The request goes through the existing throttled, cached `requestOpenLibraryData`. Why heuristics: Open Library's structured series fields cover only ~3.4k works in the whole catalog, and **none** of Sanderson's or Klune's. Subject `series:` tags are the only series signal for most authors. Search results don't expose author roles, so author credit order and author count stand in for them. Note: the "Series navigation" feature (browse/search series, library grouping) is out of scope. Only the series-heading link to the existing series page is added. ## Implementation - `server/utils/author-bibliography.ts`: `groupAuthorBibliography()` (pure) and `requestOpenLibraryAuthorBibliography()`. The extra fields (`subject`, `edition_count`, raw `author_key`) are parsed with a separate tolerant zod schema, so `normalizeOpenLibraryResponse` and `BookSearchResult` are untouched (this avoids conflicts with the card-metadata work). - `shared/utils/author-bibliography.ts`: response types plus `AUTHOR_BIBLIOGRAPHY_LIMIT`. - `app/components/author/AuthorBibliography.vue` and `AuthorBibliographyGroup.vue`: the new author page UI. - `app/components/book/BookBibliographyHeader.vue`: header extracted from `BookBibliography.vue`, now shared by author and series pages. The series page is otherwise unchanged and still paginated. - The author endpoint ignores `page` now. `language` is still validated. ## Known limitations - Subject tags are uneven. For example, Sanderson's "Mistborn" record appears in two single-record tag series ("Mistborn Original Trilogy" and "The Mistborn Saga"), and most Stormlight books aren't tagged, so they fall under "Other books and records". - Collection detection by title can misfire, e.g. a novel whose title contains "Collection". - "Shared credits" sometimes includes translations where the translator is listed first. ## Verification - `pnpm lint-full` passes on every commit. - Browser tests at http://127.0.0.4:3004: - Sanderson (OL1394865A): 15 series, 151 other, 37 collections, 26 shared credits. - T. J. Klune (OL7411322A): main books first; 6 box sets and 2 anthologies separated. - J. K. Rowling (OL23919A): linked Harry Potter series in positions #1–#7, then the `1-7` and `1-4` box sets; "View series" opens `/series/OL326110L`. - Agatha Christie (OL27695A): 500-record cap. - `?language=fre` filters the results; an invalid language returns 400. - Sort toggle and "Show all" work. - The series page still renders with the extracted header. Demo video below (1.5× speed): Sanderson scrolled through its groups and the order toggle, then Klune, then Rowling's linked series and the series page link. ![demo](https://forgejo.chrispaganon.com/attachments/3ba2b3a8-165c-41cc-b70a-137cf1546c97) [Download the demo video (author-pages-demo.mp4)](https://forgejo.chrispaganon.com/attachments/3ba2b3a8-165c-41cc-b70a-137cf1546c97)
Author
Owner

Reviewed the three commits on feat/author-pages against its merge base with origin/master (unrelated later master changes excluded).

Nit picks

  1. Optional: narrow collection detection for individual series volumes — server/utils/author-bibliography.ts:20 (applied at lines 81–85).

    The standalone series alternative matches an individual volume whose title includes a series annotation, e.g. A Novel (Example Series, Book 1). When that record has neither structured series metadata nor a series: subject tag, it goes into Collections and box sets rather than Other books and records. Sparse series metadata is precisely the case this fallback needs to handle. Consider requiring a box-set/multiple-volume signal alongside series, rather than treating that word alone as collection evidence. This is optional, not required before merge; the PR already acknowledges general title-heuristic limitations.

Other checks

  • Important: no findings requiring changes before merge.
  • Pre-existing: no actionable findings raised.
  • Security: no findings. Author IDs and language remain validated; sort is local UI state, with a fixed upstream sort. The header extraction preserves the existing series-page behavior.
  • The upstream call count remains two per cold author/language lookup, but the search request is notably heavier: up to 500 records instead of 20, plus subjects. It uses the existing one-hour upstream cache backed by the 100 MB LRU storage; this PR adds no HTTP response caching headers. Collapsing groups limits rendered cards, not the full grouped data serialized into the SSR payload; records belonging to multiple series also appear in multiple response groups. These are tradeoffs of the explicitly documented capped-bibliography design, not additional blocking findings.
  • Validation: pnpm lint-full passed. No application code or tests changed; no dev server or Docker services started.
Reviewed the three commits on `feat/author-pages` against its merge base with `origin/master` (unrelated later master changes excluded). ### Nit picks 1. **Optional: narrow collection detection for individual series volumes** — `server/utils/author-bibliography.ts:20` (applied at lines 81–85). The standalone `series` alternative matches an individual volume whose title includes a series annotation, e.g. `A Novel (Example Series, Book 1)`. When that record has neither structured series metadata nor a `series:` subject tag, it goes into **Collections and box sets** rather than **Other books and records**. Sparse series metadata is precisely the case this fallback needs to handle. Consider requiring a box-set/multiple-volume signal alongside `series`, rather than treating that word alone as collection evidence. This is optional, not required before merge; the PR already acknowledges general title-heuristic limitations. ### Other checks - **Important:** no findings requiring changes before merge. - **Pre-existing:** no actionable findings raised. - **Security:** no findings. Author IDs and language remain validated; sort is local UI state, with a fixed upstream sort. The header extraction preserves the existing series-page behavior. - The upstream call count remains two per cold author/language lookup, but the search request is notably heavier: up to 500 records instead of 20, plus subjects. It uses the existing one-hour upstream cache backed by the 100 MB LRU storage; this PR adds no HTTP response caching headers. Collapsing groups limits rendered cards, not the full grouped data serialized into the SSR payload; records belonging to multiple series also appear in multiple response groups. These are tradeoffs of the explicitly documented capped-bibliography design, not additional blocking findings. - Validation: `pnpm lint-full` passed. No application code or tests changed; no dev server or Docker services started.
Author
Owner

Fixed the nit in 26d5597: "series" alone is no longer collection evidence. It now only matches a whole-series title ("X Series" at the end or followed by ":"/"("), so "A Novel (Example Series, Book 1)" falls through to Other books and records. I also allowed hyphenated "2-Book Set" counts so real box sets still match.

Fixed the nit in 26d5597: "series" alone is no longer collection evidence. It now only matches a whole-series title ("X Series" at the end or followed by ":"/"("), so "A Novel (Example Series, Book 1)" falls through to Other books and records. I also allowed hyphenated "2-Book Set" counts so real box sets still match.
chris-paganon force-pushed feat/author-pages from 40cb8c86ad to f16046c222 2026-11-14 18:28:05 +00:00 Compare
chris-paganon deleted branch feat/author-pages 2026-11-14 18:28:08 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
chris-paganon/chrisp-books!7
No description provided.