Skip to content

Resolve out-of-range verse refs to the nearest preceding segment#147

Open
alex-rawlings-yyc wants to merge 1 commit into
remove-verse-0-guardsfrom
clamp-chapter-end-nav
Open

Resolve out-of-range verse refs to the nearest preceding segment#147
alex-rawlings-yyc wants to merge 1 commit into
remove-verse-0-guardsfrom
clamp-chapter-end-nav

Conversation

@alex-rawlings-yyc

@alex-rawlings-yyc alex-rawlings-yyc commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

The host's next-verse button emits verseNum + 1 without clamping, so bumping forward from a chapter's last verse delivered a verse past the chapter's end; the loader only resolved verse-0 refs, and the segment window's anchor fallback jumped to the start of the book. Any unmatched verse now resolves to the nearest preceding segment start in its chapter, so the view holds at the chapter's end (and a verse inside a merged multi-verse segment resolves to its owning segment).


This change is Reviewable

The host's next-verse button emits verseNum + 1 without clamping, so
bumping forward from a chapter's last verse delivered a verse past the
chapter's end; the loader only resolved verse-0 refs, and the segment
window's anchor fallback jumped to the start of the book. Any unmatched
verse now resolves to the nearest preceding segment start in its
chapter, so the view holds at the chapter's end (and a verse inside a
merged multi-verse segment resolves to its owning segment).
@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 16511ee8-ca69-4049-9678-fedc8ff18875

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch clamp-chapter-end-nav

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.

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.

App control next verse into non-existent verse handled wrong

1 participant