fix: show every note on a verse, not just the first (#114)#115
Merged
Conversation
A verse with multiple annotations rendered the same single marker as a one-note verse, and clicking it opened only `inScope[0]`/`outScope[0]` — the rest were invisible and unreachable (#114). The backend already returns every annotation covering a verse; this was a display-layer gap. Mirror the existing sermon-notes pattern: a count badge on the ●/○ marker, and a new AnnotationsPopover listing all notes. In the reader a single note still opens the editor directly; multiple open the list, each row opening its own editor. In compare, one note keeps the single AnnotationPopover, several use the list (read-only deep-links). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Fixes #114.
What landed
A verse with two or more notes (e.g. Joshua 1:1–2) showed the same single marker as a one-note verse, and clicking it opened only the first note — the rest were invisible and unreachable. This was a frontend display gap: the backend already returns every annotation covering a verse in
annotations[].The fix mirrors the existing sermon-notes pattern already in the codebase (count badge + single/list popover split):
AnnotationsPopover— a read-only list of every annotation on a verse, modeled onSermonNotesPopover, reusingAnnotationPopover's row body (verbatim Markdown — invariant 6, the out-of-scope line, tags). Takes an optionalonOpen: when present, each row gets an "Open →" button (reader); when absent, each row deep-links back to the reader (compare).openExistingeditor.AnnotationPopover; several use the new list popover. Count badge added.No backend, schema, or
read.pychanges — the data was already correct, so invariant 4 (canonical-coordinate bridge) is untouched.Open-question answers
How it was verified
AnnotationsPopover.test.tsx, plus multi-note + preserved-single-note cases added toReaderView.test.tsxandCompareView.test.tsx. Full suite green: 231 tests pass. ESLint + TS-strict clean.192.168.1.62:8000): ran songbird's backend pointed at it, registered, created two notes on JOS 1:1 (one a 1:1–2 range), thenGET /api/v1/read/BSB/JOS/1returned v1 → 2 annotations [1,2], v2 → 1 [2], v3 → 0 — the exactannotations[]shape the frontend renders the badge + list against.🤖 Generated with Claude Code