v1.47.3
Fix
Remove referenced scripture notes from badge count to prevent double-counting
- The scripture tab badge was showing +1 extra because it was counting both:
- 1. Scripture notes directly in the thread
- 2. Scripture notes referenced by other notes in the thread
- This caused double-counting when a scripture note was both in the thread
- AND referenced by another note (e.g., Romans 8:28 appearing as both a
- standalone note and referenced inside 'From Tragedy to Hope').
- The badge should only count scripture notes that are DIRECTLY in the thread,
- not ones that are merely referenced/linked from other notes.
- Fixes badge count off by +1 issue
Fix
Ensure junction entries for all scripture pills and improve badge count clarity
- Scripture pills visible in note content (Revelation 12:11, Acts 1:8) don't
- Badge count may appear off when scripture notes are both in thread and
Feature
Re-enable unique constraint on NoteScriptureReferences
- Cleanup API confirmed no duplicates exist in production database.
- Safe to re-enable unique constraint to prevent future duplicates.
- This completes the scripture pill fix implementation with full defense-in-depth:
- 1. ✅ Database constraint (unique index)
- 2. ✅ Process layer deduplication (in-memory Set)
- 3. ✅ Data layer deduplication (dashboard query)
- 4. ✅ UI layer deduplication (React component)
- After this deployment, run: npm run db:push
