debug: round 3 — log which guard fails when entry near top
All checks were successful
Security Checks / dependency-audit (push) Successful in 14s
Security Checks / secret-scanning (push) Successful in 4s
Security Checks / dockerfile-lint (push) Successful in 4s

This commit is contained in:
Yusuf Suleman
2026-04-04 00:16:09 -05:00
parent 63123c187c
commit f0717ce347

View File

@@ -99,6 +99,20 @@ struct EntryListView: View {
}
// --- Mark-as-read ---
if vm.entries.prefix(3).contains(where: { $0.id == entryId }) && frame.maxY < 50 {
var fails: [String] = []
if !trackingActive { fails.append("inactive(\(Int(cumulativeDown))/\(Int(activationThreshold)))") }
if !isScrollingDown { fails.append("notDown") }
if entry.isRead { fails.append("alreadyRead") }
if markedByScroll.contains(entryId) { fails.append("alreadyMarked") }
if !wasVisible.contains(entryId) { fails.append("notVisible") }
if frame.maxY >= 0 { fails.append("aboveVP(\(Int(frame.maxY)))") }
if fails.isEmpty {
print("[SCROLL] ✅ WILL MARK id=\(entryId)")
} else {
print("[SCROLL] ❌ id=\(entryId) maxY=\(Int(frame.maxY)) fails=\(fails.joined(separator: ","))")
}
}
guard trackingActive,
isScrollingDown,
!entry.isRead,