fix(home): keep finished series off the Continue-reading shelf

A "Continue reading" shelf listing series the reader already finished (read
to the last page, nothing new) is odd. Expose the last-read chapter's
page_count on the read-progress list, and filter the shelf to drop entries
that are caught up (on the last page of the latest chapter with no new
chapters). Mid-chapter and has-new-chapters entries stay; the full history
view is unaffected. Finished detection is a pure, unit-tested helper.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
MechaCat02
2026-07-04 21:52:58 +02:00
parent 3824eaafb2
commit bfaa166e0a
14 changed files with 133 additions and 6 deletions

View File

@@ -15,6 +15,9 @@ export type ReadProgressSummary = {
chapter_id: string | null;
/** `null` if the chapter was deleted after the progress was written. */
chapter_number: number | null;
/** Page count of the last-read chapter (`null` when unknown / deleted).
* Lets the shelf tell a finished series from one still in progress. */
chapter_page_count: number | null;
page: number;
updated_at: string;
/** Chapters past the reader's last-read chapter — a personal "new