Skip to content

Make browser notifications work on a phone #168

Open

Description

@RyanSaxe

When pair is open on a phone through the address PAIR_HUB_HOST adds, Settings shows "Notifications unavailable" and the button is disabled. I would like to consider making browser-based notifications work there, so a phone can tell me when a round waits, an agent replies or an agent proposes work.

Why they are unavailable today

  • createReviewAlerts, in src/frame/sync/notifications.mjs, only offers notifications on a secure page. The Phone URL is plain HTTP on an address other than loopback, so the browser never treats the page as secure.
  • HTTPS alone would not fix it. The frame shows each alert by calling new Notification() from the open tab, and pair has no service worker. Chrome on Android refuses that call, and iOS only allows web notifications for a site added to the Home Screen, with a manifest and a service worker. These two rules come from an old Chrome post and a vendor's guide, and nobody has tested them on a phone with pair yet.
  • The frame creates each alert from its polling in an open tab, so an alert with the browser closed needs a push that the hub sends.

What it would take

Web Push is the browser-based way:

  • an HTTPS address for the hub, which tailscale serve can provide
  • a manifest and a service worker in the frame
  • a hub that sends each alert through the browser vendor's push service
  • on iOS, adding pair to the Home Screen

A push service such as ntfy is the smaller alternative. The hub posts each alert to the service, and its phone app shows it. That adds one app, and session titles leave the machine unless the service is self-hosted.

A smaller gap

The Settings row says "Notifications unavailable" and gives no reason. A phone has no tooltip, so the reader cannot tell why.

Activity

  1. added
    enhancement
    on Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions