Library: nested collapsible section picker for grouped works (Bhagavad Gītā) - #135
Merged
Conversation
…hagavad Gītā) A groupable novel encodes chapterNumber = group*1000 + item (Gītā verse 2.47 → 2047). The library detail modal now detects this cheaply from the version's chapterRange (from >= 1000 AND spanning multiple groups) and renders an expandable chapter→verse tree — chapters named in Sanskrit with English subtitles and verse ranges, expanding to a lazy verse grid, with expand-all/collapse-all — so a reader can open any verse directly instead of a flat 700-item list. Every ordinary novel renders exactly as before (Aithihyamala 1..126 stays flat; a single-chapter slice stays flat). The verse index is fetched lazily from session.json only for a confirmed grouped novel and cached by URL (LFS-pointer guarded); the picker component is pure over an injected chapter list, fully testable offline. onStartReading gains an optional startChapterNumber that overrides the saved resume point in both cached and streaming hydration paths. 24 new tests (grouping logic + component); groupability detection red-proofed; 48 tests green across touched suites; tsc clean. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0117Ksuo6oeSBw4iTq3yzfYi
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…reconcile P2: groupability now requires an explicit metadata.grouping.scheme === 'chapter-verse' marker instead of range inference (a web novel numbered 1001-2000+ would have been misclassified and Gita-labelled). isGroupable- Chapters stays as a secondary safety assert. A marker-less 1001+ novel renders FLAT (red-proofed). P1: picking a verse outside the first streamed batch (e.g. Gita 2.47 when only ch1 is streamed initially) no longer silently opens/persists chapter 1. Post-import reconcile loads the full chapter set and navigates to + persists the picked verse; unresolvable picks surface a warning rather than parking on the wrong verse (red-proofed: picked ch-2047 opens 2047, not 1001). Full suite 8,682 / 0 failed; build green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0117Ksuo6oeSBw4iTq3yzfYi
Owner
Author
|
Both codex findings adjudicated & fixed (red-proofed): P2 — groupability now gated on an explicit metadata.grouping marker, not range inference; a marker-less 1001+ web novel renders flat. P1 — picking a verse outside the first streamed batch reconciles after full import and opens the RIGHT verse (2.47), never silently ch1. Full suite green. |
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.
The library detail modal gains an expandable chapter→verse tree for grouped works (chapterNumber = group*1000 + item). Detected cheaply from metadata; lazy verse-index fetch only for grouped novels; every ordinary novel unchanged. Enables the whole-Gita 'pick any verse' experience. 24 tests, red-proofed, tsc clean.
🤖 Generated with Claude Code
https://claude.ai/code/session_0117Ksuo6oeSBw4iTq3yzfYi