Skip to content

fix: show every note on a verse, not just the first (#114)#115

Merged
kbennett2000 merged 1 commit into
mainfrom
slice/114-multiple-notes
Jun 10, 2026
Merged

fix: show every note on a verse, not just the first (#114)#115
kbennett2000 merged 1 commit into
mainfrom
slice/114-multiple-notes

Conversation

@kbennett2000

Copy link
Copy Markdown
Owner

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):

  • New AnnotationsPopover — a read-only list of every annotation on a verse, modeled on SermonNotesPopover, reusing AnnotationPopover's row body (verbatim Markdown — invariant 6, the out-of-scope line, tags). Takes an optional onOpen: when present, each row gets an "Open →" button (reader); when absent, each row deep-links back to the reader (compare).
  • Reader — ●/○ markers gain a count badge when >1. A single note still opens the editor directly (unchanged); multiple open the list popover, and a row's "Open" hands that note to the existing openExisting editor.
  • Compare — one note keeps the single AnnotationPopover; several use the new list popover. Count badge added.

No backend, schema, or read.py changes — the data was already correct, so invariant 4 (canonical-coordinate bridge) is untouched.

Open-question answers

  • Reader UX for multiple notes: keep single-note behavior direct-to-editor; only multiple notes get the badge + list popover. (Chosen to minimize blast radius on existing single-note flow and tests.)
  • Out-of-scope marker tooltip: now de-duplicates scope translations across all stacked notes.

How it was verified

  • Unit/integration: new AnnotationsPopover.test.tsx, plus multi-note + preserved-single-note cases added to ReaderView.test.tsx and CompareView.test.tsx. Full suite green: 231 tests pass. ESLint + TS-strict clean.
  • End-to-end against a live Concord (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), then GET /api/v1/read/BSB/JOS/1 returned v1 → 2 annotations [1,2], v2 → 1 [2], v3 → 0 — the exact annotations[] shape the frontend renders the badge + list against.

🤖 Generated with Claude Code

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>
@kbennett2000 kbennett2000 merged commit 2d549b5 into main Jun 10, 2026
2 checks passed
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.

Multiple notes on the same passage are not shown

1 participant