Fix read messages leaving notifications visible#2125
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthrough
ChangesNotification cleanup
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
garthvh
left a comment
There was a problem hiding this comment.
Approving. Reviewed the diff: correct fix for delivered notifications lingering after in-app read. The new work is properly gated behind the existing unread early-out (never runs on the repeated poll-tick path once messages are read), makes a single non-blocking batched removeDeliveredNotifications call, and preserves the batching optimization from #1901 — no hot-path regression. All CI green.
Summary
Root cause
The read path only removed pending local notification requests. Once a notification had already been delivered, iOS continued showing it on the Lock Screen and in Notification Center.
Validation
xcodebuild test -project Meshtastic.xcodeproj -scheme Meshtastic -destination platform=iOS\ Simulator,id=5669CB03-8FA2-4A97-BE04-A8566204116D -only-testing:MeshtasticTests/LocalMessageNotificationCleanupTests -derivedDataPath /private/tmp/meshtastic-notification-dismiss-derived-data CODE_SIGNING_ALLOWED=NONotes
The local SwiftLint pre-commit hook could not run because its installed SourceKit bridge crashes with the active Xcode (
sourcekitdInProcload failure). The focused Xcode simulator test completed successfully.Summary by CodeRabbit
Bug Fixes
Tests