Add support for series#11678
Merged
cdrini merged 15 commits intointernetarchive:masterfrom Mar 2, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds experimental Series support to Open Library, allowing works to be organized into series (e.g., Harry Potter, The Sword of Truth). Series are implemented as a special type of list with additional metadata for position tracking and are stored using the same OL###L identifier scheme as lists.
Key changes include:
- Series data model integration with works, using bidirectional edges stored on work objects
- Solr indexing for series fields (series_key, series_name, series_position) to enable search
- UI components for creating, editing, and displaying series on work/edition pages
Reviewed changes
Copilot reviewed 31 out of 31 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| openlibrary/core/models.py | Adds WorkSeriesEdge types, ListSeedMetadata, and series helper methods to Work class |
| openlibrary/core/lists/model.py | Implements Series class extending List, refactors seed metadata handling |
| openlibrary/core/schema.py | Comments out series sequence schema (OL%dS format) |
| openlibrary/core/processors/readableurls.py | Adds URL processor for /series/ paths |
| openlibrary/solr/updater/work.py | Fetches and indexes series data in work Solr documents |
| openlibrary/solr/updater/list.py | Updates list updater to handle series type and list_type field |
| openlibrary/plugins/openlibrary/lists.py | Adds series CRUD endpoints, implements work-series edge synchronization |
| openlibrary/plugins/upstream/addbook.py | Adds series creation support and doc overloads |
| openlibrary/plugins/upstream/code.py | Adds series to editable keys regex |
| openlibrary/plugins/worksearch/schemes/works.py | Adds series fields to work search scheme |
| openlibrary/plugins/worksearch/schemes/lists.py | Updates list search universe to include series |
| openlibrary/plugins/worksearch/code.py | Populates series data in work search results |
| openlibrary/plugins/worksearch/autocomplete.py | Adds series_autocomplete endpoint |
| openlibrary/templates/type/series/*.html | Symlinks to list templates for series views |
| openlibrary/templates/type/list/view_body.html | Updates edit permission logic to allow series editing |
| openlibrary/templates/type/list/edit.html | Adds position field with temporary detection logic |
| openlibrary/templates/type/edition/title_and_author.html | Displays primary series above work title |
| openlibrary/templates/books/series-autocomplete.html | Series autocomplete input component |
| openlibrary/templates/books/edit.html | Adds Work Series fieldset and refactors alert messages |
| openlibrary/macros/SearchResultsWork.html | Displays series info in search results, fixes dict access patterns |
| openlibrary/plugins/openlibrary/js/index.js | Initializes series autocomplete on edit pages |
| openlibrary/plugins/openlibrary/js/edit.js | Implements initSeriesMultiInputAutocomplete function |
| openlibrary/plugins/openlibrary/code.py | Calls register_types() for series type registration |
| static/css/components/*.less | Adds styling for series display |
| conf/solr/conf/managed-schema.xml | Defines series_key, series_name, series_position Solr fields |
| Makefile | Adds series reindexing to reindex-solr target |
| openlibrary/i18n/messages.pot | Adds internationalization strings for series features |
| openlibrary/catalog/utils/query.py | Adds ?_raw=true parameter for list/series queries |
| openlibrary/tests/solr/updater/test_work.py | Updates test helper to accept series parameter |
Comments suppressed due to low confidence (1)
openlibrary/plugins/openlibrary/lists.py:444
- The lists_delete endpoint only handles /lists/ paths but doesn't support /series/ paths. Series should also be deletable. Consider updating the path regex to include series or creating a separate delete endpoint for series.
class lists_delete(delegate.page):
path = r"((?:/people/[^/]+)?/lists/OL\d+L)/delete"
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mekarpeles
approved these changes
Jan 15, 2026
Member
mekarpeles
left a comment
There was a problem hiding this comment.
data flow / approach lgtm, editing should be discussed w/ community
jimchamp
reviewed
Feb 11, 2026
Closed
22db60f to
12e3279
Compare
9b9824c to
55ad9c1
Compare
b45a6d1 to
d6d4ce3
Compare
ed24e04 to
79fe5f9
Compare
0386f44 to
3cee3df
Compare
for more information, see https://pre-commit.ci
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #6718
Closes #7811
Closes #7814
Note: Adding/editing series via the UI is currently limited to super librarians via the edit page, just for a short while for ust to capture any bugs.
Technical
This stores series the core of series information on the work data structure, and has the series page query/aggregate to determine the members of the list. I'm still not entirely certain on this approach ; I think we might actually want to be make it redundant and stored in both spots. But I think this is a good bouncing off point for us to start from!
Known issues:
Future expansions/questions:
Testing
If you pull this locally (and make everything), you should see the new series editing options, and you'll see series showing up in the lists search!
Screenshot
Series as they appear in search results:
Series as they appear on the book page (design needs more work):

Series editing on the work edit page:
Stakeholders
@mheiman