Skip to content

Conversation

@bordalix
Copy link
Collaborator

@bordalix bordalix commented Jan 21, 2026

Not tested (will test with preview deployment on cloudflare)

Summary by CodeRabbit

  • Bug Fixes
    • Improved notification system reliability by adding proper permission verification. The app now explicitly requests notification permissions before displaying service worker notifications, preventing delivery failures and ensuring consistent notification display.

✏️ Tip: You can customize this high-level summary in your review settings.

@cloudflare-workers-and-pages
Copy link

Deploying wallet-bitcoin with  Cloudflare Pages  Cloudflare Pages

Latest commit: 227d2ff
Status: ✅  Deploy successful!
Preview URL: https://667c4e1b.wallet-bitcoin.pages.dev
Branch Preview URL: https://hotfix-android-notifications.wallet-bitcoin.pages.dev

View logs

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 21, 2026

Walkthrough

The sendNotification function's fallback path now requests Notification permission before attempting to display a service worker notification, instead of directly attempting notification display without verifying current permission status.

Changes

Cohort / File(s) Summary
Notification Permission Handling
src/lib/notifications.ts
Modified fallback logic in sendNotification to explicitly request Notification permission and conditionally show service worker notification only if permission is granted.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding permission checks before sending notifications in the fallback path.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cloudflare-workers-and-pages
Copy link

Deploying wallet-mutinynet with  Cloudflare Pages  Cloudflare Pages

Latest commit: 227d2ff
Status: ✅  Deploy successful!
Preview URL: https://d366c23c.arkade-wallet.pages.dev
Branch Preview URL: https://hotfix-android-notifications.arkade-wallet.pages.dev

View logs

try {
navigator.serviceWorker.ready.then((registration) => {
registration.showNotification(title, options)
Notification.requestPermission().then((result) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will trigger the permission request on start? If they reject, it's gone forever? Can we style the request with our own branding and text?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would
Ask permission only when user go in settings and enable. Eventually e can use the popup announcement or similar after user onboarded to ask for it (if installed as PWA)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants