Repository navigation
fix(web): show Resume Reading on the manga CTA when the target volume is in progress - #280
Conversation
… 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]>
📝 WalkthroughWalkthroughThe 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. ChangesResume Reading CTA fix
Estimated code review effort: 1 (Trivial) | ~5 minutes Related issues: Suggested reviewers: N/A 🐰 A hop, a click, a partial page, 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
web/src/pages/ItemDetail/MangaContent.tsx (1)
268-282: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueLogic 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
progresson 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
📒 Files selected for processing (2)
web/src/pages/ItemDetail/MangaContent.test.tsxweb/src/pages/ItemDetail/MangaContent.tsx
… 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]>
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). TheMangaChapter.progressfraction the API already returns now takes precedence: when the resume target hasprogress > 0the 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:checkclean.Fixes #188
AI-use disclosure
Implemented with Claude Code (test-first); human-reviewed before submission.
🤖 Generated with Claude Code
Summary by CodeRabbit