fix(notifications): capture notification-click listener init failures - #2480
Conversation
The click-listener block added in #2470 lands in a console.warn-only catch, so the native failure is invisible in Sentry — the same gap the neighbouring app-listener catch already covers. Launch URLs are suppressed in both SDKs, which makes this listener the only thing that routes a push tap: if it never registers, taps silently do nothing. Same shape as the existing capture — once per session, warning level, tagged feature:onesignal.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe native plugin hook now tracks notification click listener initialization failures separately and reports the first failure through ChangesNative plugin error reporting
Estimated code review effort: 2 (Simple) | ~5 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install failed: dependency version conflict. Check your lock file or package.json. Comment |
Code-analysis diffPainscore total: 6247.08 → 6247.49 (+0.41) 🆕 New findings (8)
✅ Resolved (8)
|
🧪 UI test report — ✅ all greenSuites
📊 Coverage (unit)
⏱ 10 slowest test cases
|
kushagrasarathe
left a comment
There was a problem hiding this comment.
Reviewed — SAFE. Approving.
Observability-only: captures failures in the notification-click listener to Sentry with a dedup guard. No behavior change to the click handling, no new data surface.
No blocking issues.
Small follow-up to #2473, which made native OneSignal failures visible in Sentry.
#2473 and #2470 were in flight at the same time and merged a minute apart. #2473 covered the two swallowing catches that existed in
useNativePlugins.tsat the time; #2470 then added a new block to the same file — the notification-click listener — whose catch isconsole.warnonly. So one native failure path is silent again.It matters because launch URLs are suppressed in both the web and native SDKs (
suppressLaunchURLs/OneSignal_suppress_launch_urls), which makes this listener the only thing that routes a push tap. IfgetOneSignalAdapter()or the listener registration throws, every notification tap silently does nothing — and today there'd be no Sentry event to explain why.Same shape as the capture in the neighbouring app-listener catch: once per session via a module-level flag,
warninglevel, taggedfeature:onesignalandsource:native_click_listener.Verification
tsc --noEmitpasses,eslintclean,prettierreports unchangedSummary by CodeRabbit