Files
platform/ios
Yusuf Suleman 58dd589d5a
All checks were successful
Security Checks / dependency-audit (push) Successful in 13s
Security Checks / secret-scanning (push) Successful in 4s
Security Checks / dockerfile-lint (push) Successful in 4s
fix: Reader loadMore failing — duplicate IDs + offset drift
ROOT CAUSE (from instrumented logs):
1. Duplicate entry IDs in LazyVStack — loadMore appended entries
   that already existed. IDs 37603/37613 appeared twice, causing
   "undefined results" from SwiftUI.
2. Offset drift — marking entries as read shifted the unread filter
   results. offset=30 no longer pointed to page 2; entries moved.
3. loadMore returned +0 entries because offset was past the shifted
   end of the filtered dataset.

FIXES:
1. Deduplication: loadMore filters out entries whose IDs already
   exist in the array before appending.
2. Use entries.count as offset instead of a separate counter.
   This naturally accounts for deduplication and status changes.
3. hasMore based on whether new (deduped) entries were actually
   added, not just API page size.

Removed all debug logging.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 23:20:49 -05:00
..