feat(authors): group author pages by series, collections and shared credits #7
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/author-pages"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Author pages no longer show a flat, paginated bibliography. The whole (capped) bibliography is loaded once and grouped:
series_key/series_name/series_position): ordered by position. Single positions come first (1, 2, 2.5), then ranges such as box sets1-7, then unknown positions. The heading has a View series link to the existing/series/[id]page.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.A / B, box set, omnibus, bundle, sampler, collection, complete, trilogy,Books 1-3,4 Books) and from single-author collection/anthology subjects.Other UI:
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)/search.json?q=author_key:{id}with the existingOPEN_LIBRARY_SEARCH_FIELDSplussubject,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) andrequestOpenLibraryAuthorBibliography(). The extra fields (subject,edition_count, rawauthor_key) are parsed with a separate tolerant zod schema, sonormalizeOpenLibraryResponseandBookSearchResultare untouched (this avoids conflicts with the card-metadata work).shared/utils/author-bibliography.ts: response types plusAUTHOR_BIBLIOGRAPHY_LIMIT.app/components/author/AuthorBibliography.vueandAuthorBibliographyGroup.vue: the new author page UI.app/components/book/BookBibliographyHeader.vue: header extracted fromBookBibliography.vue, now shared by author and series pages. The series page is otherwise unchanged and still paginated.pagenow.languageis still validated.Known limitations
Verification
pnpm lint-fullpasses on every commit.1-7and1-4box sets; "View series" opens/series/OL326110L.?language=frefilters the results; an invalid language returns 400.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.
Download the demo video (author-pages-demo.mp4)
Reviewed the three commits on
feat/author-pagesagainst its merge base withorigin/master(unrelated later master changes excluded).Nit picks
Optional: narrow collection detection for individual series volumes —
server/utils/author-bibliography.ts:20(applied at lines 81–85).The standalone
seriesalternative 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 aseries: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 alongsideseries, 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
pnpm lint-fullpassed. No application code or tests changed; no dev server or Docker services started.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.
40cb8c86adtof16046c222