Skip to content

Support iOS/Android PWA notifications via Web Push #67

Description

@L1M80

Background

Issue #66 adds browser notifications for the web UI when a run finishes or when approval/file permission is needed.

That implementation is enough for desktop browsers while the Porta web app is open, but it does not fully cover mobile PWA use cases.

Why mobile is different

On iOS and Android, reliable notifications while the app is backgrounded or closed require Web Push, not just new Notification(...) from the page.

Mobile support needs:

  • Service Worker push handling
  • Push subscription registration via PushManager.subscribe()
  • Server/proxy-side subscription storage
  • VAPID keys and Web Push delivery
  • Cleanup for expired subscriptions
  • HTTPS origin
  • iOS PWA installed to Home Screen for iOS/iPadOS support

Deployment complication

A phone cannot use the developer machine's http://127.0.0.1:<port> origin.

For real device testing, Porta needs a stable HTTPS origin, for example:

  • Cloudflare Tunnel
  • Tailscale Funnel/Serve
  • another HTTPS deployment URL

This is especially important for iOS PWA because notification permission and push subscriptions are tied to the app's origin. Temporary URLs make testing and setup fragile.

Proposed scope

Add mobile/PWA push notification support as a separate follow-up to #66.

Possible implementation:

  • Keep current browser notifications as desktop/foreground fallback
  • Add push notification settings UI
  • Add service worker push and notification click handlers
  • Add proxy endpoints:
    • POST /api/push/subscribe
    • POST /api/push/unsubscribe
    • POST /api/push/test
  • Send Web Push on:
    • run completion
    • command approval requests
    • file permission requests
  • Document required HTTPS setup for mobile testing

Notes

Desktop browser notifications and mobile Web Push should be treated as separate notification backends.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions