Skip to content

[Feature]: Web Push support for background PWA mail notifications #233

@freefrank

Description

@freefrank

Problem / Motivation

Bulwark currently supports foreground mail notifications while the app is open, using the existing JMAP/EventSource state updates. This works well on desktop and mobile browsers as long as the tab or installed PWA is active.

However, when Bulwark is installed as an Android PWA and the app is closed or in the background, new mail does not trigger Android system notifications.

For users who want to use Bulwark as their primary mobile mail client, this is a major limitation compared with native mail apps.

Example flow:

  1. Install Bulwark as an Android PWA.
  2. Enable email notifications in settings.
  3. Close the PWA.
  4. Receive new mail.
  5. No Android system notification appears.

Proposed Solution

Add optional Web Push support for installed PWAs.

A possible implementation could include:

  • VAPID key configuration for self-hosted deployments.
  • A notification permission / subscription control in Settings -> Notifications.
  • PushSubscription storage per user/account/browser.
  • A service worker push handler to display system notifications.
  • A service worker notificationclick handler to open or focus Bulwark.
  • Server-side new-mail detection using JMAP state changes or a lightweight polling worker.

For privacy, the default push payload could be minimal, for example:

You have new mail

Sender, subject, and preview text could be omitted by default, or exposed as an explicit user/admin setting.

Alternatives Considered

Relying on the current foreground JMAP/EventSource notification behavior works only while Bulwark is open. It does not solve mobile PWA background notifications.

Using a native mail client is possible, but it reduces the usefulness of Bulwark as a full mobile webmail/PWA experience.

Feature Area

Notifications / PWA

Mockups / Examples

No response

Additional Context

Current behavior was observed with Bulwark installed as an Android PWA. The app installs successfully and normal foreground notifications/sounds work while the app is open, but no system notification is shown after the PWA is closed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions