Repository navigation
"Continue Reading" Phase 1: Merge Active Loans & Loan History Carousel #13272
Description
Epic: #13256 — "Continue Reading" Flow & Auto-Add Prompts (open)
This is Phase 1 of that epic. Check the epic issue for overall status and the dependency graph.
Feature Request
Problem / Opportunity
New patrons land on an empty My Books page — the Loans carousel just says "No books are on this shelf," with no path back to value. Most CDL loans are ~1hr; once expired, they vanish from the active dashboard with no "pick up where you left off" surface. Patrons who borrowed a book yesterday return to an empty dashboard with nothing to engage with.
The measurable impact is patron retention: populated shelves correlate strongly with retention, and today we have no mechanism to preserve short-term borrow history on the dashboard.
Success: After this ships, a patron who borrowed any book in the past will see it in their "My Loans" carousel even after the loan has expired, providing an immediate "continue reading" path.
Proposal
Replace the legacy active-only Loans carousel on the My Books page with a unified carousel that merges:
- Active CDL loans (books currently checked out).
- Past loan history (returned/expired borrows, sourced from
user_borrow_history).
Books will be deduplicated by OLID (active loan takes priority) and sorted by last-access timestamp descending.
This is Phase 1 of Epic #13256.
Breakdown
Implementation Details (for maintainers)
Related files
Refer to this map of common Endpoints:
openlibrary/plugins/upstream/mybooks.py— loans data marshalling and carousel data assemblyopenlibrary/templates/account/mybooks.html— carousel template renderingopenlibrary/core/lending.py—get_loans_of_user,_get_ia_loans_of_user,IA_Lending_APIopenlibrary/plugins/upstream/account.py—get_loan_history_dataforuser_borrow_history
Requirements Checklist
- Fetch active loans via
get_loans_of_userinmybooks.py - Fetch historical loans via the
user_borrow_historyaction on the lending API - Deduplicate merged list by OLID (active loan wins)
- Sort merged list by last-access timestamp descending
- Limit to a sensible maximum (e.g. 18 books)
- Update
mybooks.htmlto render the unified list in the carousel - Ensure cards correctly handle redirect keys (
/books/ia:xxx → /books/OLxxx) for covers
Stakeholders
- @Sadashii (author, implementation lead)
- @mekarpeles (maintainer review)
Instructions for Contributors
- Before creating a new branch or pushing up changes to a PR, please first run these commands to ensure your repository is up to date, as the pre-commit bot may add commits to your PRs upstream.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
openlibrary-bot commentedon Aug 6, 2026
Thanks for the suggestion! A staff member will review this and follow up when they can.
my books loans carousel: merge active loans with loan history
my books loans carousel: merge active loans with loan history
my books loans carousel: merge active loans with loan history
my books loans carousel: merge active loans with loan history
my books loans carousel: merge active loans with loan history
my books loans carousel: merge active loans with loan history