Skip to content

fix(web): show Resume Reading on the manga CTA when the target volume is in progress - #280

Merged
Quick104 merged 1 commit into
Silo-Server:mainfrom
fluxis:fix/manga-resume-cta
Jul 3, 2026
Merged

Quick104 merged 1 commit into
Silo-Server:mainfrom
fluxis:fix/manga-resume-cta

Conversation

@fluxis

@fluxis fluxis commented Jul 2, 2026 •

Copy link
Copy Markdown
Contributor

Problem

On a manga/ebook series detail page, the primary action button ignored saved reading progress: a volume at 18% still showed Start Reading Volume 1, contradicting the progress indicator rendered on the same page.

Approach

The CTA verb only inspected chapter.read (finished chapters). The MangaChapter.progress fraction the API already returns now takes precedence: when the resume target has progress > 0 the button reads Resume Reading; unread series keep Start Reading, mid-series targets keep Continue, fully-read series keep Read Again.

Testing

New regression test (partial-progress volume → "Resume Reading Volume 1" with the same reader href); full MangaContent suite passes (13/13), pnpm run lint + format:check clean.

Fixes #188

AI-use disclosure

Implemented with Claude Code (test-first); human-reviewed before submission.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Improved the reading CTA on manga detail pages so it now shows the correct action for partially read volumes.
    • The CTA now links users back to the right ebook reader page, preserving the series context and return path.
    • Added coverage to prevent regressions in the reading resume flow.

… is in progress

The series hero CTA only inspected chapter.read, so a volume with saved
partial progress (e.g. 18%) still rendered "Start Reading" — the button
contradicted the progress indicator on the same page. The resume target
with progress > 0 now renders "Resume Reading"; untouched series keep
"Start Reading" and mid-series targets keep "Continue".

Fixes Silo-Server#188

Co-Authored-By: Claude Fable 5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Jul 2, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The CTA verb logic in MangaContent.tsx was updated to check resume chapter progress, distinguishing "Resume Reading" (progress > 0), "Continue" (resume exists, no progress), and "Start Reading" (no resume). A regression test validates the "Resume Reading" case.

Changes

Resume Reading CTA fix

Layer / File(s) Summary
CTA verb selection based on progress
web/src/pages/ItemDetail/MangaContent.tsx, web/src/pages/ItemDetail/MangaContent.test.tsx
Adds a resumeInProgress flag derived from resume.chapter.progress to choose between "Resume Reading", "Continue", and "Start Reading" CTA text, with a test verifying the "Resume Reading" case links to the correct ebook reader route.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Related issues: #188 (Series action button ignores active reading progress)

Suggested reviewers: N/A

🐰 A hop, a click, a partial page,
No more "Start" when progress shows its stage,
"Resume Reading" now leads the way,
Tested and true, come what may!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main fix: showing Resume Reading when the target volume is in progress.
Linked Issues check ✅ Passed The code and regression test address issue #188 by using reading progress to show Resume Reading for partially completed volumes.
Out of Scope Changes check ✅ Passed The changes stay focused on MangaContent CTA logic and its regression test, with no clear unrelated additions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
web/src/pages/ItemDetail/MangaContent.tsx (1)

268-282: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Logic correctly implements progress-precedence, but the comment above is now stale.

The comment at Lines 268-270 only describes the read/unread → Continue/Start Reading distinction; it doesn't mention that partial progress on the resume target now overrides those states with "Resume Reading". Worth a one-line update so future readers don't miss the precedence rule.

📝 Suggested comment update
   // The resume target is the first unfinished chapter in reading order. Any
   // finished chapter before it means the viewer is mid-series ("Continue");
-  // a fully read series restarts from the beginning.
+  // a fully read series restarts from the beginning. Partial progress on the
+  // resume target itself takes precedence over anyRead, surfacing "Resume
+  // Reading" instead of "Continue"/"Start Reading".
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@web/src/pages/ItemDetail/MangaContent.tsx` around lines 268 - 282, The stale
comment above the CTA selection logic in MangaContent should be updated to
reflect the current precedence rules: first unread chapter is still the resume
target, but nonzero chapter.progress on that target now takes priority and shows
"Resume Reading" before the existing "Continue" and "Start Reading" states.
Update the nearby explanatory comment around the anyRead, resume,
resumeInProgress, and cta logic so it accurately matches firstUnreadChapter and
the verb selection behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@web/src/pages/ItemDetail/MangaContent.tsx`:
- Around line 268-282: The stale comment above the CTA selection logic in
MangaContent should be updated to reflect the current precedence rules: first
unread chapter is still the resume target, but nonzero chapter.progress on that
target now takes priority and shows "Resume Reading" before the existing
"Continue" and "Start Reading" states. Update the nearby explanatory comment
around the anyRead, resume, resumeInProgress, and cta logic so it accurately
matches firstUnreadChapter and the verb selection behavior.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0c0b5069-244d-44c6-8ae2-a1c6947d685e

📥 Commits

Reviewing files that changed from the base of the PR and between 5172155 and 516e6f4.

📒 Files selected for processing (2)
  • web/src/pages/ItemDetail/MangaContent.test.tsx
  • web/src/pages/ItemDetail/MangaContent.tsx

@Quick104
Quick104 merged commit 3d82aa5 into Silo-Server:main Jul 3, 2026
2 checks passed
Quick104 pushed a commit to RXWatcher/silo-server that referenced this pull request Jul 10, 2026
… is in progress (Silo-Server#280)

The series hero CTA only inspected chapter.read, so a volume with saved
partial progress (e.g. 18%) still rendered "Start Reading" — the button
contradicted the progress indicator on the same page. The resume target
with progress > 0 now renders "Resume Reading"; untouched series keep
"Start Reading" and mid-series targets keep "Continue".

Fixes Silo-Server#188

Co-authored-by: Claude Fable 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Series action button ignores active reading progress

2 participants